You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by mt...@apache.org on 2014/04/01 08:10:14 UTC
git commit: updated refs/heads/master to 06c0486
Repository: cloudstack
Updated Branches:
refs/heads/master 21455222e -> 06c0486d0
CLOUDSTACK-6170 (VMware root-disk support for managed storage)
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/06c0486d
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/06c0486d
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/06c0486d
Branch: refs/heads/master
Commit: 06c0486d0b413da117f9e725967daef686e0d8ea
Parents: 2145522
Author: Mike Tutkowski <mi...@solidfire.com>
Authored: Mon Mar 31 22:47:34 2014 -0600
Committer: Mike Tutkowski <mi...@solidfire.com>
Committed: Tue Apr 1 00:09:53 2014 -0600
----------------------------------------------------------------------
.../com/cloud/storage/resource/VmwareStorageProcessor.java | 8 +++++++-
vmware-base/src/com/cloud/hypervisor/vmware/mo/BaseMO.java | 4 ++++
2 files changed, 11 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/06c0486d/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 7ecc2ac..3d3aa1b 100644
--- a/plugins/hypervisors/vmware/src/com/cloud/storage/resource/VmwareStorageProcessor.java
+++ b/plugins/hypervisors/vmware/src/com/cloud/storage/resource/VmwareStorageProcessor.java
@@ -1585,7 +1585,13 @@ public class VmwareStorageProcessor implements StorageProcessor {
// let vmMo.destroy to delete volume for us
// vmMo.tearDownDevices(new Class<?>[] { VirtualDisk.class, VirtualEthernetCard.class });
- vmMo.destroy();
+
+ if (isManaged) {
+ vmMo.unregisterVm();
+ }
+ else {
+ vmMo.destroy();
+ }
// this.hostService.handleDatastoreAndVmdkDetach(iScsiName, storageHost, storagePort);
if (managedIqns != null && !managedIqns.isEmpty()) {
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/06c0486d/vmware-base/src/com/cloud/hypervisor/vmware/mo/BaseMO.java
----------------------------------------------------------------------
diff --git a/vmware-base/src/com/cloud/hypervisor/vmware/mo/BaseMO.java b/vmware-base/src/com/cloud/hypervisor/vmware/mo/BaseMO.java
index e21591a..430eb6d 100644
--- a/vmware-base/src/com/cloud/hypervisor/vmware/mo/BaseMO.java
+++ b/vmware-base/src/com/cloud/hypervisor/vmware/mo/BaseMO.java
@@ -70,6 +70,10 @@ public class BaseMO {
return _name;
}
+ public void unregisterVm() throws Exception {
+ _context.getService().unregisterVM(_mor);
+ }
+
public boolean destroy() throws Exception {
ManagedObjectReference morTask = _context.getService().destroyTask(_mor);