mirror of
https://github.com/apache/cloudstack.git
synced 2025-12-15 10:02:27 +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 {
|
||||
Connect conn = LibvirtConnection.getConnection();
|
||||
StorageVol v = conn.storageVolLookupByPath(path);
|
||||
int flags = 0;
|
||||
|
||||
int flags = 1;
|
||||
if (conn.getLibVirVersion() > 1001000 && vol.getFormat() == PhysicalDiskFormat.RAW) {
|
||||
flags = 1;
|
||||
}
|
||||
if (shrinkOk) {
|
||||
flags = 4;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user