From f42091a2ce37f54bb8ad365b31ae2395a9af1372 Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Sat, 26 Oct 2024 02:31:52 -0500 Subject: network is maybe correct as virtio. pci needed? Signed-off-by: Jeff Carr --- start.go | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'start.go') diff --git a/start.go b/start.go index b682926..91cca37 100644 --- a/start.go +++ b/start.go @@ -49,8 +49,19 @@ func startDropletXml(start string) { // addEthernet(domcfg, "04:44:33:11:22:11", "worldbr") // addEthernet(domcfg, "04:44:33:33:44:55", "greenbr") + var count int = 0 for _, n := range d.Networks { log.Info("add network", d.Hostname, "mac addr", n.Mac, "interface", n.Name) + if n.Name != "worldbr" { + log.Info("OVERRIDE BRIDGE WITH 'worldbr'") + } + addEthernet(domcfg, n.Mac, "worldbr") + count += 1 + } + if count == 1 { + // this is normal + } else { + log.Info("WRONG NUMBER OF ETHERNET INTERFACES:", count) } // add a check here to make these unique @@ -60,6 +71,7 @@ func startDropletXml(start string) { fullname := findDisk(disk.Filename) if fullname == "" { log.Info("can not find disk", d.Hostname, "dir", disk.Filepath, "filename", disk.Filename) + os.Exit(-1) } else { // qcow := "/home/nfs/" + d.Hostname + ".qcow2" setSimpleDisk(domcfg, fullname) -- cgit v1.2.3