Skip to content

Commit e2e0f8f

Browse files
author
gitlab
committed
Merge branch 'fix/ZSTAC-81735@@2' into '5.5.12'
<fix>[kvm]: pass guestOsType to kvmagent for SMBIOS auto-configuration See merge request zstackio/zstack!9517
2 parents 067496b + 7ea5aad commit e2e0f8f

2 files changed

Lines changed: 11 additions & 0 deletions

File tree

plugin/kvm/src/main/java/org/zstack/kvm/KVMAgentCommands.java

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2283,6 +2283,8 @@ public static class StartVmCmd extends vdiCmd implements VmAddOnsCmd {
22832283
private boolean isApplianceVm;
22842284
@GrayVersion(value = "5.0.0")
22852285
private String systemSerialNumber;
2286+
@GrayVersion(value = "5.5.12")
2287+
private String guestOsType;
22862288
@GrayVersion(value = "5.0.0")
22872289
private String bootMode;
22882290
// used when bootMode == 'UEFI'
@@ -2476,6 +2478,14 @@ public void setSystemSerialNumber(String systemSerialNumber) {
24762478
this.systemSerialNumber = systemSerialNumber;
24772479
}
24782480

2481+
public String getGuestOsType() {
2482+
return guestOsType;
2483+
}
2484+
2485+
public void setGuestOsType(String guestOsType) {
2486+
this.guestOsType = guestOsType;
2487+
}
2488+
24792489
public String getVmCpuModel() {
24802490
return vmCpuModel;
24812491
}

plugin/kvm/src/main/java/org/zstack/kvm/KVMHost.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4436,6 +4436,7 @@ protected void startVm(final VmInstanceSpec spec, final NeedReplyMessage msg, fi
44364436
cmd.setAdditionalQmp(VmGlobalConfig.ADDITIONAL_QMP.value(Boolean.class));
44374437
cmd.setApplianceVm(spec.getVmInventory().getType().equals("ApplianceVm"));
44384438
cmd.setSystemSerialNumber(makeAndSaveVmSystemSerialNumber(spec.getVmInventory().getUuid()));
4439+
cmd.setGuestOsType(spec.getVmInventory().getGuestOsType());
44394440
if (!NetworkGlobalProperty.CHASSIS_ASSET_TAG.isEmpty()) {
44404441
cmd.setChassisAssetTag(NetworkGlobalProperty.CHASSIS_ASSET_TAG);
44414442
}

0 commit comments

Comments
 (0)