Skip to content

Commit 9bde784

Browse files
committed
add boot type, mode and uefi flag
1 parent 24c4280 commit 9bde784

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

engine/orchestration/src/main/java/com/cloud/vm/VirtualMachineManagerImpl.java

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4072,6 +4072,20 @@ protected VirtualMachineTO prepVmSpecForUnmanageCmd(Long vmId, Long hostId) {
40724072
DiskTO disk = storageMgr.getDiskWithThrottling(volTO, vol.getVolumeType(), vol.getDeviceId(), vol.getPath(), vm.getServiceOfferingId(), vol.getDiskOfferingId());
40734073
vmProfile.addDisk(disk);
40744074
}
4075+
4076+
Map<String, String> details = vmInstanceDetailsDao.listDetailsKeyPairs(vmId);
4077+
if (details.containsKey(VirtualMachineProfile.Param.BootType.getName())) {
4078+
vmProfile.getParameters().put(VirtualMachineProfile.Param.BootType, details.get(VirtualMachineProfile.Param.BootType.getName()));
4079+
}
4080+
4081+
if (details.containsKey(VirtualMachineProfile.Param.BootMode.getName())) {
4082+
vmProfile.getParameters().put(VirtualMachineProfile.Param.BootMode, details.get(VirtualMachineProfile.Param.BootMode.getName()));
4083+
}
4084+
4085+
if (details.containsKey(VirtualMachineProfile.Param.UefiFlag.getName())) {
4086+
vmProfile.getParameters().put(VirtualMachineProfile.Param.UefiFlag, details.get(VirtualMachineProfile.Param.UefiFlag.getName()));
4087+
}
4088+
40754089
return toVmTO(vmProfile);
40764090
}
40774091

0 commit comments

Comments
 (0)