Skip to content

Commit 7ea5aad

Browse files
gladtoseeuclaude
andcommitted
<fix>[kvm]: pass guestOsType to kvmagent for SMBIOS auto-configuration
Resolves: ZSTAC-81735 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 62e8c17 commit 7ea5aad

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'
@@ -2474,6 +2476,14 @@ public void setSystemSerialNumber(String systemSerialNumber) {
24742476
this.systemSerialNumber = systemSerialNumber;
24752477
}
24762478

2479+
public String getGuestOsType() {
2480+
return guestOsType;
2481+
}
2482+
2483+
public void setGuestOsType(String guestOsType) {
2484+
this.guestOsType = guestOsType;
2485+
}
2486+
24772487
public String getVmCpuModel() {
24782488
return vmCpuModel;
24792489
}

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

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

0 commit comments

Comments
 (0)