It was noticed that when new volatile qcow2 disk is attached to the running KVM VM if the “Image mapping driver” is not explicitly set into qcow2 too the size always has 197 kB size despite what its size was specified in the wizard.
Versions of the related components and OS (frontend, hypervisors, VMs):
libvirt/qemu* on the nodes:
rpm -qa|egrep “libvirt|qemu”
Steps to reproduce:
Attach to the running KVM VM a new volatile disk with “Disk type” = FS, “Filesystem format” = qcow2, Size = 2GB, BUS = Virtio.
‘parted -l’ inside VM (CentOS 7 x64) shows 197kB disk size:
Error: /dev/vdb: unrecognised disk label Model: Virtio Block Device (virtblk) Disk /dev/vdb: 197kB Sector size (logical/physical): 512B/512B Partition Table: unknown Disk Flags:
Hotplugged disk should has 2GB size.
The workaround is to set “Image mapping driver” to qcow2 also.
Another thing what was noticed is that in the VM log file on the node (/var/log/libvirt/qemu/<vmid>.log the corresponding file has a format option set as raw instead of qcow2, i.e. it looks like
and it has qcow3 type instead of qcow2:
file \<path-to-vm-dir>/disk.3 \<path-to-vm-dir>/disk.3: QEMU QCOW Image (v3), 2147483648 bytes