summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--addDroplet.go14
1 files changed, 14 insertions, 0 deletions
diff --git a/addDroplet.go b/addDroplet.go
index d4b426d..fe25ab8 100644
--- a/addDroplet.go
+++ b/addDroplet.go
@@ -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)