Questions tagged [qcow2]
24 questions
8
votes
1 answer
KVM/QEMU/libvirt image path suggestion file system and mount options
As simple KVM server I've got to store raw and qcow2 images on special path like:
/kvm-storage
I want to know what's the best practices for file system and mount options to set this path for achieve better performance.
File system is it better to…
Mohammad Hossein Fattahizadeh
- 245
- 4
- 7
4
votes
2 answers
How to enable zstd for your qcow2 files
In QEMU 5.1 zstd compression of your qcow2 files was introduced.
But it's not described in the manual for qemu-img.
How do you enable it?
MrCalvin
- 659
- 7
- 22
4
votes
1 answer
qemu-img convert burning CPU for nothing
I'm trying to reduce the usage of a qcow2 image. I did the following:
qemu-img convert -p -f qcow2 -O qcow2 my_img.qcow2.backup my_img.qcow2
I outputs 200192 bytes and progress is stuck at 0.00%. CPU usage is pegged at 100% and I let it go for 2…
CrazyCasta
- 825
- 2
- 7
- 13
2
votes
1 answer
What happens if I run a VM while copying the qcow2 file / can I backup by copying the VM file while running?
I'm trying to understand how the write happens with a VM. It looks like running one is not blocked while copying it for a backup. Will the copy contain any modified files like the boot log? Or will it just copy from a 'shadow copy' like on…
alchemy
- 537
- 5
- 16
2
votes
1 answer
Can qemu-img uncompress qcow2 file?
We can use the -c option for qemu-img to compress the qcow2 file, e.g., here, but at the cost of uncompressing it while using. Suppose I am given a compressed qcow2 file, does qemu-img have any option or command to uncompress this qcow2 file?…
zzzhhh
- 135
- 1
- 6
2
votes
1 answer
Set L2 cache for QEMU qcow2 disk in virsh XML
In the QEMU commandline you can set a L2 cache for a disk using l2-cache-size=10M
This option is not supported in Virsh XML but it should be able to use the XML element but I cannot get it to work.
My disk element in my…
MrCalvin
- 659
- 7
- 22
1
vote
1 answer
How to merge common parts of qemu qcow2 disks
I have a qemu image B.qcow2 that is a snapshot of A.qcow2.
I created a copy of B.qcow2 by using cp B.qcow2 C.qcow2 and then worked on both B.qcow2 and C.qcow2 independently. Thus, B.qcow2 and C.qcow2 are eventually different but they have a common…
1
vote
1 answer
After cloning a VM with virt-clone, how do I rename the newly created qcow2 file?
I wanted to build another server based on an existing config, so I performed the following:
[user@box ~]# virt-clone --original serverA-rhel8 --name serverB-rhel8 --auto-clone
Allocating 'serverA-rhel8-1-clone.qcow2' | 200 GB 00:00:16
As you…
a coder
- 3,184
- 9
- 42
- 63
1
vote
1 answer
How to increase the root partition size of a virtual machine used by GNOME Boxes (QEMU)?
I use GNOME Boxes on Fedora 32 to virtualize a Fedora Silverblue installation. I did not setup a sophisticated/smart partitioning for my virtual Fedora and have run out of disk space on my virtual root partition. My objective is to be able to…
justjulian
- 31
- 4
1
vote
1 answer
How to create partitions on qcow2 image without reserving disk size
I want to install archlinux in UEFI mode so, I created image from virt-manager with size of 20GB.
Then after booting into VM, I created 2 partition with fdisk named /dev/vda1 and /dev/vda2 with 512MB and what remained (19.5~GB)
I changed the type of…
user254419
1
vote
0 answers
`qemu-nbd` list phantom partitions
When I mount a qcow2, like qemu-nbd --connect=/dev/nbd0 /path/image.qcow2, fdisk /dev/nbd0 -l lists me partition non visible on /dev/. And when I mount /dev/nbd0 /path It only mount what should be the first partition. And partx -a /dev/nbd0 gives…
aaa
- 157
- 1
- 9
1
vote
0 answers
virsh attach-disk only work with name vd* instead of sd*
I have an qcow2 image and want to attach another disk to it.
# create new qcow2 disk
qemu-img create -f qcow2 vm-disk2 500G
Then I attach it as sdb:
virsh attach-disk myvm /var/lib/libvirt/images/vm-disk2 sdb --persistent --live --subdriver…
Tuyen Pham
- 1,765
- 1
- 16
- 46
1
vote
1 answer
How to clone a single partition from a HD to a qcow2 disk image for use in qemu-kvm?
Edit (1&2):
I cloned my working OS (powered off, HD mounted on USB drive,
> dd if=/dev/sdc1 of=/data/system.img
The original SSD is as follows:
> sfdisk -d /dev/sdc
# partition table of /dev/sdc
unit: sectors
/dev/sdc1 : start= 63, size=…
asoundmove
- 2,465
- 2
- 24
- 27
0
votes
0 answers
cannot import qcow2 image in virt-manager to other vm
I have installed debian to a qcow2 image to prepare it for usage in a paravirtualized vm and have tried to import it on another vm. Virt-manager doesn't give any errors, however from the OVMF bios it refuses to boot the image(after navigating there…
MaxBrandtner
- 23
- 3
0
votes
0 answers
Archive qemu image
How do I archive qemu images with the same efficiency as gcloud
This command stub show efficiency. Around 80% on pre installed images of OSes notorious for their install size. 40g actual physical files on the disk on a fresh install archived as 5g…
John Peterson
- 61
- 1
- 5