Migrating a Linux VM from VMWare Workstation to Hyper-V

Categories: Linux

The following is a quick guide to migrating an OpenSuse Linux VMs on VMWare Workstation to Hyper-V.

Preparations

  1. Create snapshot (as a backup in case something goes wrong)
  2. Remove VMWare Tools
  3. add dracut Config:
/etc/dracut.conf.d/00-custom.conf 

and add the following line. Do not forget the spaces before and after the modules!

add_drivers+=" hv_vmbus hv_storvsc hv_netvsc hv_utils hv_balloon hyperv-keyboard hyperv_fb hid-hyperv "

recreate initrd

mkinitrd

test loading of hyper-v modules

lsinitrd |grep ko|grep hv

Export

  1. Export VM to OVF file
  2. Download, install and run starwind V2V Converter
  3. Source: local file
  4. Select VMDK file
  5. Set destination (in this case Hyper-V server
  6. Enter host name, if necessary user name, password
  7. Create new VM
    • Enter name
    • Select path where VM should be stored in a subfolder (VM name)
    • Set CPU, RAM
    • Select G1 (if source is not a UEFI system)
    • Select network connection
  8. Select VHDX growable image
  9. Confirm destination and start conversion.

If the original VM has several virtual HDs, the process must be repeated for each additional HD, but then the VM already created on the Hyper-V host must be selected and a new VM must not be created in each case.

If an error message about the non-existent restore image appears during booting, this must be removed in the boot loader and, if necessary, created again later.

«
»

    Leave a Reply

    Your email address will not be published. Required fields are marked *