Skip to content

Commit 56670f2

Browse files
committed
boot order 기본값 1. hd, 2. cdrom 순으로 변경
1 parent 39e1343 commit 56670f2

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

plugins/hypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3196,8 +3196,8 @@ protected GuestDef createGuestFromSpec(VirtualMachineTO vmTO, LibvirtVMDef vm, S
31963196
}
31973197
}
31983198
guest.setUuid(uuid);
3199-
guest.setBootOrder(GuestDef.BootOrder.CDROM);
32003199
guest.setBootOrder(GuestDef.BootOrder.HARDISK);
3200+
guest.setBootOrder(GuestDef.BootOrder.CDROM);
32013201
return guest;
32023202
}
32033203

@@ -3823,15 +3823,14 @@ public void detachAndAttachConfigDriveISO(final Connect conn, final String vmNam
38233823

38243824
public synchronized String attachOrDetachConfigDriveISO(final Connect conn, final String vmName, VirtualMachineTO to, String cdPath, final boolean isAttach, final Integer diskSeq) throws LibvirtException, URISyntaxException,
38253825
InternalErrorException {
3826-
String isoPath = "";
38273826
DiskTO configDriveDisk = null;
38283827
for (DiskTO disk : to.getDisks()) {
38293828
if (disk.getPath() != null && disk.getPath().contains("configdrive")) {
38303829
configDriveDisk = disk;
38313830
break;
38323831
}
38333832
}
3834-
isoPath = getVolumePath(conn, configDriveDisk, to.isConfigDriveOnHostCache());
3833+
String isoPath = getVolumePath(conn, configDriveDisk, to.isConfigDriveOnHostCache());
38353834
DiskDef iso = new DiskDef();
38363835
if (isAttach && StringUtils.isNotBlank(isoPath) && configDriveDisk !=null && isoPath.lastIndexOf("/") > 0) {
38373836
if (isoPath.startsWith(getConfigPath() + "/" + ConfigDrive.CONFIGDRIVEDIR) && isoPath.contains(vmName)) {

0 commit comments

Comments
 (0)