Hi,

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 code.

For now RBD is using the DefaultPrimary provider.

Wido

[0]: https://issues.apache.org/jira/browse/CLOUDSTACK-4114

Reply via email to