Skip to main content

Microsoft Hyper-V

Hyper-V runs the VHDX image as a Generation 2 virtual machine. You extract the disk, create the machine with the New Virtual Machine wizard or PowerShell, and give it your SSH key on a seed ISO. Two settings the wizard never asks about must be changed before the first start: the Secure Boot template and the number of processors.

Before you start​

  • Hyper-V on Windows Server 2025 or Windows 11 Pro, and the right to create virtual machines on it.
  • Room for the machine: 2 vCPU, 6 to 8 GB of memory, and 40 GB or more of disk. The Hardware floor of 4 GB runs, but Hyper-V's memory demand for the machine peaks above it; give it 6 to 8 GB, or turn on Dynamic Memory.
  • A virtual switch on your network, usually an External switch, with DHCP on that network.
  • Your SSH public key: the one line in the .pub file, such as ~/.ssh/id_ed25519.pub.
  • The file: the VHDX, antelao-ohm-<version>-amd64.vhdx.zip.

Download​

Download the VHDX zip from the table on the overview page, with SHA256SUMS, then check it before you extract it. In PowerShell, in the folder you downloaded it to:

(Get-FileHash -Algorithm SHA256 .\antelao-ohm-<version>-amd64.vhdx.zip).Hash.ToLower()
Select-String -Path .\SHA256SUMS -Pattern 'vhdx.zip'

The two checksums must be the same. SHA256SUMS lists all three images; compare only the .vhdx.zip line. To check the signature on SHA256SUMS as well, see Verify the download.

Then extract the zip, with Extract All in Explorer or with PowerShell:

Expand-Archive -Path .\antelao-ohm-<version>-amd64.vhdx.zip -DestinationPath C:\Hyper-V\odoo-1

You get one file, antelao-ohm-<version>-amd64.vhdx, about 7 GB, growing up to 40 GB. Put it where the machine's disk should live. It becomes the machine's disk, so extract a fresh copy for every machine and keep the zip.

Give it your SSH key​

Hyper-V has no field for an SSH key, so you hand the key over on a seed ISO.

  1. Build seed.iso with the seed ISO builder on the overview page. It runs in your browser on Windows too; Windows has no tool of its own that makes one.
  2. Save it next to the VHDX, for example C:\Hyper-V\odoo-1\seed.iso.

The next section attaches it.

No seed? The machine's own screen shows the console address and a one-time sign-in code after the first boot.

Import​

Hyper-V Manager​

  1. Action > New > Virtual Machine.
  2. Specify Name and Location: a name, for example odoo-1.
  3. Specify Generation: Generation 2.
  4. Assign Memory: Startup memory 6144 to 8192 MB, or 4096 MB with Use Dynamic Memory for this virtual machine ticked.
  5. Configure Networking: your virtual switch.
  6. Connect Virtual Hard Disk: Use an existing virtual hard disk, and Browse to the extracted .vhdx.
  7. Summary: Finish. Do not start the machine yet.

Then right-click the machine and choose Settings:

  1. Security: keep Enable Secure Boot ticked and set Template to Microsoft UEFI Certificate Authority. The default, Microsoft Windows, does not boot the image; see below.
  2. Processor: Number of virtual processors 2. The wizard creates 1.
  3. SCSI Controller: select DVD Drive and click Add. Under Media, choose Image file and Browse to seed.iso. A Generation 2 machine has no IDE controller, so the drive goes on the SCSI controller.
  4. Firmware: leave the boot order as it is, the hard drive first. The seed is a data disc and does not need to boot.
  5. Click OK.

PowerShell​

The same, in an elevated PowerShell on the Hyper-V host:

New-VM -Name odoo-1 -Generation 2 -MemoryStartupBytes 6GB `
-VHDPath C:\Hyper-V\odoo-1\antelao-ohm-<version>-amd64.vhdx -SwitchName '<your switch>'
Set-VMProcessor -VMName odoo-1 -Count 2
Set-VMFirmware -VMName odoo-1 -EnableSecureBoot On -SecureBootTemplate MicrosoftUEFICertificateAuthority
Add-VMDvdDrive -VMName odoo-1 -Path C:\Hyper-V\odoo-1\seed.iso
Start-VM -Name odoo-1

Add-VMDvdDrive puts the seed on the SCSI controller, at location 1. For Dynamic Memory instead of a fixed amount, add:

Set-VMMemory -VMName odoo-1 -DynamicMemoryEnabled $true -MinimumBytes 512MB -StartupBytes 4GB -MaximumBytes 1TB

Start it and wait for the first boot​

Right-click the machine, choose Connect, then Start. After about 40 seconds the screen shows Debian GNU/Linux 13 and a login prompt with the machine's name.

The login prompt appearing does not mean the work is done. The first boot installs the server in the background, which takes about 4 minutes, longer on a slow connection or slow disks. It needs the internet. Sign in over SSH meanwhile and the login message says how far it is.

Kernel messages print over the login prompt while the first boot runs, such as hv_balloon: Max. dynamic memory size and Failed to query local AF_VSOCK CID. Nothing is wrong: press Enter for a fresh login: line.

The machine's address shows in Hyper-V once the machine has one:

(Get-VMNetworkAdapter -VMName odoo-1).IPAddresses

Reach the console​

Sign in over SSH as debian with your key:

ssh debian@192.0.2.10

The login message is shown when you sign in over SSH, not on the machine's screen. Nobody can sign in on that screen with a key alone. Once the first boot is done, the login message shows the console's address. Read the administrator's first password:

sudo cat /root/antelao-ohm-handoff.json

Then open the console through an SSH tunnel from your own computer, which opens no port on the machine. Windows 10 and 11 have ssh built in:

ssh -N -L 5322:127.0.0.1:5322 debian@192.0.2.10

Browse to https://localhost:5322/ and accept the self-signed certificate once. From here, carry on with the installation page:

  1. Check the server
  2. Reach the console
  3. Sign in and finish the setup
  4. Create your first instance

Platform notes and troubleshooting​

The signed image's hash is not allowed (DB)​

The machine stops at Virtual Machine Boot Summary with The signed image's hash is not allowed (DB) and No operating system was loaded:

The Secure Boot template is still Microsoft Windows, which does not accept the image's boot loader. Turn the machine off, set Settings > Security > Template to Microsoft UEFI Certificate Authority, and start it again. In PowerShell:

Set-VMFirmware -VMName odoo-1 -SecureBootTemplate MicrosoftUEFICertificateAuthority

Secure Boot stays on: the image boots under it with this template.

Other problems​

  • Only one processor. The wizard creates 1; set 2 under Settings > Processor while the machine is off.
  • SSH refuses the key. Sign in as debian, and check that the seed held your public key. The seed is read at the first boot only, so create the machine again from a fresh copy of the VHDX.
  • Nothing reaches the server from outside your network. Ports 80 and 443 must reach the machine before Let's Encrypt can issue certificates for your instances. Keep the console's port 5322 closed.
  • The first boot failed. The login message says FAILED with the reason. See What the first boot does for how to run it again.
  • The seed ISO afterwards. Leave it attached: a machine whose seed disappears looks new to cloud-init at its next start, as Keep the seed attached explains. It holds a hash of your password, if you gave one, so keep the ISO file where only administrators can reach it.