Add a working virtual environment config
authorJonatan Schlag <jonatan.schlag@ipfire.org>
Thu, 19 Apr 2018 11:16:37 +0000 (13:16 +0200)
committerJonatan Schlag <jonatan.schlag@ipfire.org>
Thu, 19 Apr 2018 11:16:37 +0000 (13:16 +0200)
Signed-off-by: Jonatan Schlag <jonatan.schlag@ipfire.org>
virtual-environment/basic/machines/alice/machine.xml [new file with mode: 0644]
virtual-environment/basic/machines/alice/snapshot.xml [new file with mode: 0644]
virtual-environment/basic/machines/bob/machine.xml [new file with mode: 0644]
virtual-environment/basic/machines/bob/snapshot.xml [new file with mode: 0644]
virtual-environment/basic/network/network1/network.xml [new file with mode: 0644]
virtual-environment/basic/network/network2/network.xml [new file with mode: 0644]
virtual-environment/basic/settings

diff --git a/virtual-environment/basic/machines/alice/machine.xml b/virtual-environment/basic/machines/alice/machine.xml
new file mode 100644 (file)
index 0000000..2f7d0f5
--- /dev/null
@@ -0,0 +1,111 @@
+<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>
+  <cpu mode='custom' match='exact'>
+    <model fallback='allow'>Broadwell-noTSX</model>
+  </cpu>
+  <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>
+    <emulator>/usr/bin/kvm</emulator>
+    <disk type='file' device='disk'>
+      <driver name='qemu' type='qcow2'/>
+      <source file='/var/lib/libvirt/images/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>
+    <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>
+    <sound model='ich6'>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/>
+    </sound>
+    <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>
+    <redirdev bus='usb' type='spicevmc'>
+      <address type='usb' bus='0' port='2'/>
+    </redirdev>
+    <redirdev bus='usb' type='spicevmc'>
+      <address type='usb' bus='0' port='3'/>
+    </redirdev>
+    <memballoon model='virtio'>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x09' function='0x0'/>
+    </memballoon>
+  </devices>
+</domain>
+
diff --git a/virtual-environment/basic/machines/alice/snapshot.xml b/virtual-environment/basic/machines/alice/snapshot.xml
new file mode 100644 (file)
index 0000000..e996246
--- /dev/null
@@ -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/alice.qcow2'>
+    </disk>
+  </disks>
+</domainsnapshot>
diff --git a/virtual-environment/basic/machines/bob/machine.xml b/virtual-environment/basic/machines/bob/machine.xml
new file mode 100644 (file)
index 0000000..0ec99ae
--- /dev/null
@@ -0,0 +1,111 @@
+<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>
+  <cpu mode='custom' match='exact'>
+    <model fallback='allow'>Broadwell-noTSX</model>
+  </cpu>
+  <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>
+    <emulator>/usr/bin/kvm</emulator>
+    <disk type='file' device='disk'>
+      <driver name='qemu' type='qcow2'/>
+      <source file='/var/lib/libvirt/images/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>
+    <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>
+    <sound model='ich6'>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/>
+    </sound>
+    <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>
+    <redirdev bus='usb' type='spicevmc'>
+      <address type='usb' bus='0' port='2'/>
+    </redirdev>
+    <redirdev bus='usb' type='spicevmc'>
+      <address type='usb' bus='0' port='3'/>
+    </redirdev>
+    <memballoon model='virtio'>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x09' function='0x0'/>
+    </memballoon>
+  </devices>
+</domain>
+
diff --git a/virtual-environment/basic/machines/bob/snapshot.xml b/virtual-environment/basic/machines/bob/snapshot.xml
new file mode 100644 (file)
index 0000000..ec8b1a4
--- /dev/null
@@ -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/bob.qcow2'>
+    </disk>
+  </disks>
+</domainsnapshot>
diff --git a/virtual-environment/basic/network/network1/network.xml b/virtual-environment/basic/network/network1/network.xml
new file mode 100644 (file)
index 0000000..7495723
--- /dev/null
@@ -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/virtual-environment/basic/network/network2/network.xml b/virtual-environment/basic/network/network2/network.xml
new file mode 100644 (file)
index 0000000..366fa74
--- /dev/null
@@ -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>
+
index f889b51..24a117f 100644 (file)
@@ -6,10 +6,18 @@ networks = network1, network2
 [alice]
 xml_file = machines/alice/machine.xml
 snapshot_xml_file = machines/alice/snapshot.xml
+image = /var/lib/libvirt/images/alice.qcow2
+root_uid = 8888
+username = root
+password = 25814@root
 
 [bob]
 xml_file = machines/bob/machine.xml
 snapshot_xml_file = machines/bob/snapshot.xml
+image = /var/lib/libvirt/images/bob.qcow2
+root_uid = 8888
+username = root
+password = 25814@root
 
 [network1]
 xml_file = network/network1/network.xml