Requirements
| Resource | Minimum | Recommended |
|---|---|---|
| OS | Windows 10/11 Pro, Enterprise, or Education | Windows 11 Pro |
| RAM | 4 GB available for VM | 8 GB available for VM |
| Disk | 25 GB free | 40 GB free |
| CPU | 2 cores, VT-x enabled | 4 cores |
| Network | Internet connection | Stable broadband |
Check Your Windows Edition
Press Win + R, type winver, and press Enter. The dialog shows your Windows edition. You need Pro, Enterprise, or Education.
Step 1: Enable Hyper-V
Method A: Windows Features Dialog
- Press
Win + R, typeoptionalfeatures, and press Enter - In the Windows Features window, check:
- Hyper-V (expand and check all sub-items)
- Virtual Machine Platform
- Windows Hypervisor Platform
- Click OK
- Wait for the features to install
- Restart your computer when prompted
Method B: PowerShell (Run as Administrator)
Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V -All
Restart your computer when prompted.
Verify Hyper-V Is Enabled
After restart, search for "Hyper-V Manager" in the Start menu. If it appears, Hyper-V is ready.
Step 2: Download Ubuntu ISO
- Go to: https://ubuntu.com/download/server
- Download Ubuntu Server 24.04 LTS (x86_64)
- Save the ISO file (approximately 2.5 GB)
Step 3: Create the Virtual Machine
Using Hyper-V Manager (GUI)
- Open Hyper-V Manager (search in Start menu)
- In the right panel, click New > Virtual Machine
- Click Next on the introduction page
- Specify Name and Location: Name:
codehero— Click Next - Specify Generation: Select Generation 2 (recommended for Ubuntu 24.04) — Click Next
- Assign Memory: Startup memory:
4096MB — Uncheck "Use Dynamic Memory" — Click Next - Configure Networking: Connection: Select Default Switch (provides NAT-style networking) — Click Next
- Connect Virtual Hard Disk: Select "Create a virtual hard disk" — Size:
40GB — Click Next - Installation Options: Select "Install an operating system from a bootable image file" — Browse to the Ubuntu ISO — Click Next
- Click Finish
Using PowerShell
# Create the VM
New-VM -Name "codehero" -Generation 2 -MemoryStartupBytes 4GB -NewVHDPath "C:\Hyper-V\codehero.vhdx" -NewVHDSizeBytes 40GB -SwitchName "Default Switch"
# Configure CPU
Set-VMProcessor -VMName "codehero" -Count 2
# Disable dynamic memory
Set-VMMemory -VMName "codehero" -DynamicMemoryEnabled $false
# Add the Ubuntu ISO
Add-VMDvdDrive -VMName "codehero" -Path "C:\path\to\ubuntu-24.04-live-server-amd64.iso"
# Set boot order to DVD first
$dvd = Get-VMDvdDrive -VMName "codehero"
Set-VMFirmware -VMName "codehero" -FirstBootDevice $dvd
Step 4: Disable Secure Boot
Ubuntu requires disabling Secure Boot on Generation 2 Hyper-V VMs, or changing it to use the Microsoft UEFI Certificate Authority template.
GUI Method
- In Hyper-V Manager, right-click
codehero> Settings - Go to Security
- Either:
- Uncheck "Enable Secure Boot" entirely, or
- Keep Secure Boot enabled but change the template to Microsoft UEFI Certificate Authority
- Click OK
PowerShell Method
# Option 1: Disable Secure Boot
Set-VMFirmware -VMName "codehero" -EnableSecureBoot Off
# Option 2: Use Microsoft UEFI Certificate Authority (keeps Secure Boot on)
Set-VMFirmware -VMName "codehero" -SecureBootTemplate MicrosoftUEFICertificateAuthority
Step 5: Install Ubuntu
Start the VM
- In Hyper-V Manager, right-click
codehero> Connect (opens the VM console window) - Click Start in the console window
Ubuntu Installation Steps
- Select Try or Install Ubuntu Server and press Enter
- Language: Select your language
- Keyboard: Select your keyboard layout
- Type of Install: Ubuntu Server
- Network: Ubuntu auto-detects the network. Note the IP address if shown.
- Proxy: Leave empty
- Mirror: Leave default
- Storage: Use an entire disk > select the virtual disk > Done > Done > Continue
- Profile Setup:
- Your name:
Claude Admin - Server name:
codehero-server - Username:
claude - Password: Choose a password (remember it)
- Your name:
- Ubuntu Pro: Skip for now
- SSH: Check "Install OpenSSH server"
- Featured Snaps: Skip
- Wait for installation (5-10 minutes)
- Select Reboot Now
- The VM may hang on "Please remove the installation medium" — just press Enter or power cycle the VM
Remove the ISO After Installation
After the first reboot:
- Shut down the VM
- Right-click the VM > Settings > SCSI Controller > DVD Drive
- Change to None
- Start the VM again
PowerShell:
Remove-VMDvdDrive -VMName "codehero" -ControllerNumber 0 -ControllerLocation 1
First Login
At the login prompt:
- Username:
claude - Password: the password you chose
Step 6: Install CodeHero
Run these commands inside the VM. First, copy the ZIP file provided with your CodeHero PRO license into the VM, then:
sudo apt update
sudo apt install -y unzip wget net-tools
sudo su
cd /root
unzip codehero-pro-release-4.6.3.zip
cd codehero
chmod +x setup.sh
./setup.sh
Wait 10-15 minutes for installation to complete.
Find Your VM IP Address
hostname -I
Write down the IP (e.g., 172.19.240.5).
Step 7: Access the Dashboard
On your Windows host, open a browser and go to:
https://YOUR_VM_IP:9453
Default Login
- Username:
admin - Password:
admin123
Change Default Passwords
sudo /opt/codehero/scripts/change-passwords.sh
Browser Security Warning
| Browser | How to Proceed |
|---|---|
| Chrome | Click "Advanced" then "Proceed to site (unsafe)" |
| Firefox | Click "Advanced..." then "Accept the Risk and Continue" |
| Edge | Click "Advanced" then "Continue to site (unsafe)" |
Daily Usage
GUI (Hyper-V Manager)
| Action | Steps |
|---|---|
| Start | Right-click VM > Start |
| Connect | Right-click VM > Connect (opens console) |
| Shut Down | Right-click VM > Shut Down |
| Turn Off | Right-click VM > Turn Off (force, use only if Shut Down hangs) |
| Delete | Right-click VM > Delete |
| Save State | Right-click VM > Save (hibernates the VM) |
PowerShell Commands
# Start the VM
Start-VM -Name "codehero"
# Graceful shutdown
Stop-VM -Name "codehero"
# Force power off
Stop-VM -Name "codehero" -Force
# Save state (hibernate)
Save-VM -Name "codehero"
# Get VM info
Get-VM -Name "codehero"
# Get VM IP address
Get-VM -Name "codehero" | Select -ExpandProperty NetworkAdapters | Select IPAddresses
# Delete the VM
Remove-VM -Name "codehero" -Force
# Also delete the virtual hard disk
Remove-Item "C:\Hyper-V\codehero.vhdx"
SSH into the VM
From PowerShell or Windows Terminal:
ssh claude@YOUR_VM_IP
Troubleshooting
"Hyper-V" Not Found in Start Menu
Hyper-V may not be enabled. Run in PowerShell (Admin):
Get-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V
If the state is "Disabled", enable it:
Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V -All
Cannot Enable Hyper-V
- Windows Home: Hyper-V is not available. Use VirtualBox or WSL2.
- Virtualization disabled: Enable VT-x/AMD-V in BIOS.
VM Won't Boot / Black Screen
- Verify Secure Boot is disabled or using the correct template (see Step 4)
- Ensure the ISO is attached and set as the first boot device
- Try using Generation 1 instead of Generation 2
No Network in the VM
- Verify the VM is connected to "Default Switch"
- Check the virtual switch:
Get-VMSwitch - If "Default Switch" is missing, create an external switch:
New-VMSwitch -Name "External" -NetAdapterName "Ethernet" -AllowManagementOS $true
Cannot Access Dashboard from Browser
- Get the VM IP:
Get-VM -Name "codehero" | Select -ExpandProperty NetworkAdapters | Select IPAddresses - Check services inside the VM:
sudo systemctl status codehero-web - Windows Firewall may block the connection. Add an inbound rule for port 9453.
VM Runs Slowly
- Increase memory:
Set-VMMemory -VMName "codehero" -StartupBytes 8GB - Increase CPUs:
Set-VMProcessor -VMName "codehero" -Count 4 - Disable Dynamic Memory if enabled:
Set-VMMemory -VMName "codehero" -DynamicMemoryEnabled $false
"Default Switch" IP Changes After Reboot
This is normal behavior with the Default Switch. Get the new IP:
Get-VM -Name "codehero" | Select -ExpandProperty NetworkAdapters | Select IPAddresses
For a static IP, consider creating an External Virtual Switch instead of using Default Switch.