cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sate...@apache.org
Subject git commit: updated refs/heads/master to a470b33
Date Wed, 07 Aug 2013 14:56:22 GMT
Updated Branches:
  refs/heads/master a6076818e -> a470b33f9


CLOUDSTACK-3616 [VMware] Failed to create template from volume (volume is created from snapshot
of data volume)

Signed-off-by: Sateesh Chodapuneedi <sateesh@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/a470b33f
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/a470b33f
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/a470b33f

Branch: refs/heads/master
Commit: a470b33f971c1ea06f0d982e817c81d317767807
Parents: a607681
Author: Sateesh Chodapuneedi <sateesh@apache.org>
Authored: Wed Aug 7 14:49:32 2013 +0530
Committer: Sateesh Chodapuneedi <sateesh@apache.org>
Committed: Wed Aug 7 14:56:08 2013 +0530

----------------------------------------------------------------------
 .../com/cloud/storage/resource/VmwareStorageProcessor.java   | 8 ++++++++
 1 file changed, 8 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/a470b33f/plugins/hypervisors/vmware/src/com/cloud/storage/resource/VmwareStorageProcessor.java
----------------------------------------------------------------------
diff --git a/plugins/hypervisors/vmware/src/com/cloud/storage/resource/VmwareStorageProcessor.java
b/plugins/hypervisors/vmware/src/com/cloud/storage/resource/VmwareStorageProcessor.java
index e5727bb..be92282 100644
--- a/plugins/hypervisors/vmware/src/com/cloud/storage/resource/VmwareStorageProcessor.java
+++ b/plugins/hypervisors/vmware/src/com/cloud/storage/resource/VmwareStorageProcessor.java
@@ -740,6 +740,14 @@ public class VmwareStorageProcessor implements StorageProcessor {
                     s_logger.debug("Unable to find the owner VM for CreatePrivateTemplateFromVolumeCommand
on host " + hyperHost.getHyperHostName() + ", try within datacenter");
                 vmMo = hyperHost.findVmOnPeerHyperHost(volume.getVmName());
 
+                if (vmMo == null) {
+                    // This means either the volume is on a zone wide storage pool or VM
is deleted by external entity.
+                    // Look for the VM in the datacenter.
+                    ManagedObjectReference dcMor = hyperHost.getHyperHostDatacenter();
+                    DatacenterMO dcMo = new DatacenterMO(context, dcMor);
+                    vmMo = dcMo.findVm(volume.getVmName());
+                }
+
                 if(vmMo == null) {
                     String msg = "Unable to find the owner VM for volume operation. vm: "
+ volume.getVmName();
                     s_logger.error(msg);


Mime
View raw message