On 11/13/2017 11:14 AM, Peter Maydell wrote:> I have a qcow v1 file which I created by mistake (forgetting that > you need to tell qemu-img create 'qcow2' and not just 'qcow'), > which I want to convert to a v2 file so I can put snapshots into > it. But when I try to do this with qemu-img convert it creates a > v3 file instead: > > $ file hda-old.qcow > hda-old.qcow: QEMU QCOW Image (v1), 5368709120 bytes > $ build/x86/qemu-img convert -O qcow2 hda-old.qcow hda.qcow2 > $ file hda.qcow2 > hda.qcow2: QEMU QCOW Image (v3), 5368709120 bytes > > and if you then try to use that in QEMU it complains: > > qemu-system-aarch64: -drive if=none,file=hda.qcow2,format=qcow,id=hd: > Unsupported qcow version 3 > > What am I missing here? qcow2 has two versions; v2 (aka compat=0.10), and v3 (aka compat=1.1). We changed qemu-img to create v3 by default several years ago, but there are older qemu binaries (hello, CentOS 6) that still don't understand v3. Your qemu-system-aarch64 appears to be one of these older binaries.
Try: qemu-img convert -O qcow2 -o compat=0.10 hda-old.qcow hda.qcow2 -- Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3266 Virtualization: qemu.org | libvirt.org
signature.asc
Description: OpenPGP digital signature