cloudstack-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Wido den Hollander <>
Subject KVM always defaulting to QCOW2 image formats
Date Tue, 06 Aug 2013 15:46:12 GMT

I just encountered CLOUDSTACK-4114 [0] during my tests.

I didn't encounter this before, but I just tried to restore from a 
snapshot and there it assumed the snapshot was in QCOW2 format, but it 
is actually a RAW device.

In VolumeDoaImpl this is implemented:

public ImageFormat getImageFormat(Long volumeId) {
     HypervisorType type = getHypervisorType(volumeId);
     if (type.equals(HypervisorType.KVM)) {
         return ImageFormat.QCOW2;
     } else if (type.equals(HypervisorType.XenServer)) {
         return ImageFormat.VHD;
     } else if (type.equals(HypervisorType.VMware)) {
         return ImageFormat.OVA;
     } else {
         s_logger.warn("Do not support hypervisor " + type.toString());
         return null;

Thile QCOW2 is valid when using NFS, it isn't when using either RBD or LVM.

So why does KVM always default to QCOW2?

Where is the best way to override this and have RBD always use RAW?

I'd rather avoid a if pooltype == RBD kind of statement somewhere in the 

For now RBD is using the DefaultPrimary provider.



View raw message