3 minutes
Lessons Learned - HyperV -> Proxmox
Recently, I undertook the challenge of migrating ~25 Hyper-V virtual machines (VMs) to Proxmox. You might ask, Why? My response? Why not?
- Gain hands-on experience with Proxmox.
- Deploy a modern, lightweight, bare-metal hypervisor.
- Benefit from built-in features like encryption and backup capabilities.
- Ensure high availability and reliability—aiming for five nines (99.999%) uptime.
- Avoid costly licensing fees for solutions like VMware ESXi.
Looking back, I believe I made the right choice. If I had to do it all over again, I absolutely would. But as with any large migration, there were challenges—chief among them was converting Hyper-V’s .vhdx disk format into something Proxmox could use natively.
Hyper-V uses .vhdx
(Virtual Hard Disk) files, while Proxmox supports multiple disk formats, including:
- RAW (ideal for performance but takes up more space)
- QCOW2 (offers snapshots and compression benefits)
Since I wanted efficient storage and snapshot support, I opted for the QCOW2 format. But how do you actually convert a .vhdx
file to .qcow2
?
The Code
Step 1: Convert the .vhdx
file to .qcow2
To convert the Hyper-V .vhdx image to a Proxmox-compatible .qcow2 image, I used the qemu-img tool:
qemu-img convert -O qcow2 HyperVImageName.vhdx vm-<vmid>-disk-1.qcow2
Let’s break it down
qemu-img convert
-> Converts a virtual disk image to another format.-O qcow2
-> Specifies the output format as QCOW2.HyperVImageName.vhdx
-> The original .vhdx file from Hyper-V.vm-<vmid>-disk-1.qcow2
-> The new file name following Proxmox’s VM disk naming convention.
Step 2: Shove that disk into Proxmox
Once the conversion is complete, you can import the new .qcow2
image into your respective virtual machine:
qm importdisk <vmid> vm-<vmid>-disk-1.qcow2 <storage_id>
Parameters
<vmid>
: Replace this with the ID of the virtual machine you want to associate the image with.<HyperVImageName.vhdx>
: Replace this with the name of the.vhdx
image you transferred over.<storage-id>
: Replace this with the name of the storage you want the.qcow2
image to l
Step 3: Attach the disk
Now that the disk is imported, we need to attach it to the VM:
- Open the Proxmox Web UI.
- Navigate to the VM → Hardware section.
- Click Add → Existing Disk and select the imported .qcow2 image.
- Set the appropriate bus type (e.g., VirtIO for best performance).
- Save changes and start up VM
But… how long?
Conversion time is completely dependant on disk size and disk speed. For me on 10k SAS drives and disk sizes ranging from 300GB -> 400GB took about 30 minutes. I would say you’re looking at 30 minutes -> 120 minutes.
Obviously with faster drives (NVMe, or even SSD’s) you’ll see a reduction in conversion time.
Post-Mal…Migration Checklist
You’ll want to confirm the following after you’ve successfully booted up your VM. Also, if you haven’t installed VirtIO drivers yet, now is the time do so.
- Reconfigure Network Settings -> Hyper-V and Proxmox use different network adapters, so Windows VMs may need driver updates (virtio-net).
- Install VirtIO Drivers -> If using VirtIO for storage or network interfaces, install the appropriate drivers for optimal performance.
- Enable QEMU Guest Agent -> This helps with graceful shutdowns and monitoring inside Proxmox.
- Re-check Disk Performance -> If performance is lagging, consider converting disks to RAW format.
- Multiple disks? -> If there are multiple disks that need to be attached to a VM, be sure to increment the disk number in the new file name, such as
vm-<vmid>-disk-2.qcow2
and so on.
Final Thoughts
Migrating from Hyper-V to Proxmox was a rewarding challenge. Not only did I gain experience with Proxmox, but I also ended up with a cost-effective, open-source, and enterprise-grade virtualization setup.
Would I do it again? Absolutely. If you’re considering moving to Proxmox, I highly recommend it!
Until next time!