Pearl1594 commented on code in PR #13101:
URL: https://github.com/apache/cloudstack/pull/13101#discussion_r3191507542
##########
server/src/main/java/com/cloud/template/TemplateManagerImpl.java:
##########
@@ -1237,7 +1278,14 @@ public boolean detachIso(long vmId, Long isoParamId,
Boolean... extraParams) {
_accountMgr.checkAccess(caller, null, true, virtualMachine);
- Long isoId = !isVirtualRouter ? ((UserVm) virtualMachine).getIsoId() :
isoParamId;
+ Long isoId;
+ if (isVirtualRouter) {
+ isoId = isoParamId;
+ } else {
+ Long primaryIsoId = ((UserVm) virtualMachine).getIsoId();
+ List<VmIsoMapVO> extras = _vmIsoMapDao.listByVmId(vmId);
+ isoId = resolveIsoIdForDetach(primaryIsoId, extras, isoParamId);
+ }
Review Comment:
I guess this answers my question before of having both vm.iso_id and vm
mapped to multiple ISOs
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]