_context.getService().unmountToolsInstaller(_mor);
}
public void redoRegistration(ManagedObjectReference morHost) throws Exception {
String vmName = getVmName();
VirtualMachineFileInfo vmFileInfo = getFileInfo();
boolean isTemplate = isTemplate();
HostMO hostMo;
if(morHost != null)
hostMo = new HostMO(getContext(), morHost);
else
hostMo = getRunningHost();
ManagedObjectReference morFolder = getParentMor();
ManagedObjectReference morPool = hostMo.getHyperHostOwnerResourcePool();
_context.getService().unregisterVM(_mor);
ManagedObjectReference morTask = _context.getService().registerVM_Task(
morFolder,
vmFileInfo.getVmPathName(),
vmName, false,
morPool, hostMo.getMor());
String result = _context.getServiceUtil().waitForTask(morTask);
if (!result.equalsIgnoreCase("Sucess")) {