Preparing a Linux VM for Conversion from VMware to Hyper-V
Summary
What's needed for this conversion is the addition of kernel modules that support the network and storage systems in Hyper-V. These modules are available for all current supported Linux systems but may not be installed in the initramfs used by the kernel during the boot process. If these modules are not present when a VM boots in Hyper-V the kernel will not be able to transition from the initramfs to complete the boot process.
NOTE: If you are viewing this information on the OIT web site, we recommend visiting the ServiceNow knowledge article for the correct formatting: https://duke.service-now.com/kb_view.do?sysparm_article=KB0038999
NOTE: If your system is Legacy Booted (BIOS) Then you only need to make sure you have relevant kernel modules installed as outlined below. You do not need to be concerned with UEFI configuration mentioned.
Check to see if you have the Hyper-V modules already in your initial ram disk
N.B.: This checks based on running kernel. If you have updated your kernel but not rebooted yet the results will be inaccurate.
There should be THREE results from that grep hv_vmbus, hv_netvsc, and hv_storvsc For example (from Almalinux 9):
If you do NOT have those three modules you will need to add them prior to your system being converted.
Adding required Hyper-V modules and rebuilding your initial RAM disk
Add the modules:
Rebuild your initial RAM disk
Verify that the 3 modules were added:
These daemons communicate VM information to the Hyper-V management system. Install before conversion. If you install after conversion, an additional reboot is required.
N.B.: If you're using pure Debian be sure to confirm updated grub configuration below.
N.B.: Be sure to note the addition of hyper-v daemons on Debian and Ubuntu
Check to see if you have the Hyper-V modules already in your initial ram disk
N.B.: This checks based on running kernel. If you have updated your kernel but not rebooted yet the results will be inaccurate.
There should be THREE results from that grep hv_vmbus, hv_netvsc, and hv_storvsc For example (from Ubuntu 24.04):
If you do NOT have those three modules you will need to add them prior to your system being converted.
Adding required Hyper-V modules and rebuilding your initial RAM disk
Add the modules by editing the file /etc/initramfs-tools/modules to contain the following 3 lines.
Rebuild your initial RAM disk:
Verify that the 3 modules were added to your initial RAM disk:
Adding Hyper-V daemons
These daemons communicate VM information to the Hyper-V management system. Install before conversion. If you install after conversion, an additional reboot is required.
For Debian:
For Ubuntu:
apt-get install linux-cloud-tools-virtual
Check to see if grub is configured in the fallback removable media path:
If that file exists you should be fine. It likely will not exist with default installation options.
Installing grub to removable media path (required for Hyper-V EFI implementation):
This will toggle that option and will reinstall grub in both places. Now you can confirm that it worked by verifying that /boot/efi/EFI/BOOT/BOOTX64.EFI exists.
Verify netplan configuration:
This is a rare occurrence that we've so far only seen with custom installations of Ubuntu systems.
If your network interfaces are using the Consistent Network Device Naming scheme (enXYYY) rather than the legacy scheme (ethX) before conversion you may need to plan to connect to the console of the system if the conversion fails and ensure that the legacy scheme device names are in your netplan configuration. It's not recommended to do this before you schedule conversion as you may have trouble if you need to fall back to the vmware instance of your system for other reasons.
References:
Article number: KB0038999
Valid to: November 20, 2026