Re: qemu-img convert: Compression can not be disabled when converting from .qcow2 to .raw

2024-06-21 Thread Sven Ott
Thanks all, it works with qemu-img resize! On 6/21/24 16:46, Sven Ott wrote: Hi, I want to mount a VM image to a loop device and give it some excess space. To do so, I download a .qcow2 file, add some 0 bytes with truncate, and then convert the image from QCOW2 to RAW format with qemu-img c

Re: qemu-img convert: Compression can not be disabled when converting from .qcow2 to .raw

2024-06-21 Thread Nir Soffer
On Fri, Jun 21, 2024 at 5:48 PM Sven Ott wrote: > Hi, I want to mount a VM image to a loop device and give it some excess > space. > > To do so, I download a .qcow2 file, add some 0 bytes with truncate, and > then convert the image from QCOW2 to RAW format with qemu-img convert, > like so: > > ``

Re: qemu-img convert: Compression can not be disabled when converting from .qcow2 to .raw

2024-06-21 Thread Jakob Bohm via
Dear Sven, Note that qcow2 files contain data saying how large the virtual disk is and what blocks in the virtual disk correspond to what blocks in the qcow2 file. Thus adding extra all-0 blocks at the end of a qcow2 file using generic file manipulation tools like truncate or dd will not cha

Re: qemu-img convert: Compression can not be disabled when converting from .qcow2 to .raw

2024-06-21 Thread Talha Khan
Maybe try first qemu-img resize then use qemu-img convert On Fri, 21 Jun, 2024, 20:18 Sven Ott, wrote: > Hi, I want to mount a VM image to a loop device and give it some excess > space. > > To do so, I download a .qcow2 file, add some 0 bytes with truncate, and > then convert the image from

qemu-img convert: Compression can not be disabled when converting from .qcow2 to .raw

2024-06-21 Thread Sven Ott
Hi, I want to mount a VM image to a loop device and give it some excess space. To do so, I download a .qcow2 file, add some 0 bytes with truncate, and then convert the image from QCOW2 to RAW format with qemu-img convert, like so: ``` GUEST_IMG=focal-server-cloudimg-amd64 wget https://clou