Categories
HyperV Linux Proxmox

Migrate virtual machine from Proxmox to Hyper-V

Migrate virtual machine from Proxmox to Hyper-V is a simple thing.

If you have a RedHat based OS like Centos, Fedora or Oracle Linux on the first step you must use dracout to add all of drivers to your OS.

  1. Log in to the VM which you want to migrate and type as root :
# dracut --force --no-hostonly

This command generate all of kowns drivers to your initramfs. It is importand because on migrate you change a hardware (kvm to hyperv).

2. Go to Backup and take backup this VM. Now choose mode as Stop and Compression none.

3. When backup was created you must log in to Proxmox as root and go to

# cd /var/lib/vz/dump

and type:

# vma extract dumpfile.vma ./vhd

# cd ./vhd

# qemu-img convert -f raw -O vpc disk-drive-scsi0.raw hyperv_disk.vhd

4. Now copy hyperv_disk.vhd to yours Hyper-V machine, create new VM and add this disk. After start this VM you must log as root and type:

# dracut --force

to generate new initramf files with drivers for Hyper-V

One reply on “Migrate virtual machine from Proxmox to Hyper-V”

Great,that’s what i was looking for!

Comments are closed.