mirror of https://github.com/apache/cloudstack.git
in 2.2.x, the absolute path is stored in volume path, while in 3.0.x, only the uuid of volume is used. To be compatible with 2.2.x
This commit is contained in:
parent
46f09b3c34
commit
5e067db78c
|
|
@ -445,7 +445,11 @@ public class LibvirtStorageAdaptor implements StorageAdaptor {
|
|||
public KVMPhysicalDisk getPhysicalDisk(String volumeUuid,
|
||||
KVMStoragePool pool) {
|
||||
LibvirtStoragePool libvirtPool = (LibvirtStoragePool) pool;
|
||||
|
||||
String[] volPaths = volumeUuid.split("/");
|
||||
if (volPaths.length == 4) {
|
||||
//to compatible with 2.2.x, volume path is passed in
|
||||
volumeUuid = volPaths[3];
|
||||
}
|
||||
try {
|
||||
StorageVol vol = this.getVolume(libvirtPool.getPool(), volumeUuid);
|
||||
KVMPhysicalDisk disk;
|
||||
|
|
|
|||
Loading…
Reference in New Issue