save qemu machine and arch
Signed-off-by: Jeff Carr <jcarr@wit.com>
This commit is contained in:
parent
23e9319afb
commit
57fdc99855
|
@ -93,6 +93,20 @@ func updateDroplet(d *DropletT, domcfg *libvirtxml.Domain) bool {
|
||||||
ok = false
|
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
|
// check cpus
|
||||||
if d.pb.Cpus != int64(domcfg.VCPU.Value) {
|
if d.pb.Cpus != int64(domcfg.VCPU.Value) {
|
||||||
// fmt.Printf("cpus changed. VCPU = %+v\n", domcfg.VCPU)
|
// fmt.Printf("cpus changed. VCPU = %+v\n", domcfg.VCPU)
|
||||||
|
|
Loading…
Reference in New Issue