From 2f1d4dd0ba894d1a418ac3c5c7812bde20fe18f5 Mon Sep 17 00:00:00 2001 From: Min Chen Date: Wed, 24 Jul 2013 18:34:59 -0700 Subject: [PATCH] CLOUDSTACK-3665:KVM specific issue in create volume from snapshot. --- .../cloud/hypervisor/kvm/storage/KVMStorageProcessor.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/storage/KVMStorageProcessor.java b/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/storage/KVMStorageProcessor.java index 25c94f76c95..3a5e803c143 100644 --- a/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/storage/KVMStorageProcessor.java +++ b/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/storage/KVMStorageProcessor.java @@ -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);