CLOUDSTACK-6170 (VMware root-disk support for managed storage)

This commit is contained in:
Mike Tutkowski 2014-03-31 22:47:34 -06:00
parent 21455222e4
commit 06c0486d0b
2 changed files with 11 additions and 1 deletions

View File

@ -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()) {

View File

@ -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);