Signed-off-by: Jonatan Schlag <jonatan.schlag(a)ipfire.org>
---
.../basic/machines/alice/machine.xml | 110 +++++++++++++++++++++
.../basic/machines/alice/snapshot.xml | 8 ++
.../basic/machines/bob/machine.xml | 110 +++++++++++++++++++++
.../basic/machines/bob/snapshot.xml | 8 ++
.../basic/network/network1/network.xml | 8 ++
.../basic/network/network2/network.xml | 8 ++
.../basic/network/network3/network.xml | 8 ++
.../basic/network/network4/network.xml | 8 ++
test/nitsi/virtual-environment/basic/settings | 34 +++++++
9 files changed, 302 insertions(+)
create mode 100644 test/nitsi/virtual-environment/basic/machines/alice/machine.xml
create mode 100644 test/nitsi/virtual-environment/basic/machines/alice/snapshot.xml
create mode 100644 test/nitsi/virtual-environment/basic/machines/bob/machine.xml
create mode 100644 test/nitsi/virtual-environment/basic/machines/bob/snapshot.xml
create mode 100644 test/nitsi/virtual-environment/basic/network/network1/network.xml
create mode 100644 test/nitsi/virtual-environment/basic/network/network2/network.xml
create mode 100644 test/nitsi/virtual-environment/basic/network/network3/network.xml
create mode 100644 test/nitsi/virtual-environment/basic/network/network4/network.xml
create mode 100644 test/nitsi/virtual-environment/basic/settings
diff --git a/test/nitsi/virtual-environment/basic/machines/alice/machine.xml b/test/nitsi/virtual-environment/basic/machines/alice/machine.xml
new file mode 100644
index 0000000..5f5b4ac
--- /dev/null
+++ b/test/nitsi/virtual-environment/basic/machines/alice/machine.xml
@@ -0,0 +1,110 @@
+<domain type='kvm'>
+ <name>alice</name>
+ <uuid>76eb4b45-158b-435d-84eb-0bdc0aafd1f8</uuid>
+ <memory unit='KiB'>1048576</memory>
+ <currentMemory unit='KiB'>1048576</currentMemory>
+ <vcpu placement='static'>1</vcpu>
+ <os>
+ <type arch='x86_64' machine='pc-i440fx-2.8'>hvm</type>
+ <boot dev='hd'/>
+ </os>
+ <features>
+ <acpi/>
+ <apic/>
+ <vmport state='off'/>
+ </features>
+ <clock offset='utc'>
+ <timer name='rtc' tickpolicy='catchup'/>
+ <timer name='pit' tickpolicy='delay'/>
+ <timer name='hpet' present='no'/>
+ </clock>
+ <on_poweroff>destroy</on_poweroff>
+ <on_reboot>restart</on_reboot>
+ <on_crash>restart</on_crash>
+ <pm>
+ <suspend-to-mem enabled='no'/>
+ <suspend-to-disk enabled='no'/>
+ </pm>
+ <devices>
+ <disk type='file' device='disk'>
+ <driver name='qemu' type='qcow2'/>
+ <source file='/var/lib/libvirt/images/ipfire-alice.qcow2'/>
+ <target dev='vda' bus='virtio'/>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x08' function='0x0'/>
+ </disk>
+ <controller type='usb' index='0' model='ich9-ehci1'>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x7'/>
+ </controller>
+ <controller type='usb' index='0' model='ich9-uhci1'>
+ <master startport='0'/>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0' multifunction='on'/>
+ </controller>
+ <controller type='usb' index='0' model='ich9-uhci2'>
+ <master startport='2'/>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x1'/>
+ </controller>
+ <controller type='usb' index='0' model='ich9-uhci3'>
+ <master startport='4'/>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x2'/>
+ </controller>
+ <controller type='pci' index='0' model='pci-root'/>
+ <controller type='virtio-serial' index='0'>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x0'/>
+ </controller>
+ <interface type='network'>
+ <mac address='52:54:00:8a:b8:b5'/>
+ <source network='net1'/>
+ <model type='virtio'/>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
+ </interface>
+ <interface type='network'>
+ <mac address='52:54:00:ea:62:65'/>
+ <source network='net2'/>
+ <model type='rtl8139'/>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
+ </interface>
+ <interface type='network'>
+ <mac address='52:54:00:49:0f:04'/>
+ <source network='net3'/>
+ <model type='virtio'/>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/>
+ </interface>
+ <interface type='network'>
+ <mac address='52:54:00:33:67:4a'/>
+ <source network='net4'/>
+ <model type='virtio'/>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x0a' function='0x0'/>
+ </interface>
+ <serial type='pty'>
+ <target port='0'/>
+ </serial>
+ <console type='pty'>
+ <target type='serial' port='0'/>
+ </console>
+ <channel type='unix'>
+ <target type='virtio' name='org.qemu.guest_agent.0'/>
+ <address type='virtio-serial' controller='0' bus='0' port='1'/>
+ </channel>
+ <channel type='spicevmc'>
+ <target type='virtio' name='com.redhat.spice.0'/>
+ <address type='virtio-serial' controller='0' bus='0' port='2'/>
+ </channel>
+ <input type='mouse' bus='ps2'/>
+ <input type='keyboard' bus='ps2'/>
+ <input type='tablet' bus='usb'>
+ <address type='usb' bus='0' port='1'/>
+ </input>
+ <graphics type='spice' autoport='yes'>
+ <listen type='address'/>
+ <image compression='off'/>
+ </graphics>
+ <video>
+ <model type='qxl' ram='65536' vram='65536' vgamem='16384' heads='1' primary='yes'/>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
+ </video>
+ <memballoon model='virtio'>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x09' function='0x0'/>
+ </memballoon>
+ </devices>
+</domain>
+
diff --git a/test/nitsi/virtual-environment/basic/machines/alice/snapshot.xml b/test/nitsi/virtual-environment/basic/machines/alice/snapshot.xml
new file mode 100644
index 0000000..fff9b97
--- /dev/null
+++ b/test/nitsi/virtual-environment/basic/machines/alice/snapshot.xml
@@ -0,0 +1,8 @@
+<domainsnapshot>
+ <description>Snapshot to undo all changes from this test</description>
+ <memory>no</memory>
+ <disks>
+ <disk name='/var/lib/libvirt/images/ipfire-alice.qcow2'>
+ </disk>
+ </disks>
+</domainsnapshot>
diff --git a/test/nitsi/virtual-environment/basic/machines/bob/machine.xml b/test/nitsi/virtual-environment/basic/machines/bob/machine.xml
new file mode 100644
index 0000000..6068211
--- /dev/null
+++ b/test/nitsi/virtual-environment/basic/machines/bob/machine.xml
@@ -0,0 +1,110 @@
+<domain type='kvm'>
+ <name>bob</name>
+ <uuid>b411a615-d6af-41cb-9b30-aaf9a8c52d51</uuid>
+ <memory unit='KiB'>1048576</memory>
+ <currentMemory unit='KiB'>1048576</currentMemory>
+ <vcpu placement='static'>1</vcpu>
+ <os>
+ <type arch='x86_64' machine='pc-i440fx-2.8'>hvm</type>
+ <boot dev='hd'/>
+ </os>
+ <features>
+ <acpi/>
+ <apic/>
+ <vmport state='off'/>
+ </features>
+ <clock offset='utc'>
+ <timer name='rtc' tickpolicy='catchup'/>
+ <timer name='pit' tickpolicy='delay'/>
+ <timer name='hpet' present='no'/>
+ </clock>
+ <on_poweroff>destroy</on_poweroff>
+ <on_reboot>restart</on_reboot>
+ <on_crash>restart</on_crash>
+ <pm>
+ <suspend-to-mem enabled='no'/>
+ <suspend-to-disk enabled='no'/>
+ </pm>
+ <devices>
+ <disk type='file' device='disk'>
+ <driver name='qemu' type='qcow2'/>
+ <source file='/var/lib/libvirt/images/ipfire-bob.qcow2'/>
+ <target dev='vda' bus='virtio'/>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x08' function='0x0'/>
+ </disk>
+ <controller type='usb' index='0' model='ich9-ehci1'>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x7'/>
+ </controller>
+ <controller type='usb' index='0' model='ich9-uhci1'>
+ <master startport='0'/>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0' multifunction='on'/>
+ </controller>
+ <controller type='usb' index='0' model='ich9-uhci2'>
+ <master startport='2'/>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x1'/>
+ </controller>
+ <controller type='usb' index='0' model='ich9-uhci3'>
+ <master startport='4'/>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x2'/>
+ </controller>
+ <controller type='pci' index='0' model='pci-root'/>
+ <controller type='virtio-serial' index='0'>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x0'/>
+ </controller>
+ <interface type='network'>
+ <mac address='52:54:00:36:ba:7d'/>
+ <source network='net1'/>
+ <model type='virtio'/>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
+ </interface>
+ <interface type='network'>
+ <mac address='52:54:00:e3:cb:28'/>
+ <source network='net2'/>
+ <model type='rtl8139'/>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
+ </interface>
+ <interface type='network'>
+ <mac address='52:54:00:b6:95:a5'/>
+ <source network='net3'/>
+ <model type='virtio'/>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/>
+ </interface>
+ <interface type='network'>
+ <mac address='52:54:00:f8:ce:4b'/>
+ <source network='net4'/>
+ <model type='virtio'/>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x0a' function='0x0'/>
+ </interface>
+ <serial type='pty'>
+ <target port='0'/>
+ </serial>
+ <console type='pty'>
+ <target type='serial' port='0'/>
+ </console>
+ <channel type='unix'>
+ <target type='virtio' name='org.qemu.guest_agent.0'/>
+ <address type='virtio-serial' controller='0' bus='0' port='1'/>
+ </channel>
+ <channel type='spicevmc'>
+ <target type='virtio' name='com.redhat.spice.0'/>
+ <address type='virtio-serial' controller='0' bus='0' port='2'/>
+ </channel>
+ <input type='tablet' bus='usb'>
+ <address type='usb' bus='0' port='1'/>
+ </input>
+ <input type='mouse' bus='ps2'/>
+ <input type='keyboard' bus='ps2'/>
+ <graphics type='spice' autoport='yes'>
+ <listen type='address'/>
+ <image compression='off'/>
+ </graphics>
+ <video>
+ <model type='qxl' ram='65536' vram='65536' vgamem='16384' heads='1' primary='yes'/>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
+ </video>
+ <memballoon model='virtio'>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x09' function='0x0'/>
+ </memballoon>
+ </devices>
+</domain>
+
diff --git a/test/nitsi/virtual-environment/basic/machines/bob/snapshot.xml b/test/nitsi/virtual-environment/basic/machines/bob/snapshot.xml
new file mode 100644
index 0000000..a8311a2
--- /dev/null
+++ b/test/nitsi/virtual-environment/basic/machines/bob/snapshot.xml
@@ -0,0 +1,8 @@
+<domainsnapshot>
+ <description>Snapshot to undo all changes from this test</description>
+ <memory>no</memory>
+ <disks>
+ <disk name='/var/lib/libvirt/images/ipfire-bob.qcow2'>
+ </disk>
+ </disks>
+</domainsnapshot>
diff --git a/test/nitsi/virtual-environment/basic/network/network1/network.xml b/test/nitsi/virtual-environment/basic/network/network1/network.xml
new file mode 100644
index 0000000..7495723
--- /dev/null
+++ b/test/nitsi/virtual-environment/basic/network/network1/network.xml
@@ -0,0 +1,8 @@
+<network>
+ <name>net1</name>
+ <uuid>c2c82218-4aff-466a-bc20-57f723d6ce3d</uuid>
+ <bridge name='virbr4' stp='on' delay='0'/>
+ <mac address='52:54:00:c4:0c:3b'/>
+ <domain name='net1'/>
+</network>
+
diff --git a/test/nitsi/virtual-environment/basic/network/network2/network.xml b/test/nitsi/virtual-environment/basic/network/network2/network.xml
new file mode 100644
index 0000000..366fa74
--- /dev/null
+++ b/test/nitsi/virtual-environment/basic/network/network2/network.xml
@@ -0,0 +1,8 @@
+<network>
+ <name>net2</name>
+ <uuid>36d10800-09f3-43a7-b99f-3200722393eb</uuid>
+ <bridge name='virbr5' stp='on' delay='0'/>
+ <mac address='52:54:00:28:54:45'/>
+ <domain name='net2'/>
+</network>
+
diff --git a/test/nitsi/virtual-environment/basic/network/network3/network.xml b/test/nitsi/virtual-environment/basic/network/network3/network.xml
new file mode 100644
index 0000000..4d3888b
--- /dev/null
+++ b/test/nitsi/virtual-environment/basic/network/network3/network.xml
@@ -0,0 +1,8 @@
+<network>
+ <name>net3</name>
+ <uuid>d7715ce7-f9f0-45b1-940f-790d6d487e5b</uuid>
+ <bridge name='virbr6' stp='on' delay='0'/>
+ <mac address='52:54:00:cd:1a:eb'/>
+ <domain name='net3'/>
+</network>
+
diff --git a/test/nitsi/virtual-environment/basic/network/network4/network.xml b/test/nitsi/virtual-environment/basic/network/network4/network.xml
new file mode 100644
index 0000000..656fe23
--- /dev/null
+++ b/test/nitsi/virtual-environment/basic/network/network4/network.xml
@@ -0,0 +1,8 @@
+<network>
+ <name>net4</name>
+ <uuid>e22c49db-894e-4c7b-9899-fd976f333ffb</uuid>
+ <bridge name='virbr7' stp='on' delay='0'/>
+ <mac address='52:54:00:56:ff:36'/>
+ <domain name='net4'/>
+</network>
+
diff --git a/test/nitsi/virtual-environment/basic/settings b/test/nitsi/virtual-environment/basic/settings
new file mode 100644
index 0000000..44805ae
--- /dev/null
+++ b/test/nitsi/virtual-environment/basic/settings
@@ -0,0 +1,34 @@
+[DEFAULT]
+name = ipfire
+machines = alice, bob
+networks = network1, network2, network3, network4
+uri = qemu:///system
+
+[alice]
+xml_file = machines/alice/machine.xml
+snapshot_xml_file = machines/alice/snapshot.xml
+image = /var/lib/libvirt/images/ipfire-alice.qcow2
+root_uid = 1efb5389-0949-46bb-b688-5246acba9f6d
+username = root
+password = root
+
+[bob]
+xml_file = machines/bob/machine.xml
+snapshot_xml_file = machines/bob/snapshot.xml
+image = /var/lib/libvirt/images/ipfire-bob.qcow2
+root_uid = 1efb5389-0949-46bb-b688-5246acba9f6d
+username = root
+password = root
+
+[network1]
+xml_file = network/network1/network.xml
+
+[network2]
+xml_file = network/network2/network.xml
+
+
+[network3]
+xml_file = network/network3/network.xml
+
+[network4]
+xml_file = network/network4/network.xml
--
2.11.0