summaryrefslogtreecommitdiff
path: root/hosts/iroha/libvirt
diff options
context:
space:
mode:
Diffstat (limited to 'hosts/iroha/libvirt')
-rw-r--r--hosts/iroha/libvirt/hooks/arcade.conf4
-rw-r--r--hosts/iroha/libvirt/hooks/cpuset.conf10
-rwxr-xr-xhosts/iroha/libvirt/hooks/cpuset_prepare_common.sh51
-rwxr-xr-xhosts/iroha/libvirt/hooks/cpuset_release_common.sh33
-rwxr-xr-xhosts/iroha/libvirt/hooks/qemu29
-rwxr-xr-xhosts/iroha/libvirt/hooks/qemu.d/arcade/prepare/begin/bind_vfio.sh20
l---------hosts/iroha/libvirt/hooks/qemu.d/arcade/prepare/begin/cpuset_prepare_common.sh1
-rwxr-xr-xhosts/iroha/libvirt/hooks/qemu.d/arcade/prepare/begin/port_forward.sh14
l---------hosts/iroha/libvirt/hooks/qemu.d/arcade/release/end/cpuset_release_common.sh1
-rwxr-xr-xhosts/iroha/libvirt/hooks/qemu.d/arcade/release/end/port_close.sh14
-rwxr-xr-xhosts/iroha/libvirt/hooks/qemu.d/arcade/release/end/unbind_vfio.sh17
-rw-r--r--hosts/iroha/libvirt/qemu/arcade.xml221
-rw-r--r--hosts/iroha/libvirt/qemu/corpa.xml249
-rw-r--r--hosts/iroha/libvirt/qemu/soy.xml202
14 files changed, 866 insertions, 0 deletions
diff --git a/hosts/iroha/libvirt/hooks/arcade.conf b/hosts/iroha/libvirt/hooks/arcade.conf
new file mode 100644
index 0000000..4282629
--- /dev/null
+++ b/hosts/iroha/libvirt/hooks/arcade.conf
@@ -0,0 +1,4 @@
+VIRSH_GPU_VIDEO=pci_0000_0f_00_0
+VIRSH_GPU_AUDIO=pci_0000_0f_00_1
+VIRSH_USB=pci_0000_03_00_0
+VIRSH_NVME=pci_0000_0e_00_0
diff --git a/hosts/iroha/libvirt/hooks/cpuset.conf b/hosts/iroha/libvirt/hooks/cpuset.conf
new file mode 100644
index 0000000..d208294
--- /dev/null
+++ b/hosts/iroha/libvirt/hooks/cpuset.conf
@@ -0,0 +1,10 @@
+TOTAL_CORES='0-23' # 3900X: 12-core, 24-thread cpu
+HOST_CORES='0-4,12-16'
+VIRT_CORES0='5-11,17-23'
+MEMNODES='0'
+
+CPUSET_REFCOUNT=/tmp/cpuset-ref
+CGROUP=/sys/fs/cgroup
+CPUSET=${CGROUP}/cpuset
+SETNAME=host
+PARTNAME0=arcade
diff --git a/hosts/iroha/libvirt/hooks/cpuset_prepare_common.sh b/hosts/iroha/libvirt/hooks/cpuset_prepare_common.sh
new file mode 100755
index 0000000..e4bb35f
--- /dev/null
+++ b/hosts/iroha/libvirt/hooks/cpuset_prepare_common.sh
@@ -0,0 +1,51 @@
+#! /usr/bin/env bash
+
+source "/etc/libvirt/hooks/cpuset.conf"
+
+if test -f $CPUSET_REFCOUNT;
+then
+ ref=$(tail -1 $CPUSET_REFCOUNT)
+ printf "%06d" $(expr $ref + 1) > $CPUSET_REFCOUNT
+ exit 0
+else
+ printf "%06d" 1 > $CPUSET_REFCOUNT
+fi
+
+/bin/echo ${TOTAL_CORES} > ${CPUSET}/cpuset.cpus
+/bin/echo ${MEMNODES} > ${CPUSET}/cpuset.mems
+
+if test -d ${CPUSET}/machine;
+then
+ :
+else
+ mkdir -p ${CPUSET}/machine
+fi
+
+/bin/echo ${TOTAL_CORES} > ${CPUSET}/machine/cpuset.cpus
+/bin/echo ${MEMNODES} > ${CPUSET}/machine/cpuset.mems
+
+if test -d ${CPUSET}/${SETNAME};
+then
+ :
+else
+ mkdir ${CPUSET}/${SETNAME}
+fi
+
+/bin/echo ${HOST_CORES} > ${CPUSET}/${SETNAME}/cpuset.cpus
+/bin/echo ${MEMNODES} > ${CPUSET}/${SETNAME}/cpuset.mems
+
+for i in blkio cpu cpuacct cpuset devices freezer memory net_cls perf_event;
+do
+ mkdir -p ${CGROUP}/$i/machine/${PARTNAME0}.partition
+done
+
+/bin/echo ${VIRT_CORES0} > ${CPUSET}/machine/${PARTNAME0}.partition/cpuset.cpus
+/bin/echo ${MEMNODES} > ${CPUSET}/machine/${PARTNAME0}.partition/cpuset.mems
+
+for i in `cat ${CPUSET}/tasks`;
+do
+ /bin/echo ${i} > ${CPUSET}/${SETNAME}/tasks || :
+done
+
+# (pgrep kthreadd) = 2
+taskset -pc ${HOST_CORES} 2
diff --git a/hosts/iroha/libvirt/hooks/cpuset_release_common.sh b/hosts/iroha/libvirt/hooks/cpuset_release_common.sh
new file mode 100755
index 0000000..624fa5b
--- /dev/null
+++ b/hosts/iroha/libvirt/hooks/cpuset_release_common.sh
@@ -0,0 +1,33 @@
+#! /usr/bin/env bash
+
+source "/etc/libvirt/hooks/cpuset.conf"
+
+if test -f $CPUSET_REFCOUNT;
+then
+ ref=$(tail -1 $CPUSET_REFCOUNT)
+ dec=$(expr $ref - 1)
+ printf "%06d" $(expr $dec) > $CPUSET_REFCOUNT
+ if [ $dec -gt 0 ];
+ then
+ exit 0
+ fi
+ rm $CPUSET_REFCOUNT
+else
+ exit 1
+fi
+
+if test -d ${CPUSET}/${SETNAME};
+then
+ sed -un p < ${CPUSET}/${SETNAME}/tasks > ${CPUSET}/tasks
+ rmdir ${CPUSET}/${SETNAME}
+fi
+
+for i in blkio cpu cpuacct cpuset devices freezer memory net_cls perf_event;
+do
+ rmdir ${CGROUP}/$i/machine/${PARTNAME0}.partition
+done
+
+/bin/echo ${TOTAL_CORES} > ${CPUSET}/machine/cpuset.cpus
+
+# (pgrep kthreadd) = 2
+taskset -pc ${TOTAL_CORES} 2
diff --git a/hosts/iroha/libvirt/hooks/qemu b/hosts/iroha/libvirt/hooks/qemu
new file mode 100755
index 0000000..ccdf9ae
--- /dev/null
+++ b/hosts/iroha/libvirt/hooks/qemu
@@ -0,0 +1,29 @@
+#! /usr/bin/env bash
+#
+# Author: Sebastiaan Meijer (sebastiaan@passthroughpo.st)
+#
+# Copy this file to /etc/libvirt/hooks, make sure it's called "qemu".
+# After this file is installed, restart libvirt.
+# From now on, you can easily add per-guest qemu hooks.
+# Add your hooks in /etc/libvirt/hooks/qemu.d/vm_name/hook_name/state_name.
+# For a list of available hooks, please refer to https://www.libvirt.org/hooks.html
+#
+
+GUEST_NAME="$1"
+HOOK_NAME="$2"
+STATE_NAME="$3"
+MISC="${@:4}"
+
+BASEDIR="$(dirname $0)"
+
+HOOKPATH="$BASEDIR/qemu.d/$GUEST_NAME/$HOOK_NAME/$STATE_NAME"
+
+set -e # If a script exits with an error, we should as well.
+
+if [ -f "$HOOKPATH" ]; then
+ eval \""$HOOKPATH"\" "$@"
+elif [ -d "$HOOKPATH" ]; then
+ while read file; do
+ eval \""$file"\" "$@"
+ done <<< "$(find -L "$HOOKPATH" -maxdepth 1 -type f -executable -print;)"
+fi
diff --git a/hosts/iroha/libvirt/hooks/qemu.d/arcade/prepare/begin/bind_vfio.sh b/hosts/iroha/libvirt/hooks/qemu.d/arcade/prepare/begin/bind_vfio.sh
new file mode 100755
index 0000000..f89b61a
--- /dev/null
+++ b/hosts/iroha/libvirt/hooks/qemu.d/arcade/prepare/begin/bind_vfio.sh
@@ -0,0 +1,20 @@
+#! /usr/bin/env bash
+
+source "/etc/libvirt/hooks/arcade.conf"
+
+echo 0 > /sys/class/vtconsole/vtcon0/bind
+echo 0 > /sys/class/vtconsole/vtcon1/bind
+
+modprobe -r nvidia-drm
+modprobe -r nvidia-modeset
+modprobe -r nvidia-uvm
+modprobe -r nvidia
+
+modprobe vfio
+modprobe vfio_iommu_type1
+modprobe vfio_pci
+
+virsh nodedev-detach $VIRSH_GPU_VIDEO
+virsh nodedev-detach $VIRSH_GPU_AUDIO
+virsh nodedev-detach $VIRSH_NVME
+virsh nodedev-detach $VIRSH_USB
diff --git a/hosts/iroha/libvirt/hooks/qemu.d/arcade/prepare/begin/cpuset_prepare_common.sh b/hosts/iroha/libvirt/hooks/qemu.d/arcade/prepare/begin/cpuset_prepare_common.sh
new file mode 120000
index 0000000..fb5a2ab
--- /dev/null
+++ b/hosts/iroha/libvirt/hooks/qemu.d/arcade/prepare/begin/cpuset_prepare_common.sh
@@ -0,0 +1 @@
+../../../../cpuset_prepare_common.sh \ No newline at end of file
diff --git a/hosts/iroha/libvirt/hooks/qemu.d/arcade/prepare/begin/port_forward.sh b/hosts/iroha/libvirt/hooks/qemu.d/arcade/prepare/begin/port_forward.sh
new file mode 100755
index 0000000..7d5d484
--- /dev/null
+++ b/hosts/iroha/libvirt/hooks/qemu.d/arcade/prepare/begin/port_forward.sh
@@ -0,0 +1,14 @@
+#! /usr/bin/env bash
+
+# kdeconnect
+iptables -t nat -C PREROUTING -p tcp -s 192.168.1.0/24 --dport 1714:1764 \
+ -j DNAT --to-destination 192.168.122.40:1714-1764 || \
+iptables -t nat -A PREROUTING -p tcp -s 192.168.1.0/24 --dport 1714:1764 \
+ -j DNAT --to-destination 192.168.122.40:1714-1764
+iptables -t nat -C PREROUTING -p udp -s 192.168.1.0/24 --dport 1714:1764 \
+ -j DNAT --to-destination 192.168.122.40:1714-1764 || \
+iptables -t nat -A PREROUTING -p udp -s 192.168.1.0/24 --dport 1714:1764 \
+ -j DNAT --to-destination 192.168.122.40:1714-1764
+
+iptables -C FORWARD -m state -d 192.168.122.0/24 --state NEW,RELATED,ESTABLISHED -j ACCEPT || \
+iptables -I FORWARD -m state -d 192.168.122.0/24 --state NEW,RELATED,ESTABLISHED -j ACCEPT
diff --git a/hosts/iroha/libvirt/hooks/qemu.d/arcade/release/end/cpuset_release_common.sh b/hosts/iroha/libvirt/hooks/qemu.d/arcade/release/end/cpuset_release_common.sh
new file mode 120000
index 0000000..d823a60
--- /dev/null
+++ b/hosts/iroha/libvirt/hooks/qemu.d/arcade/release/end/cpuset_release_common.sh
@@ -0,0 +1 @@
+../../../../cpuset_release_common.sh \ No newline at end of file
diff --git a/hosts/iroha/libvirt/hooks/qemu.d/arcade/release/end/port_close.sh b/hosts/iroha/libvirt/hooks/qemu.d/arcade/release/end/port_close.sh
new file mode 100755
index 0000000..0d58fa7
--- /dev/null
+++ b/hosts/iroha/libvirt/hooks/qemu.d/arcade/release/end/port_close.sh
@@ -0,0 +1,14 @@
+#! /usr/bin/env bash
+
+# kdeconnect (remove)
+iptables -t nat -C PREROUTING -p tcp -s 192.168.1.0/24 --dport 1714:1764 \
+ -j DNAT --to-destination 192.168.122.40:1714-1764 || \
+iptables -t nat -D PREROUTING -p tcp -s 192.168.1.0/24 --dport 1714:1764 \
+ -j DNAT --to-destination 192.168.122.40:1714-1764
+iptables -t nat -C PREROUTING -p udp -s 192.168.1.0/24 --dport 1714:1764 \
+ -j DNAT --to-destination 192.168.122.40:1714-1764 || \
+iptables -t nat -D PREROUTING -p udp -s 192.168.1.0/24 --dport 1714:1764 \
+ -j DNAT --to-destination 192.168.122.40:1714-1764
+
+iptables -C FORWARD -m state -d 192.168.122.0/24 --state NEW,RELATED,ESTABLISHED -j ACCEPT || \
+iptables -D FORWARD -m state -d 192.168.122.0/24 --state NEW,RELATED,ESTABLISHED -j ACCEPT
diff --git a/hosts/iroha/libvirt/hooks/qemu.d/arcade/release/end/unbind_vfio.sh b/hosts/iroha/libvirt/hooks/qemu.d/arcade/release/end/unbind_vfio.sh
new file mode 100755
index 0000000..c256d2a
--- /dev/null
+++ b/hosts/iroha/libvirt/hooks/qemu.d/arcade/release/end/unbind_vfio.sh
@@ -0,0 +1,17 @@
+#! /usr/bin/env bash
+
+source "/etc/libvirt/hooks/arcade.conf"
+
+virsh nodedev-reattach $VIRSH_GPU_VIDEO
+virsh nodedev-reattach $VIRSH_GPU_AUDIO
+virsh nodedev-reattach $VIRSH_NVME
+virsh nodedev-reattach $VIRSH_USB
+
+modprobe -r vfio_pci
+modprobe -r vfio_iommu_type1
+modprobe -r vfio
+
+modprobe nvidia-drm
+modprobe nvidia-modeset
+modprobe nvidia-uvm
+modprobe nvidia
diff --git a/hosts/iroha/libvirt/qemu/arcade.xml b/hosts/iroha/libvirt/qemu/arcade.xml
new file mode 100644
index 0000000..79e9216
--- /dev/null
+++ b/hosts/iroha/libvirt/qemu/arcade.xml
@@ -0,0 +1,221 @@
+<!--
+WARNING: THIS IS AN AUTO-GENERATED FILE. CHANGES TO IT ARE LIKELY TO BE
+OVERWRITTEN AND LOST. Changes to this xml configuration should be made using:
+ virsh edit arcade
+or other application using the libvirt API.
+-->
+
+<domain type='kvm'>
+ <name>arcade</name>
+ <uuid>0ccf2904-b393-41b0-98a6-3c8722efdc94</uuid>
+ <metadata>
+ <libosinfo:libosinfo xmlns:libosinfo="http://libosinfo.org/xmlns/libvirt/domain/1.0">
+ <libosinfo:os id="http://microsoft.com/win/11"/>
+ </libosinfo:libosinfo>
+ </metadata>
+ <memory unit='KiB'>16777216</memory>
+ <currentMemory unit='KiB'>16777216</currentMemory>
+ <memoryBacking>
+ <hugepages/>
+ </memoryBacking>
+ <vcpu placement='static'>6</vcpu>
+ <cputune>
+ <vcpupin vcpu='0' cpuset='0'/>
+ <vcpupin vcpu='1' cpuset='12'/>
+ <vcpupin vcpu='2' cpuset='1'/>
+ <vcpupin vcpu='3' cpuset='13'/>
+ <vcpupin vcpu='4' cpuset='2'/>
+ <vcpupin vcpu='5' cpuset='14'/>
+ </cputune>
+ <os firmware='efi'>
+ <type arch='x86_64' machine='pc-q35-9.0'>hvm</type>
+ <firmware>
+ <feature enabled='no' name='enrolled-keys'/>
+ <feature enabled='no' name='secure-boot'/>
+ </firmware>
+ <loader readonly='yes' type='pflash'>/usr/share/edk2-ovmf/OVMF_CODE.fd</loader>
+ <nvram template='/usr/share/edk2-ovmf/OVMF_VARS.fd'>/var/lib/libvirt/qemu/nvram/arcade_VARS.fd</nvram>
+ <smbios mode='host'/>
+ </os>
+ <features>
+ <acpi/>
+ <apic/>
+ <hyperv mode='custom'>
+ <relaxed state='on'/>
+ <vapic state='on'/>
+ <spinlocks state='on' retries='8191'/>
+ <vpindex state='on'/>
+ <runtime state='on'/>
+ <synic state='on'/>
+ <stimer state='on'>
+ <direct state='on'/>
+ </stimer>
+ <reset state='off'/>
+ <frequencies state='on'/>
+ <reenlightenment state='off'/>
+ <tlbflush state='on'/>
+ <ipi state='on'/>
+ <evmcs state='off'/>
+ </hyperv>
+ <kvm>
+ <hidden state='on'/>
+ </kvm>
+ <vmport state='off'/>
+ <smm state='off'/>
+ <msrs unknown='ignore'/>
+ </features>
+ <cpu mode='host-passthrough' check='none' migratable='on'>
+ <topology sockets='1' dies='1' clusters='1' cores='3' threads='2'/>
+ <cache mode='passthrough'/>
+ <feature policy='require' name='topoext'/>
+ <feature policy='require' name='hypervisor'/>
+ <feature policy='require' name='invtsc'/>
+ <feature policy='disable' name='monitor'/>
+ <feature policy='disable' name='svm'/>
+ </cpu>
+ <clock offset='localtime'>
+ <timer name='rtc' tickpolicy='catchup'/>
+ <timer name='pit' tickpolicy='delay'/>
+ <timer name='hpet' present='no'/>
+ <timer name='tsc' present='yes' mode='native'/>
+ <timer name='hypervclock' present='yes'/>
+ </clock>
+ <on_poweroff>destroy</on_poweroff>
+ <on_reboot>restart</on_reboot>
+ <on_crash>destroy</on_crash>
+ <pm>
+ <suspend-to-mem enabled='no'/>
+ <suspend-to-disk enabled='no'/>
+ </pm>
+ <devices>
+ <emulator>/usr/bin/qemu-system-x86_64</emulator>
+ <controller type='pci' index='0' model='pcie-root'/>
+ <controller type='pci' index='1' model='pcie-root-port'>
+ <model name='pcie-root-port'/>
+ <target chassis='1' port='0x10'/>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0' multifunction='on'/>
+ </controller>
+ <controller type='pci' index='2' model='pcie-root-port'>
+ <model name='pcie-root-port'/>
+ <target chassis='2' port='0x11'/>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x1'/>
+ </controller>
+ <controller type='pci' index='3' model='pcie-root-port'>
+ <model name='pcie-root-port'/>
+ <target chassis='3' port='0x12'/>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x2'/>
+ </controller>
+ <controller type='pci' index='4' model='pcie-root-port'>
+ <model name='pcie-root-port'/>
+ <target chassis='4' port='0x13'/>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x3'/>
+ </controller>
+ <controller type='pci' index='5' model='pcie-root-port'>
+ <model name='pcie-root-port'/>
+ <target chassis='5' port='0x14'/>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x4'/>
+ </controller>
+ <controller type='pci' index='6' model='pcie-root-port'>
+ <model name='pcie-root-port'/>
+ <target chassis='6' port='0x15'/>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x5'/>
+ </controller>
+ <controller type='pci' index='7' model='pcie-root-port'>
+ <model name='pcie-root-port'/>
+ <target chassis='7' port='0x16'/>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x6'/>
+ </controller>
+ <controller type='pci' index='8' model='pcie-root-port'>
+ <model name='pcie-root-port'/>
+ <target chassis='8' port='0x17'/>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x7'/>
+ </controller>
+ <controller type='pci' index='9' model='pcie-root-port'>
+ <model name='pcie-root-port'/>
+ <target chassis='9' port='0x18'/>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0' multifunction='on'/>
+ </controller>
+ <controller type='pci' index='10' model='pcie-root-port'>
+ <model name='pcie-root-port'/>
+ <target chassis='10' port='0x19'/>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x1'/>
+ </controller>
+ <controller type='pci' index='11' model='pcie-root-port'>
+ <model name='pcie-root-port'/>
+ <target chassis='11' port='0x1a'/>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x2'/>
+ </controller>
+ <controller type='pci' index='12' model='pcie-root-port'>
+ <model name='pcie-root-port'/>
+ <target chassis='12' port='0x1b'/>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x3'/>
+ </controller>
+ <controller type='pci' index='13' model='pcie-root-port'>
+ <model name='pcie-root-port'/>
+ <target chassis='13' port='0x1c'/>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x4'/>
+ </controller>
+ <controller type='pci' index='14' model='pcie-root-port'>
+ <model name='pcie-root-port'/>
+ <target chassis='14' port='0x1d'/>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x5'/>
+ </controller>
+ <controller type='pci' index='15' model='pcie-root-port'>
+ <model name='pcie-root-port'/>
+ <target chassis='15' port='0x8'/>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x0'/>
+ </controller>
+ <controller type='pci' index='16' model='pcie-to-pci-bridge'>
+ <model name='pcie-pci-bridge'/>
+ <address type='pci' domain='0x0000' bus='0x02' slot='0x00' function='0x0'/>
+ </controller>
+ <controller type='sata' index='0'>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x1f' function='0x2'/>
+ </controller>
+ <controller type='virtio-serial' index='0'>
+ <address type='pci' domain='0x0000' bus='0x03' slot='0x00' function='0x0'/>
+ </controller>
+ <controller type='usb' index='0' model='qemu-xhci' ports='15'>
+ <address type='pci' domain='0x0000' bus='0x06' slot='0x00' function='0x0'/>
+ </controller>
+ <interface type='bridge'>
+ <mac address='52:54:00:b3:a7:83'/>
+ <source bridge='virbr0'/>
+ <model type='virtio'/>
+ <address type='pci' domain='0x0000' bus='0x01' slot='0x00' function='0x0'/>
+ </interface>
+ <input type='mouse' bus='ps2'/>
+ <input type='keyboard' bus='ps2'/>
+ <tpm model='tpm-crb'>
+ <backend type='emulator' version='2.0'/>
+ </tpm>
+ <audio id='1' type='none'/>
+ <hostdev mode='subsystem' type='pci' managed='yes'>
+ <source>
+ <address domain='0x0000' bus='0x0e' slot='0x00' function='0x0'/>
+ </source>
+ <boot order='1'/>
+ <address type='pci' domain='0x0000' bus='0x04' slot='0x00' function='0x0'/>
+ </hostdev>
+ <hostdev mode='subsystem' type='pci' managed='yes'>
+ <source>
+ <address domain='0x0000' bus='0x03' slot='0x00' function='0x0'/>
+ </source>
+ <address type='pci' domain='0x0000' bus='0x05' slot='0x00' function='0x0'/>
+ </hostdev>
+ <hostdev mode='subsystem' type='pci' managed='yes'>
+ <source>
+ <address domain='0x0000' bus='0x0f' slot='0x00' function='0x0'/>
+ </source>
+ <address type='pci' domain='0x0000' bus='0x07' slot='0x00' function='0x0'/>
+ </hostdev>
+ <hostdev mode='subsystem' type='pci' managed='yes'>
+ <source>
+ <address domain='0x0000' bus='0x0f' slot='0x00' function='0x1'/>
+ </source>
+ <address type='pci' domain='0x0000' bus='0x08' slot='0x00' function='0x0'/>
+ </hostdev>
+ <watchdog model='itco' action='reset'/>
+ <memballoon model='none'/>
+ </devices>
+</domain>
diff --git a/hosts/iroha/libvirt/qemu/corpa.xml b/hosts/iroha/libvirt/qemu/corpa.xml
new file mode 100644
index 0000000..ca5c6d0
--- /dev/null
+++ b/hosts/iroha/libvirt/qemu/corpa.xml
@@ -0,0 +1,249 @@
+<!--
+WARNING: THIS IS AN AUTO-GENERATED FILE. CHANGES TO IT ARE LIKELY TO BE
+OVERWRITTEN AND LOST. Changes to this xml configuration should be made using:
+ virsh edit corpa
+or other application using the libvirt API.
+-->
+
+<domain type='kvm'>
+ <name>corpa</name>
+ <uuid>b8f2eddd-26fb-427a-8885-bb415ba49cc7</uuid>
+ <metadata>
+ <libosinfo:libosinfo xmlns:libosinfo="http://libosinfo.org/xmlns/libvirt/domain/1.0">
+ <libosinfo:os id="http://microsoft.com/win/11"/>
+ </libosinfo:libosinfo>
+ </metadata>
+ <memory unit='KiB'>8388608</memory>
+ <currentMemory unit='KiB'>8388608</currentMemory>
+ <memoryBacking>
+ <source type='memfd'/>
+ <access mode='shared'/>
+ </memoryBacking>
+ <vcpu placement='static'>4</vcpu>
+ <iothreads>1</iothreads>
+ <os firmware='efi'>
+ <type arch='x86_64' machine='pc-q35-9.0'>hvm</type>
+ <firmware>
+ <feature enabled='no' name='enrolled-keys'/>
+ <feature enabled='no' name='secure-boot'/>
+ </firmware>
+ <loader readonly='yes' type='pflash'>/usr/share/edk2-ovmf/OVMF_CODE.fd</loader>
+ <nvram template='/usr/share/edk2-ovmf/OVMF_VARS.fd'>/var/lib/libvirt/qemu/nvram/win11_VARS.fd</nvram>
+ </os>
+ <features>
+ <acpi/>
+ <apic/>
+ <hyperv mode='custom'>
+ <relaxed state='on'/>
+ <vapic state='on'/>
+ <spinlocks state='on' retries='8191'/>
+ <vpindex state='on'/>
+ <runtime state='on'/>
+ <synic state='on'/>
+ <stimer state='on'/>
+ <reset state='off'/>
+ <vendor_id state='on' value='whatever'/>
+ <frequencies state='on'/>
+ <reenlightenment state='off'/>
+ <tlbflush state='on'/>
+ <ipi state='on'/>
+ <evmcs state='off'/>
+ </hyperv>
+ <vmport state='off'/>
+ <smm state='off'/>
+ <msrs unknown='ignore'/>
+ </features>
+ <cpu mode='host-passthrough' check='none' migratable='on'>
+ <topology sockets='1' dies='1' clusters='1' cores='4' threads='1'/>
+ <cache mode='passthrough'/>
+ <feature policy='require' name='topoext'/>
+ <feature policy='require' name='hypervisor'/>
+ <feature policy='require' name='invtsc'/>
+ <feature policy='require' name='svm'/>
+ <feature policy='disable' name='monitor'/>
+ </cpu>
+ <clock offset='localtime'>
+ <timer name='rtc' tickpolicy='catchup'/>
+ <timer name='pit' tickpolicy='delay'/>
+ <timer name='hpet' present='no'/>
+ <timer name='hypervclock' present='yes'/>
+ <timer name='tsc' present='yes' mode='native'/>
+ </clock>
+ <on_poweroff>destroy</on_poweroff>
+ <on_reboot>restart</on_reboot>
+ <on_crash>destroy</on_crash>
+ <pm>
+ <suspend-to-mem enabled='no'/>
+ <suspend-to-disk enabled='no'/>
+ </pm>
+ <devices>
+ <emulator>/usr/bin/qemu-system-x86_64</emulator>
+ <disk type='file' device='cdrom'>
+ <driver name='qemu' type='raw'/>
+ <source file='/home/andrew/isos/tiny11.iso'/>
+ <target dev='sdb' bus='sata'/>
+ <readonly/>
+ <address type='drive' controller='0' bus='0' target='0' unit='1'/>
+ </disk>
+ <disk type='file' device='cdrom'>
+ <driver name='qemu' type='raw'/>
+ <source file='/home/andrew/isos/virtio-win-0.1.240.iso'/>
+ <target dev='sdc' bus='sata'/>
+ <readonly/>
+ <address type='drive' controller='0' bus='0' target='0' unit='2'/>
+ </disk>
+ <disk type='file' device='cdrom'>
+ <driver name='qemu' type='raw'/>
+ <source file='/home/andrew/isos/virtio-win-0.1.248.iso'/>
+ <target dev='sdd' bus='sata'/>
+ <readonly/>
+ <address type='drive' controller='0' bus='0' target='0' unit='3'/>
+ </disk>
+ <disk type='file' device='disk'>
+ <driver name='qemu' type='qcow2' cache='writeback' io='io_uring' discard='unmap' iothread='1'/>
+ <source file='/var/lib/libvirt/images/corpa.qcow2'/>
+ <target dev='vda' bus='virtio'/>
+ <boot order='1'/>
+ <address type='pci' domain='0x0000' bus='0x05' slot='0x00' function='0x0'/>
+ </disk>
+ <controller type='usb' index='0' model='qemu-xhci' ports='15'>
+ <address type='pci' domain='0x0000' bus='0x02' slot='0x00' function='0x0'/>
+ </controller>
+ <controller type='pci' index='0' model='pcie-root'/>
+ <controller type='pci' index='1' model='pcie-root-port'>
+ <model name='pcie-root-port'/>
+ <target chassis='1' port='0x10'/>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0' multifunction='on'/>
+ </controller>
+ <controller type='pci' index='2' model='pcie-root-port'>
+ <model name='pcie-root-port'/>
+ <target chassis='2' port='0x11'/>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x1'/>
+ </controller>
+ <controller type='pci' index='3' model='pcie-root-port'>
+ <model name='pcie-root-port'/>
+ <target chassis='3' port='0x12'/>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x2'/>
+ </controller>
+ <controller type='pci' index='4' model='pcie-root-port'>
+ <model name='pcie-root-port'/>
+ <target chassis='4' port='0x13'/>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x3'/>
+ </controller>
+ <controller type='pci' index='5' model='pcie-root-port'>
+ <model name='pcie-root-port'/>
+ <target chassis='5' port='0x14'/>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x4'/>
+ </controller>
+ <controller type='pci' index='6' model='pcie-root-port'>
+ <model name='pcie-root-port'/>
+ <target chassis='6' port='0x15'/>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x5'/>
+ </controller>
+ <controller type='pci' index='7' model='pcie-root-port'>
+ <model name='pcie-root-port'/>
+ <target chassis='7' port='0x16'/>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x6'/>
+ </controller>
+ <controller type='pci' index='8' model='pcie-root-port'>
+ <model name='pcie-root-port'/>
+ <target chassis='8' port='0x17'/>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x7'/>
+ </controller>
+ <controller type='pci' index='9' model='pcie-root-port'>
+ <model name='pcie-root-port'/>
+ <target chassis='9' port='0x18'/>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0' multifunction='on'/>
+ </controller>
+ <controller type='pci' index='10' model='pcie-root-port'>
+ <model name='pcie-root-port'/>
+ <target chassis='10' port='0x19'/>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x1'/>
+ </controller>
+ <controller type='pci' index='11' model='pcie-root-port'>
+ <model name='pcie-root-port'/>
+ <target chassis='11' port='0x1a'/>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x2'/>
+ </controller>
+ <controller type='pci' index='12' model='pcie-root-port'>
+ <model name='pcie-root-port'/>
+ <target chassis='12' port='0x1b'/>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x3'/>
+ </controller>
+ <controller type='pci' index='13' model='pcie-root-port'>
+ <model name='pcie-root-port'/>
+ <target chassis='13' port='0x1c'/>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x4'/>
+ </controller>
+ <controller type='pci' index='14' model='pcie-root-port'>
+ <model name='pcie-root-port'/>
+ <target chassis='14' port='0x1d'/>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x5'/>
+ </controller>
+ <controller type='sata' index='0'>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x1f' function='0x2'/>
+ </controller>
+ <controller type='virtio-serial' index='0'>
+ <address type='pci' domain='0x0000' bus='0x03' slot='0x00' function='0x0'/>
+ </controller>
+ <filesystem type='mount' accessmode='passthrough'>
+ <driver type='virtiofs' queue='1024'/>
+ <binary path='/usr/libexec/virtiofsd' xattr='on'/>
+ <source dir='/mnt/ssd/SteamLibrary/steamapps/common'/>
+ <target dir='SteamLibraryA'/>
+ <address type='pci' domain='0x0000' bus='0x06' slot='0x00' function='0x0'/>
+ </filesystem>
+ <interface type='bridge'>
+ <mac address='52:54:00:c6:ef:20'/>
+ <source bridge='virbr0'/>
+ <model type='virtio'/>
+ <address type='pci' domain='0x0000' bus='0x01' slot='0x00' function='0x0'/>
+ </interface>
+ <serial type='pty'>
+ <target type='isa-serial' port='0'>
+ <model name='isa-serial'/>
+ </target>
+ </serial>
+ <console type='pty'>
+ <target type='serial' port='0'/>
+ </console>
+ <channel type='spicevmc'>
+ <target type='virtio' name='com.redhat.spice.0'/>
+ <address type='virtio-serial' controller='0' bus='0' port='1'/>
+ </channel>
+ <channel type='qemu-vdagent'>
+ <source>
+ <clipboard copypaste='yes'/>
+ </source>
+ <target type='virtio' name='org.qemu.guest_agent.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'/>
+ <tpm model='tpm-crb'>
+ <backend type='emulator' version='2.0'/>
+ </tpm>
+ <graphics type='spice' port='5900' autoport='no' listen='0.0.0.0'>
+ <listen type='address' address='0.0.0.0'/>
+ <gl enable='no'/>
+ </graphics>
+ <sound model='ich9'>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x1b' function='0x0'/>
+ </sound>
+ <audio id='1' type='spice'/>
+ <video>
+ <model type='qxl' ram='65536' vram='65536' vgamem='65536' heads='1' primary='yes'/>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x0'/>
+ </video>
+ <redirdev bus='usb' type='spicevmc'>
+ <address type='usb' bus='0' port='2'/>
+ </redirdev>
+ <watchdog model='itco' action='reset'/>
+ <memballoon model='virtio'>
+ <address type='pci' domain='0x0000' bus='0x04' slot='0x00' function='0x0'/>
+ </memballoon>
+ </devices>
+</domain>
diff --git a/hosts/iroha/libvirt/qemu/soy.xml b/hosts/iroha/libvirt/qemu/soy.xml
new file mode 100644
index 0000000..52ed042
--- /dev/null
+++ b/hosts/iroha/libvirt/qemu/soy.xml
@@ -0,0 +1,202 @@
+<!--
+WARNING: THIS IS AN AUTO-GENERATED FILE. CHANGES TO IT ARE LIKELY TO BE
+OVERWRITTEN AND LOST. Changes to this xml configuration should be made using:
+ virsh edit soy
+or other application using the libvirt API.
+-->
+
+<domain type='kvm'>
+ <name>soy</name>
+ <uuid>e2036eaa-3309-4cef-863f-82389718b55f</uuid>
+ <metadata>
+ <libosinfo:libosinfo xmlns:libosinfo="http://libosinfo.org/xmlns/libvirt/domain/1.0">
+ <libosinfo:os id="http://ubuntu.com/ubuntu/23.04"/>
+ </libosinfo:libosinfo>
+ </metadata>
+ <memory unit='KiB'>8388608</memory>
+ <currentMemory unit='KiB'>8388608</currentMemory>
+ <memoryBacking>
+ <source type='memfd'/>
+ <access mode='shared'/>
+ </memoryBacking>
+ <vcpu placement='static'>4</vcpu>
+ <os>
+ <type arch='x86_64' machine='pc-q35-9.0'>hvm</type>
+ </os>
+ <features>
+ <acpi/>
+ <apic/>
+ <vmport state='off'/>
+ </features>
+ <cpu mode='host-passthrough' check='none' migratable='on'>
+ <topology sockets='1' dies='1' clusters='1' cores='4' threads='1'/>
+ <cache mode='passthrough'/>
+ <feature policy='require' name='topoext'/>
+ <feature policy='require' name='invtsc'/>
+ <feature policy='disable' name='monitor'/>
+ <feature policy='disable' name='svm'/>
+ </cpu>
+ <clock offset='utc'>
+ <timer name='rtc' tickpolicy='catchup'/>
+ <timer name='pit' tickpolicy='delay'/>
+ <timer name='hpet' present='no'/>
+ <timer name='tsc' present='yes' mode='native'/>
+ </clock>
+ <on_poweroff>destroy</on_poweroff>
+ <on_reboot>restart</on_reboot>
+ <on_crash>destroy</on_crash>
+ <pm>
+ <suspend-to-mem enabled='no'/>
+ <suspend-to-disk enabled='no'/>
+ </pm>
+ <devices>
+ <emulator>/usr/bin/qemu-system-x86_64</emulator>
+ <disk type='file' device='disk'>
+ <driver name='qemu' type='qcow2' cache='writeback' io='io_uring' discard='unmap'/>
+ <source file='/var/lib/libvirt/images/soy.qcow2'/>
+ <target dev='vda' bus='virtio'/>
+ <boot order='1'/>
+ <address type='pci' domain='0x0000' bus='0x04' slot='0x00' function='0x0'/>
+ </disk>
+ <disk type='file' device='cdrom'>
+ <driver name='qemu' type='raw'/>
+ <source file='/home/andrew/isos/ubuntu-23.04-desktop-amd64.iso'/>
+ <target dev='sda' bus='sata'/>
+ <readonly/>
+ <address type='drive' controller='0' bus='0' target='0' unit='0'/>
+ </disk>
+ <controller type='usb' index='0' model='qemu-xhci' ports='15'>
+ <address type='pci' domain='0x0000' bus='0x02' slot='0x00' function='0x0'/>
+ </controller>
+ <controller type='pci' index='0' model='pcie-root'/>
+ <controller type='pci' index='1' model='pcie-root-port'>
+ <model name='pcie-root-port'/>
+ <target chassis='1' port='0x10'/>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0' multifunction='on'/>
+ </controller>
+ <controller type='pci' index='2' model='pcie-root-port'>
+ <model name='pcie-root-port'/>
+ <target chassis='2' port='0x11'/>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x1'/>
+ </controller>
+ <controller type='pci' index='3' model='pcie-root-port'>
+ <model name='pcie-root-port'/>
+ <target chassis='3' port='0x12'/>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x2'/>
+ </controller>
+ <controller type='pci' index='4' model='pcie-root-port'>
+ <model name='pcie-root-port'/>
+ <target chassis='4' port='0x13'/>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x3'/>
+ </controller>
+ <controller type='pci' index='5' model='pcie-root-port'>
+ <model name='pcie-root-port'/>
+ <target chassis='5' port='0x14'/>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x4'/>
+ </controller>
+ <controller type='pci' index='6' model='pcie-root-port'>
+ <model name='pcie-root-port'/>
+ <target chassis='6' port='0x15'/>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x5'/>
+ </controller>
+ <controller type='pci' index='7' model='pcie-root-port'>
+ <model name='pcie-root-port'/>
+ <target chassis='7' port='0x16'/>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x6'/>
+ </controller>
+ <controller type='pci' index='8' model='pcie-root-port'>
+ <model name='pcie-root-port'/>
+ <target chassis='8' port='0x17'/>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x7'/>
+ </controller>
+ <controller type='pci' index='9' model='pcie-root-port'>
+ <model name='pcie-root-port'/>
+ <target chassis='9' port='0x18'/>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0' multifunction='on'/>
+ </controller>
+ <controller type='pci' index='10' model='pcie-root-port'>
+ <model name='pcie-root-port'/>
+ <target chassis='10' port='0x19'/>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x1'/>
+ </controller>
+ <controller type='pci' index='11' model='pcie-root-port'>
+ <model name='pcie-root-port'/>
+ <target chassis='11' port='0x1a'/>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x2'/>
+ </controller>
+ <controller type='pci' index='12' model='pcie-root-port'>
+ <model name='pcie-root-port'/>
+ <target chassis='12' port='0x1b'/>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x3'/>
+ </controller>
+ <controller type='pci' index='13' model='pcie-root-port'>
+ <model name='pcie-root-port'/>
+ <target chassis='13' port='0x1c'/>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x4'/>
+ </controller>
+ <controller type='pci' index='14' model='pcie-root-port'>
+ <model name='pcie-root-port'/>
+ <target chassis='14' port='0x1d'/>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x5'/>
+ </controller>
+ <controller type='sata' index='0'>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x1f' function='0x2'/>
+ </controller>
+ <controller type='virtio-serial' index='0'>
+ <address type='pci' domain='0x0000' bus='0x03' slot='0x00' function='0x0'/>
+ </controller>
+ <interface type='bridge'>
+ <mac address='52:54:00:8c:30:01'/>
+ <source bridge='virbr0'/>
+ <model type='virtio'/>
+ <address type='pci' domain='0x0000' bus='0x01' slot='0x00' function='0x0'/>
+ </interface>
+ <serial type='pty'>
+ <target type='isa-serial' port='0'>
+ <model name='isa-serial'/>
+ </target>
+ </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' port='5900' autoport='no' listen='0.0.0.0'>
+ <listen type='address' address='0.0.0.0'/>
+ <gl enable='no'/>
+ </graphics>
+ <sound model='ich9'>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x1b' function='0x0'/>
+ </sound>
+ <audio id='1' type='spice'/>
+ <video>
+ <model type='virtio' heads='1' primary='yes'/>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x01' 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>
+ <watchdog model='itco' action='reset'/>
+ <memballoon model='virtio'>
+ <address type='pci' domain='0x0000' bus='0x05' slot='0x00' function='0x0'/>
+ </memballoon>
+ <rng model='virtio'>
+ <backend model='random'>/dev/urandom</backend>
+ <address type='pci' domain='0x0000' bus='0x06' slot='0x00' function='0x0'/>
+ </rng>
+ </devices>
+</domain>