Hyper-V (VM)

Basic installation finished?

Please read first the → Basic Installation!

The archive contains the DietPi README.md, the .vhdx virtual disk image and a hash.txt, which contains hashes to check the integrity of the virtual disk image. Move the .vhdx file to the desired virtual machine folder on your harddisk.

Add a Hyper-V virtual machine

Next, a Hyper-V machine needs to be created. Start the Hyper-V-Manager, right click on your PCs node in the left tree and open the dialog wizard for the machine generation (“New” → “Virtual Machine”):

Hyper-V machine generation

In the following wizard you have to set the following:

  1. Give your machine a name (“Specify Name and Location”)
  2. Select the Hyper-V Generation: Select Generation 1 (“Specify Generation”)
  3. Choose your RAM size (e.g. 2048 MB)
  4. If you have already configured a network, select your network. Otherwise let it “Not connected” and change it afterwards
  5. Choose to use the extracted .vhdx Hyper-V disc file (see above)

If you have not set up any network connection, go on with the Virtual Switch Manager and add a network. Select that network in your virtual machine settings afterwards.

Hyper-V network management

First boot of the new Hyper-V machine

First, click on Connect to open a window of the virtual machine:

Hyper-V machine connection

Then press Start to boot up the machine:

Hyper-V machine start

After this, your machine should boot up.

You must disable IPv6 when the host uses WiFi

Sometimes the VM has difficulties to connect to the internet. This is reported in a network bridged mode and when the host connects to the internet via WiFi: In these cases the IPv6 routing between the VM and the internet fails (e.g. see there).
A typical result is, that the system does not find the update server (e.g. at the very first update run). This is then signaled during the “apt update” procedure of the first boot startup.
To overcome this, open a subshell (or an additional ssh window), start dietpi-config and disable IPv6 within the Network options.

IPv6 deactivate screenshot

Then exit dietpi-config. After this the first time installer procedure should run again from the start.

Additional information / troubleshooting

Network connection not found

In the case that you did not setup your network configuration properly, the booting procedure will not find a network connection and may respond with this boot console output:

Hyper-V boot without network

Then you have to check and repair your network configuration within the Virtual Switch Manager.

Generate a Hyper-V Generation 2 machine

An option to get a Hyper-V Generation 2 machine is to generate your own Hyper-V image via a Debian network installation (booting the Hyper-V machine from a Debian netinst.iso installer like you would do it on a PC). Install a minimal Debian machine (i.e. no X11 desktops, etc.). Afterwards run the procedure described in section “Make your own distribution”. Generation 2 machines support (and require) to boot in UEFI mode, support Secure Boot, TPM, use modern SCSI controllers and have higher hardware limits. For use as a home server, however, you will not need any of these functions.

Continue with LoxBerry Installation