Search notes:

Windows: Hyper-V

Hyper-V provides hardware virtualization, that is: each virtual machine run on its own virtual hardware, such as virtual hard drives, devices etc.
Hyper-V is available on all but the home edition of 64-bit version of Windows 10.
Hyper-V is an optional feature.
If virtualization is enabled, not only the guest operating systems, but the host OS itself runs on top of the Hyper-V virtualization layer. Yet, the host OS still has full control over all hardware.
Apparently, this architecture is referred to as hypervisor level 1.
Every Hyper-V based VM is associated with a VHDx file.

Enabling Hyper-V

Use an elevated PowerShell console to check if Hyper-V is enabled:
PS:\> get-windowsOptionalFeature -online | where-object {$_.featureName -like "*Hyper-V*"} | format-table
The Processor needs SLAT (Second Level address translation) to use Hyper-V.
In PowerShell
PS C:\> enable-windowsOptionalFeature -online -featureName Microsoft-Hyper-V -all
Do you want to restart the computer to complete this operation now?
…
In cmd.exe with Dism.exe
dism /online /enable-feature /all /featureName:Microsoft-Hyper-V
When Hyper-V is enabled, the link Hyper-V Manager is added to the Start Menu (C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Administrative Tools).
This link runs mmc.exe with virtmgmt.msc

TODO

What does the following output mean:
C:\> systeminfo | findstr Hyper-V
…
Hyper-V Requirements:      A hypervisor has been detected. Features required for Hyper-V will not be displayed.
With elevated privileges:
C:\> dism /online /get-features | find "Microsoft-Hyper-V"  | sort
Feature Name : Microsoft-Hyper-V
Feature Name : Microsoft-Hyper-V-All
Feature Name : Microsoft-Hyper-V-Hypervisor
Feature Name : Microsoft-Hyper-V-Management-Clients
Feature Name : Microsoft-Hyper-V-Management-PowerShell
Feature Name : Microsoft-Hyper-V-Services
Feature Name : Microsoft-Hyper-V-Tools-All
Does the following command turn of Hyper-V completely?
bcdedit.exe /set hypervisorlaunchtype off

Trying to install Windows 11

The boot loader failed (After displaying Start PXE over IPv4)

When trying to install Windows 11, I was first shown Start PXE over IPv4 and then, I've received the error 1) The boot loader failed, 2) A boot image was not found or 3) The boot loader did not load an operating system, followed by No operating system was loaded. Your virtual machine may be configured incorrectly. Exit an re-configure your VM or click restart to retry the current boot sequence again:
It turns out that in order to load the ISO file, a key must be pressed before (or shortly after?) the boot process has started.

Update 2025-07-25 / Windows 11 host

While the mentioned fix worked on a Windows 10 host where I tried to install Windows 11, it didn't work anymore on a Windows 11 host where I also tried to install Windows 11.

Alternatively: set delay option

In a virtual machine's settings, at the bottom, in Automatic Start Action, a value for Automatic start delay can be configured (the default seems to be 0 seconds).
I tried to increase it to 10 seconds, but it didn't help on the Windows 11 host (2025-07-25).
This is likely not surprising as this setting is supposed to reduce resource contention between virtual machines.

This PC doesn't curretly meet Windows 11 system requirements

In order to install Windows 11, the setting Enable Trusted Platform Module (found under Security) needs to be set.

Let's connect you to a network

During the installation process, I was asked to connect to a network.
I wanted to skip this step, so I pressed shift+F10 which opened a cmd.exe Window where I typed
C:\Windows\System32> oobe\bypassnro
After rebooting, the user can click on a text that says I don't have internet which then skips this step.

Network

After Windows 11 was installed and I logged in for the first time, there was no internet connection. (I am not sure if this is related to the previous point).
In order for the guest to have Internet, in the Hyper-V Manager, I went to Actions (top right pane), chose Virtual Switch Manager, selected External and pressed the button Create Virtual Switch.
The drop-down suggested a (unconnected WiFi connection), so I had to select the (connected) Ethernet connection.
After creating the new virtual switch, I assigned it to the guest and rebooted.

Further observations

After installing Windows 11 24H2, it required 22 GB of disk.

Drivers

Some drivers that are required for Hyper-V include

Linux kernel source code

The source code of the Linux kernel Stores Hyper-V related code in
Some of the «individual files» can be identified in the Hyper-V/Azure CORE AND DRIVERS section of the MAINTAINERS file:
$ sed -n '/Hyper-V\/Azure CORE AND DRIVERS/,/^\s*$/p' MAINTAINERS  | grep '^F:'

See also

Windows: Virtualization
A subset of Hyper-V, the Virtual Machine Platform, is used to run WSL 2.
The C:\Program Files\Hyper-V directory with VMCreate.exe which can be used to quickly create Hyper-V virtual machines.
virtmgmt.msc is the Hyper-V Manager.
Docker (on Windows) runs on top of Hyper-V.
The value of A hypervisor under System Summary in msinfo32.exe
usbipd.exe shares locally connected USB devices to Hyper-V.
In Windows Subsystem for Linux, /sys/bus/vmbu represents the bus to Hyper-V.
C:\ProgramData\Microsoft\Windows\Hyper-V
Windows Sandbox (another optional feature) runs on top of Hyper-V.
Running Hyper-V and VirtualBox VM is problematic (and in an earlier version of VirtualBox was even mutually exclusive as I have discovered when I installed a Windows Subsystem for Linux distribution) distribution).

Index

Fatal error: Uncaught PDOException: SQLSTATE[HY000]: General error: 8 attempt to write a readonly database in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php:78 Stack trace: #0 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(78): PDOStatement->execute(Array) #1 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(30): insert_webrequest_('/notes/Windows/...', 1758207683, '216.73.216.150', 'Mozilla/5.0 App...', NULL) #2 /home/httpd/vhosts/renenyffenegger.ch/httpsdocs/notes/Windows/optional-features/Hyper-V/index(214): insert_webrequest() #3 {main} thrown in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php on line 78