[Bug] Migration: disk image is copied successfully but not converted to QCOW2 afterwards
Describe the bug
When migrating a VMware VM, PegaProx successfully copies the disk to the target storage using the direct SSH dd pipe.
However, after the copy has completed, the disk is not converted to QCOW2 before PegaProx tries to attach it to the VM.
The transfer itself completes successfully:
[09:56:23] SSH OK: 16.00 GB
Immediately afterwards, PegaProx runs qm set --virtio0, but the target disk has not been converted to QCOW2.
This causes Proxmox/qemu-img to fail with:
qemu-img: Could not open '/dev/vg-pure-pve-lnx-01/vm-117-disk-0.qcow2':
Image is not in qcow2 format
This workflow was working correctly until Friday, September 11, 2026.
Previously, after copying the image, PegaProx performed the required conversion to QCOW2 before attaching the disk.
The issue appears to be related to the direct SSH dd path used for offline VMs, where the post-transfer QCOW2 conversion is now skipped.
Steps to Reproduce
-
Start a VMware VM migration.
-
Select QCOW2 as the target disk format.
-
Migrate an offline VM.
-
PegaProx switches to the direct SSH
ddtransfer:HTTPS test OK but VM is offline — using direct SSH dd pipe (faster). -
Wait for the disk transfer to complete.
-
The SSH transfer finishes successfully.
-
PegaProx immediately attempts
qm set --virtio0. -
The migration fails because the copied disk has not been converted to QCOW2.
Expected behavior
After the SSH dd transfer completes, PegaProx should convert the transferred disk to QCOW2 before attaching it to the VM.
Expected workflow:
SSH dd transfer
↓
Transfer completed
↓
Convert disk to QCOW2
↓
Attach QCOW2 disk with qm set
↓
Migration completed
This is how the migration behaved previously.
Environment
- PegaProx Version: 1.1.1
- Installation Method: Docker
- Source: VMware
- Target: Proxmox VE 9.2.18
Logs
[09:53:39] Test result: HTTP=206 DL=1048576 FSIZE=1048576
[09:53:39] monitor: block-device target (/dev/vg-pure-pve-lnx-01/vm-117-disk-0.qcow2) — progress estimate degraded, heartbeats only
[09:53:39] HTTPS test OK but VM is offline — using direct SSH dd pipe (faster).
[09:53:39] HTTPS test 0 bytes - skipping HTTPS full download
[09:53:39] SSH dd pipe (16.0 GB)...
[09:53:45] disk0: 3% (0.45/16.00 GB, ~77 MB/s)
[09:54:02] disk0: 13% (2.02/16.00 GB, ~91 MB/s)
[09:54:19] disk0: 22% (3.47/16.00 GB, ~91 MB/s)
[09:54:35] disk0: 32% (5.12/16.00 GB, ~94 MB/s)
[09:54:52] disk0: 42% (6.68/16.00 GB, ~95 MB/s)
[09:55:08] disk0: 53% (8.46/16.00 GB, ~98 MB/s)
[09:55:19] disk0: 61% (9.71/16.00 GB, ~100 MB/s)
[09:55:36] disk0: 71% (11.34/16.00 GB, ~100 MB/s)
[09:55:52] disk0: 82% (13.08/16.00 GB, ~101 MB/s)
[09:56:09] disk0: 91% (14.60/16.00 GB, ~100 MB/s)
[09:56:23] SSH OK: 16.00 GB
[09:56:25] ✗ qm set --virtio0 failed (rc=255):
update VM 117: -virtio0 pure-pve-lnx-01\:vm-117-disk-0.qcow2
qemu-img: Could not open '/dev/vg-pure-pve-lnx-01/vm-117-disk-0.qcow2':
Image is not in qcow2 format
[09:56:25] FAILED: qm set --virtio0 →
update VM 117: -virtio0 pure-pve-lnx-01\:vm-117-disk-0.qcow2
qemu-img: Could not open '/dev/vg-pure-pve-lnx-01/vm-117-disk-0.qcow2':
Image is not in qcow2 format
[09:56:25] Phase: failed
Screenshots
Not applicable. The failure is visible in the migration log above.
Checklist
- [x] I have searched existing issues to make sure this is not a duplicate
- [x] I am using the latest version of PegaProx
Found it, and the date is the clue — this is PVE 9 changing under us rather than anything we shipped.
The allocator tries pvesm alloc <storage> <vmid> vm-117-disk-0 16G with no --format first, and only reaches an explicit --format raw on the third attempt. That was fine for years because LVM could only ever hand back raw. PVE 9 added qcow2 on LVM, so the storage default can now produce a qcow2 volume — which is exactly the .qcow2 suffix in your /dev/vg-pure-pve-lnx-01/ path, on a block device. Then the SSH dd writes a raw VMDK-flat stream into it, and qm set attaches something that claims qcow2 and isn't.
The irony is that the code says what it wants. There's a comment right above that list: "always try raw first... the dd/importdisk path always uses --format raw". The intent was right; it just relied on the storage being incapable of anything else instead of saying so.
So the fix is to ask for raw explicitly rather than inherit a default that changed meaning. No conversion step is needed — dd produces raw and raw is what we want here.
Did you upgrade those nodes around the 11th? You're on 9.2.18 per the error path, and that would tie the timing off neatly.
Marcus · https://opencollective.com/pegaprox if PegaProx is saving you time
Yes, that lines up perfectly. I upgraded the affected Proxmox nodes to PVE 9.2.18 around that time.
Now that you mention it, the migration issue started right after that Proxmox update. Before the upgrade, the same migration workflow was working without any problems.
So your explanation makes sense. I initially assumed it was related to the QCOW2 conversion because of the error message, but the change in PVE 9's LVM behavior explains it much better.
Thanks for tracking this down!
Disk allocation for migrations now asks for raw on every attempt, so Proxmox 9 can no longer hand back a qcow2 volume on LVM for the raw copy to land in. If you pick qcow2 as the target format, the disk is still converted after the copy, and it stays raw if that conversion is not possible. This ships in 1.3.0.
Should you feel like supporting the work: https://opencollective.com/pegaprox
Marcus