Unable to import vmdk into Proxmox because it’s actually a RAW file

Whilst using qm importdisk you might experience the following problem:

root@hv:~# qm importdisk 123 clients-disk.vmdk nas03
importing disk 'clients-disk.vmdk' to VM 123 ...
iscsiadm: No session found.
transferred 0.0 B of 40.0 GiB (0.00%)
qemu-img: Could not open 'clients-disk.vmdk': invalid VMDK image descriptor
copy failed: command '/usr/bin/qemu-img convert -p -n -f vmdk --target-image-opts clients-disk.vmdk 'file.driver=iscsi,file.transport=tcp,file.initiator-name=XXX,file.lun=12,driver=raw'' failed: exit code 1

The solution is used this command:

qemu-img info [source filename]

You may discover that although the filename ends with .vmdk, it’s actually a RAW  file. So to convert it, do this:

qemu-img convert -f raw clients-disk.vmdk -O qcow2 clients-disk.vmdk

Share this article

Leave a Reply

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

Scroll to Top