save qemu machine and arch

Signed-off-by: Jeff Carr <jcarr@wit.com>
This commit is contained in:
Jeff Carr 2024-10-23 16:18:49 -05:00
parent 23e9319afb
commit 57fdc99855
1 changed files with 14 additions and 0 deletions

View File

@ -93,6 +93,20 @@ func updateDroplet(d *DropletT, domcfg *libvirtxml.Domain) bool {
ok = false
}
// update arch & machine
if (domcfg.OS != nil) && (domcfg.OS.Type != nil) {
// OS Type: &{Arch:x86_64 Machine:pc-i440fx-5.2 Type:hvm}
t := domcfg.OS.Type
if d.pb.QemuArch != t.Arch {
d.pb.QemuArch = t.Arch
me.changed = true
}
if d.pb.QemuMachine != t.Machine {
d.pb.QemuMachine = t.Machine
me.changed = true
}
}
// check cpus
if d.pb.Cpus != int64(domcfg.VCPU.Value) {
// fmt.Printf("cpus changed. VCPU = %+v\n", domcfg.VCPU)