Migrating VMs from Hyper-V to Proxmox
Migrating virtual machines from Hyper-V to Proxmox allows you to take advantage of Proxmox VE’s open-source flexibility and robust virtualization features. Since Hyper-V uses VHDX/AVHDX disk formats while Proxmox relies on QCOW2 or RAW, a conversion process is required. This guide provides a clear, step-by-step approach to exporting the VM, converting the disk, and setting up the VM in Proxmox while maintaining performance and compatibility.
1. Prepare Environment
– Ensure Proxmox VE is installed and network/storage is configured.
– Install qemu-utils
on a system with access to both Hyper-V and Proxmox:
apt install qemu-utils
2. Export VM from Hyper-V
– Shut down the VM in Hyper-V.
– Open Hyper-V Manager → Export to generate a clean AVHDX file.
3. Convert AVHDX to QCOW2
– Use qemu-img
to convert the disk format:
qemu-img convert -f vhdx -O qcow2 /path/to/vm.avhdx /path/to/vm.qcow2
– Transfer the QCOW2 file to Proxmox storage via SCP, NFS, or another method.
4. Create VM in Proxmox
– In Proxmox Web GUI: Create a new VM (leave disk unassigned).
– Match CPU, RAM, and network settings to the original VM.
– Import the converted disk:
qm importdisk <vmid> /path/to/vm.qcow2 <storage> -format qcow2
– Attach the disk to the VM: Hardware → Add → Use existing disk.
5. Adjust VM Configuration
– Set Boot Order to the imported disk.
– Change BIOS to OVMF (UEFI) if the original VM used UEFI boot.
– Install VirtIO drivers (required for Windows VMs):
- Attach VirtIO ISO to the VM.
- Install necessary drivers inside the guest OS.
6. Test and Finalize
– Start the VM in Proxmox.
– Fix boot issues if needed (e.g., Windows recovery ISO for boot repair).
– Verify functionality and delete the original Hyper-V VM if migration is successful.
Key Tips
– Always backup the AVHDX file before conversion.
– Ensure network settings (VLANs, static IPs) match the original VM.
– For Windows VMs, uninstall Hyper-V tools post-migration.
Summary
Migrating VMs from Hyper-V to Proxmox requires exporting the VM, converting its disk format, and configuring it in Proxmox. Key steps include matching hardware settings, ensuring network compatibility, and installing VirtIO drivers for optimal performance. Proper backups and testing are essential to avoid issues post-migration.