CLOUDSTACK-3665:KVM specific issue in create volume from snapshot.

This commit is contained in:
Min Chen 2013-07-24 18:34:59 -07:00
parent 44cae46014
commit 2f1d4dd0ba

View File

@ -834,10 +834,10 @@ public class KVMStorageProcessor implements StorageProcessor {
NfsTO nfsImageStore = (NfsTO) imageStore;
String snapshotPath = snapshot.getPath();
int index = snapshotPath.lastIndexOf("/");
snapshotPath = snapshotPath.substring(0, index);
String snapshotName = snapshotPath.substring(index + 1);
String snapshotFullPath = snapshot.getPath();
int index = snapshotFullPath.lastIndexOf("/");
String snapshotPath = snapshotFullPath.substring(0, index);
String snapshotName = snapshotFullPath.substring(index + 1);
KVMStoragePool secondaryPool = storagePoolMgr.getStoragePoolByURI(nfsImageStore.getUrl() + File.separator
+ snapshotPath);
KVMPhysicalDisk snapshotDisk = secondaryPool.getPhysicalDisk(snapshotName);