Summary: LibvirtStorageAdaptor.getPhysicalDisk() to recogize .raw extension

Detail: getPhysicalDisk() was not matching on volumes with .raw, so
instead setting disk format to QCOW2.

BUG-ID: CLOUDSTACK-5018
Bugfix-for:
Reviewed-by:
Reported-by:
Signed-off-by: John Kinsella <jlk@stratosec.co> 1383287538 -0700
This commit is contained in:
John Kinsella 2013-10-31 23:32:18 -07:00
parent 61b77086f4
commit 47641637f6
1 changed files with 2 additions and 0 deletions

View File

@ -426,6 +426,8 @@ public class LibvirtStorageAdaptor implements StorageAdaptor {
disk.setFormat(PhysicalDiskFormat.DIR);
} else if (volumeUuid.endsWith("tar") || volumeUuid.endsWith(("TAR"))) {
disk.setFormat(PhysicalDiskFormat.TAR);
} else if (volumeUuid.endsWith("raw") || volumeUuid.endsWith(("RAW"))) {
disk.setFormat(PhysicalDiskFormat.RAW);
} else {
disk.setFormat(pool.getDefaultFormat());
}