1

Hy everyone,

the search function does not come up with a propper solution. I want to convert a old KVM disk QCOW2 to an compatible Ctrix Xen disk e.g. VMDK with that qemu-img converting tool

qemu-img convert -f qcow2 -O vmdk /mnt/itstuff/disk.qcow2 /mnt/itstuff/disk_conv.vmdk

but this is not working for me. I got the following error:

qemu-img: Could not open '/mnt/itstuff/disk.qcow2': Invalid argument qemu-img: Could not open '/mnt/itstuff/disk.qcow2'

Any ideas?

regards Thomas

0

Assuming your source file is present, accessible and not currently used by a running VM, the problem can be due to the source file not being a valid Qcow2 one (ie: maybe it is a raw file with a wrong .qcow2 extension)

Try omitting the source format parameter, issuing qemu-img convert -O vmdk /mnt/itstuff/disk.qcow2 /mnt/itstuff/disk_conv.vmdk

If that does not work, please provide additional information by issuing qemu-img info /mnt/itstuff/disk.qcow2

8
  • Thanks for your help. File is present, accessible and a copy of that VM (so its not used). I tried your suggestion "qemu-img convert -O vmdk /mnt/itstuff/disk.qcow2 /mnt/itstuff/disk_conv.vmdk qemu-img: error while writing sector 16384: Invalid argument
    – rcpe
    May 13 '19 at 10:41
  • root@kvm01:/mnt/itstuff# qemu-img info /mnt/itstuff/disk.qcow2 image: /mnt/itstuff/disk.qcow2 file format: raw virtual size: 10G (10737418240 bytes) disk size: 10G
    – rcpe
    May 13 '19 at 10:44
  • Ah I changed the writing path to a local one. Now its running. I´ll keep you updated. Thanks for the help so far :)
    – rcpe
    May 13 '19 at 10:53
  • @rcpe so your qemu-img info shows you are dealing with a raw file, rather than a qcow2 one.
    – shodanshok
    May 13 '19 at 11:03
  • Thanks this helped out.
    – rcpe
    May 14 '19 at 11:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.