mirror of
https://github.com/apache/cloudstack.git
synced 2025-11-03 04:12:31 +01:00
bug 8474: fix attaching ISO to xenserver vm
status 8474: resolved fixed
This commit is contained in:
parent
3d493f2083
commit
4fe6219754
@ -1170,11 +1170,9 @@ public class TemplateManagerImpl implements TemplateManager, Manager, TemplateSe
|
||||
|
||||
String errMsg = "Unable to attach ISO" + isoId + "to virtual machine " + vmId;
|
||||
userId = accountAndUserValidation(account, userId, vmInstanceCheck, iso, errMsg);
|
||||
|
||||
VMInstanceVO vm = ApiDBUtils.findVMInstanceById(vmId);
|
||||
VMTemplateVO vmTemplate = ApiDBUtils.findTemplateById(vm.getTemplateId());
|
||||
if ("xen-pv-drv-iso".equals(iso.getDisplayText()) && vmTemplate.getHypervisorType() != Hypervisor.HypervisorType.XenServer){
|
||||
throw new InvalidParameterValueException("Cannot attach Xenserver PV drivers to incompatible hypervisor " +vmTemplate.getHypervisorType());
|
||||
|
||||
if ("xen-pv-drv-iso".equals(iso.getDisplayText()) && vmInstanceCheck.getHypervisorType() != Hypervisor.HypervisorType.XenServer){
|
||||
throw new InvalidParameterValueException("Cannot attach Xenserver PV drivers to incompatible hypervisor " + vmInstanceCheck.getHypervisorType());
|
||||
}
|
||||
|
||||
return attachISOToVM(vmId, userId, isoId, true);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user