mirror of https://github.com/apache/cloudstack.git
for detachISO command, iso for this VM is removed in DB even if the detachISO fails. Then after stop/start VM , the iso for this VM is gone
This commit is contained in:
parent
9614a64636
commit
88ff55849d
|
|
@ -1185,14 +1185,14 @@ public class TemplateManagerImpl implements TemplateManager, Manager, TemplateSe
|
|||
VMTemplateVO iso = _tmpltDao.findById(isoId);
|
||||
|
||||
boolean success = _vmMgr.attachISOToVM(vmId, isoId, attach);
|
||||
if ( success ) {
|
||||
if (attach) {
|
||||
vm.setIsoId(iso.getId());
|
||||
} else {
|
||||
vm.setIsoId(null);
|
||||
}
|
||||
if ( success && attach) {
|
||||
vm.setIsoId(iso.getId());
|
||||
_userVmDao.update(vmId, vm);
|
||||
}
|
||||
}
|
||||
if ( !attach ) {
|
||||
vm.setIsoId(null);
|
||||
_userVmDao.update(vmId, vm);
|
||||
}
|
||||
return success;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue