diff --git a/junk.xml b/junk.xml
new file mode 100644
index 0000000..4372885
--- /dev/null
+++ b/junk.xml
@@ -0,0 +1,246 @@
+
+ pihole.wit.com
+ 2c411574-ff8a-46f2-a789-dde856103655
+
+
+
+
+
+ 2097152
+ 2097152
+ 2
+
+ /machine
+
+
+ hvm
+
+
+
+
+
+
+
+
+
+
+
+
+
+ destroy
+ restart
+ destroy
+
+
+
+
+
+ /usr/bin/qemu-system-x86_64
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ /dev/urandom
+
+
+
+
+
+
+ libvirt-2c411574-ff8a-46f2-a789-dde856103655
+
+
+
+ +64055:+64055
+
+
+
diff --git a/libvirtxml.go b/libvirtxml.go
index 6d8aee8..fe2d723 100644
--- a/libvirtxml.go
+++ b/libvirtxml.go
@@ -171,7 +171,7 @@ func clearEthernet(domcfg *libvirtxml.Domain) {
}
// add a new ethernet interface with mac assigned to bridge name
-func addEthernet(domcfg *libvirtxml.Domain, mac string, brname string) {
+func addEthernetBridge(domcfg *libvirtxml.Domain, mac string, brname string) {
// Define a new disk with "mynew.qcow2"
// type DomainInterfaceType string
@@ -189,6 +189,29 @@ func addEthernet(domcfg *libvirtxml.Domain, mac string, brname string) {
Model: &libvirtxml.DomainInterfaceModel{
Type: "virtio",
},
+ /* this is for raw tap. use this for people who don't
+ who don't have bridge groups or proper cluster backend networking
+ literally leaving this blank makes the interface 'tap0'
+ */
+ // Target: &libvirtxml.DomainInterfaceTarget{
+ // },
+ }
+
+ // Add the new disk to the domain configuration
+ domcfg.Devices.Interfaces = append(domcfg.Devices.Interfaces, newNet)
+}
+
+// makes an ethernet interface with qemu on dom0 as 'tapXXX'
+// doesn't require a bridge group or any changes to dom0 networking (probably)
+func addEthernetTap(domcfg *libvirtxml.Domain, mac string) {
+ newNet := libvirtxml.DomainInterface{
+ MAC: &libvirtxml.DomainInterfaceMAC{
+ Address: mac,
+ },
+ /* this is for raw tap. use this for people who don't
+ who don't have bridge groups or proper cluster backend networking
+ literally leaving this blank makes the interface 'tap0'
+ */
Target: &libvirtxml.DomainInterfaceTarget{
},
}
diff --git a/network.xml b/network.xml
deleted file mode 100644
index 9bc3172..0000000
--- a/network.xml
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
-
-
-
-
diff --git a/start.go b/start.go
index 91cca37..0a44e40 100644
--- a/start.go
+++ b/start.go
@@ -55,7 +55,8 @@ func startDropletXml(start string) {
if n.Name != "worldbr" {
log.Info("OVERRIDE BRIDGE WITH 'worldbr'")
}
- addEthernet(domcfg, n.Mac, "worldbr")
+ addEthernetBridge(domcfg, n.Mac, "worldbr")
+ // addEthernetTap(domcfg, n.Mac)
count += 1
}
if count == 1 {