-   Linux - Virtualization and Cloud (
-   -   kvm-qemu-img: qcow2 disk image format changes to raw format in RHEL-KVM 5.6 (

rajivdp 09-08-2011 01:52 AM

kvm-qemu-img: qcow2 disk image format changes to raw format in RHEL-KVM 5.6

I am using RHEL-KVM 5.6 host as VMM and having linux and windows as guest OS. I tried to use the qcow2 disk image as virtual hard disk image instead of raw.

Following are the version of RHEL and rpms used.

Red Hat Enterprise Linux Server release 5.6 (Tikanga)

The qcow2 disk image format is changing to raw disk image format when formatting the qcow2 disk image in Linux or windows guest and also the virtual disk thin provisioning is also not happening as guest OS says that no space left on the device.

[root@RHEL-KVM-178-124 vol_libvirt_nfs_provision]# qemu-img info test_qcow2.img
image: test_qcow2.img
file format: qcow2
virtual size: 10G (10737418240 bytes)

disk size: 140K
cluster_size: 65536
[root@RHEL-KVM-178-124 vol_libvirt_nfs_provision]#

test_qcow2.img is a qcow2 disk image of virtual size is 10 GB. But guest OS view the hard disk size as 0 MB and fails in creating partitions as there is no space left on the device.

The qcow2 disk is not thin provisioning but the raw disk does.

Will the qcow2 format will be used only for snapshot ( backing the actual hard disk image ) or it can be used as an actual hard disk for guest OS ?

Thanks in advance!

Best Regards

jefro 09-08-2011 03:18 PM

It can't be changing to raw. It would require conversion with qemu-img.
I haven't ever noticed that qemu would care if it is raw or other format for the most part.
I might (I forget the name) create the qcow image filled instead of expanding. That is one of the advantages to that format. A small file would grow as you install stuff.

dyasny 09-19-2011 11:23 AM

show the qemu-kvm cmd line and the xml definition file

All times are GMT -5. The time now is 08:58 AM.