mirror of
https://github.com/apache/cloudstack.git
synced 2025-12-16 10:32:34 +01:00
CLOUDSTACK-6225: Check libvirt version and volume format before
adding flag VIR_STORAGE_VOL_RESIZE_ALLOCATE to resize volume libvirt call
This commit is contained in:
parent
991e1eb6b1
commit
c874e20c24
@ -1804,8 +1804,11 @@ public class LibvirtComputingResource extends ServerResourceBase implements Serv
|
|||||||
try {
|
try {
|
||||||
Connect conn = LibvirtConnection.getConnection();
|
Connect conn = LibvirtConnection.getConnection();
|
||||||
StorageVol v = conn.storageVolLookupByPath(path);
|
StorageVol v = conn.storageVolLookupByPath(path);
|
||||||
|
int flags = 0;
|
||||||
|
|
||||||
int flags = 1;
|
if (conn.getLibVirVersion() > 1001000 && vol.getFormat() == PhysicalDiskFormat.RAW) {
|
||||||
|
flags = 1;
|
||||||
|
}
|
||||||
if (shrinkOk) {
|
if (shrinkOk) {
|
||||||
flags = 4;
|
flags = 4;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user