engine: resources: Fix virt hotplug

At some point, this seems to have rotted, since I assume upstream
started requiring this updated XML spec. Fix it now.
This commit is contained in:
James Shubin
2025-09-13 23:33:51 -04:00
parent bcf57f8581
commit a73dc19ce9
2 changed files with 6 additions and 5 deletions

View File

@@ -939,7 +939,8 @@ func (obj *VirtRes) getDomainXML() string {
if i < obj.CPUs {
enabled = "yes"
}
b += fmt.Sprintf("<vcpu id='%d' enabled='%s' hotpluggable='yes'/>", i, enabled)
// all vcpus must have either set or unset order
b += fmt.Sprintf("<vcpu id='%d' enabled='%s' hotpluggable='yes' order='%d'/>", i, enabled, i+1)
}
b += fmt.Sprintf("</vcpus>")
} else {