Bläddra i källkod

Primer commit

Celestino Rey 7 månader sedan
incheckning
da55b7cc4e
12 ändrade filer med 1518 tillägg och 0 borttagningar
  1. 398 0
      Complete Guide to KVM Virtualization.md
  2. 161 0
      README.md
  3. 82 0
      antix.xml
  4. 8 0
      instala.sh
  5. 13 0
      instalaGrafico.sh
  6. 8 0
      instalaWorker1.sh
  7. 19 0
      kubeconfig-principal
  8. 6 0
      kvm-hostbridge.xml
  9. 234 0
      principal.xml
  10. 153 0
      ubuntu44.config
  11. 218 0
      worker1.xml
  12. 218 0
      worker2.xml

+ 398 - 0
Complete Guide to KVM Virtualization.md

@@ -0,0 +1,398 @@
+# Complete Guide to KVM Virtualization on Ubuntu 24.04 LTS
+>KVM (Kernel-based Virtual Machine) is a powerful open-source virtualization technology that transforms Linux into a type-1 (bare-metal) hypervisor. With Ubuntu 24.04 LTS, KVM provides enterprise-grade virtualization capabilities that rival proprietary solutions while maintaining the flexibility and cost-effectiveness of open source.
+
+## Introduction
+
+KVM (Kernel-based Virtual Machine) is a powerful open-source virtualization technology that transforms Linux into a type-1 (bare-metal) hypervisor. With Ubuntu 24.04 LTS, KVM provides enterprise-grade virtualization capabilities that rival proprietary solutions while maintaining the flexibility and cost-effectiveness of open source.
+
+This comprehensive guide will walk you through setting up KVM on Ubuntu 24.04, creating virtual machines, and mastering essential management techniques. Whether you're building a home lab, deploying production workloads, or migrating from VMware, this tutorial provides everything you need to get started.
+
+## Prerequisites
+
+Before installing KVM, ensure your system meets these requirements:
+
+## Hardware Requirements
+
+CPU: 64-bit processor with hardware virtualization support
+Intel: VT-x (vmx flag)
+AMD: AMD-V (svm flag)
+RAM: Minimum 4GB (8GB+ recommended)
+Storage: At least 20GB free space for host OS and VMs
+Network: Ethernet adapter for bridge networking
+Verify Hardware Virtualization Support
+
+Check if your CPU supports virtualization:
+
+    # Check for Intel VT-x or AMD-V support
+    egrep -c '(vmx|svm)' /proc/cpuinfo
+
+    # If the output is greater than 0, virtualization is supported
+    # For detailed CPU flags
+    lscpu | grep Virtualization
+
+## Installing KVM on Ubuntu 24.04
+
+### Step 1: Update System Packages
+
+    sudo apt update && sudo apt upgrade -y
+
+### Step 2: Install KVM and Related Packages
+
+    sudo apt -y install qemu-kvm libvirt-daemon-system libvirt-daemon virtinst bridge-utils libosinfo-bin
+
+Package breakdown:
+
+* ```qemu-kvm```: The main KVM hypervisor
+* ```libvirt-daemon-system```: System daemon for managing VMs
+* ```libvirt-daemon```: Virtualization management daemon
+* ```virtinst```: Command-line tools for creating VMs
+* ```bridge-utils```: Utilities for configuring network bridges
+* ```libosinfo-bin```: Database of operating systems for optimal configurations
+
+### Step 3: Add User to Required Groups
+
+    # Add your user to libvirt and kvm groups
+    sudo usermod -aG libvirt $USER
+    sudo usermod -aG kvm $USER
+
+    # Apply group changes without logging out
+    newgrp libvirt
+    newgrp kvm
+
+### Step 4: Verify Installation
+
+    # Check if KVM modules are loaded
+    lsmod | grep kvm
+    # Verify libvirt service is running
+    sudo systemctl status libvirtd
+    # Test virsh command
+    virsh list --all
+
+## Configuring Bridge Networking
+
+Bridge networking allows VMs to appear as physical hosts on your network, getting IP addresses from your DHCP server.
+
+### Step 1: Identify Your Network Interface
+
+    ip addr show
+    # Note your primary interface name (e.g., enp1s0, eth0)
+
+### Step 2: Configure Netplan for Bridge Networking
+
+Edit your Netplan configuration:
+
+    sudo vi /etc/netplan/50-cloud-init.yaml
+
+Replace the content with:
+
+    network:
+    version: 2
+    ethernets:
+        enp4s0:
+        dhcp4: true
+    bridges:
+        br0:
+        dhcp4: yes
+        interfaces:
+            - enp4s0
+
+Substitute ```enp4s0``` with the interface from Step 1 above.
+
+### Step 3: Apply Network Configuration
+
+    # Apply the new configuration
+    sudo netplan apply
+    # Verify bridge creation
+    ip addr show br0
+    brctl show
+
+## Creating Your First Virtual Machine
+
+### Option 1: Command-Line Installation with virt-install
+
+This method provides full control over VM creation:
+
+    ​​​​​​​# Create a directory for VM images
+    sudo mkdir -p /var/kvm/images
+
+    # Download Ubuntu 24.04 Server ISO
+    wget https://releases.ubuntu.com/24.04/ubuntu-24.04-live-server-amd64.iso
+
+    # Create VM with virt-install
+    sudo virt-install \
+    --name ubuntu-vm1 \
+    --ram 4096 \
+    --disk path=/var/kvm/images/ubuntu-vm1.img,size=20 \
+    --vcpus 2 \
+    --os-variant ubuntu24.04 \
+    --network bridge=br0 \
+    --graphics none \
+    --console pty,target_type=serial \
+    --location /path/to/ubuntu-24.04-live-server-amd64.iso,kernel=casper/vmlinuz,initrd=casper/initrd \
+    --extra-args 'console=ttyS0,115200n8'
+
+### Option 2: Using virt-manager GUI
+
+For desktop users, install the graphical interface:
+
+    ​sudo apt install virt-manager
+    # Launch virt-manager
+    virt-manager
+
+#### Understanding virt-install Parameters
+
+| Parameter	| Description |
+| --------- | ----------- |
+| ```--name```	| VM name (must be unique) |
+| ```--ram```	| 	Memory allocation in MB |
+| ```--disk```	| 	Disk configuration (path and size) |
+| ```--vcpus```	| 	Number of virtual CPUs |
+| ```--os-variant```	| 	OS type for optimization |
+| ```--network```	| 	Network configuration |
+| ```--graphics```	| 	Display type (none for headless) |
+| ```--console```	| 	Console connection type |
+
+## Essential VM Management Commands
+
+#### Starting and Stopping VMs
+
+    ​​​​​​​# Start a VM
+    virsh start ubuntu-vm1
+    # Start and connect to console
+    virsh start ubuntu-vm1 --console
+    # Graceful shutdown
+    virsh shutdown ubuntu-vm1
+    # Force stop (use cautiously)
+    virsh destroy ubuntu-vm1
+    # Reboot VM
+    virsh reboot ubuntu-vm1
+
+#### Listing and Monitoring VMs
+
+    ​​​​​​​# List running VMs
+    virsh list
+    # List all VMs (including stopped)
+    virsh list --all
+    # Show VM information
+    virsh dominfo ubuntu-vm1
+    # Display VM configuration
+    virsh dumpxml ubuntu-vm1
+
+#### Console Access
+
+    # Connect to VM console
+    virsh console ubuntu-vm1
+    # Exit console: Ctrl + ]
+
+#### Auto-start Configuration
+
+    # Enable auto-start
+    virsh autostart ubuntu-vm1
+    # Disable auto-start
+    virsh autostart --disable ubuntu-vm1
+
+
+## Storage Management
+
+### Creating Storage Pools
+
+    ​​​​​​​# Create a new storage pool directory
+    sudo mkdir -p /var/lib/libvirt/images/vmpool
+    # Define the storage pool
+    virsh pool-define-as vmpool dir - - - - "/var/lib/libvirt/images/vmpool"
+    # Start the pool
+    virsh pool-start vmpool
+    # Enable auto-start
+    virsh pool-autostart vmpool
+    # List storage pools
+    virsh pool-list --all
+
+### Managing Virtual Disks
+
+    ​​​​​​​# Create a new disk
+    virsh vol-create-as vmpool ubuntu-vm2.qcow2 30G --format qcow2
+    # List volumes in a pool
+    virsh vol-list vmpool
+    # Delete a volume
+    virsh vol-delete ubuntu-vm2.qcow2 --pool vmpool
+
+## Advanced VM Management Tools
+
+### Install Management Utilities
+
+​​​​    ​​​sudo apt -y install libguestfs-tools virt-top
+
+### Using libguestfs Tools
+
+    ​​​​​​​# List files in VM
+    virt-ls -l -d ubuntu-vm1 /etc
+    # View file content
+    virt-cat -d ubuntu-vm1 /etc/hostname
+    # Edit files in VM (while stopped)
+    virt-edit -d ubuntu-vm1 /etc/hosts
+    # Check disk usage
+    virt-df -d ubuntu-vm1
+    # Mount VM filesystem
+    sudo guestmount -d ubuntu-vm1 -i /mnt
+    sudo umount /mnt
+
+### Real-time Monitoring with virt-top
+
+    # Monitor VM performance
+    virt-top
+    # Sort by CPU usage: shift + P
+    # Sort by memory: shift + M
+    # Help: h
+    # Quit: q
+
+## VM Cloning and Snapshots
+
+### Cloning VMs
+
+    # Clone a VM
+    virt-clone --original ubuntu-vm1 --name ubuntu-vm2 --file /var/kvm/images/ubuntu-vm2.img
+    # Clone with auto-generated storage
+virt-clone --original ubuntu-vm1 --name ubuntu-vm3 --auto-clone
+
+### Managing Snapshots
+
+    # Create snapshot
+    virsh snapshot-create-as ubuntu-vm1 --name "before-updates" --description "Clean install"
+    # List snapshots
+    virsh snapshot-list ubuntu-vm1
+    # Revert to snapshot
+    virsh snapshot-revert ubuntu-vm1 "before-updates"
+    # Delete snapshot
+    virsh snapshot-delete ubuntu-vm1 "before-updates"
+
+## Nested Virtualization
+
+Enable nested virtualization to run VMs inside VMs:
+
+### Check Current Status
+
+    # For Intel
+    cat /sys/module/kvm_intel/parameters/nested
+    # For AMD
+    cat /sys/module/kvm_amd/parameters/nested
+
+### Enable Nested Virtualization
+
+    ​​​​​​​# For Intel CPUs
+    echo 'options kvm_intel nested=1' | sudo tee /etc/modprobe.d/kvm-intel.conf
+    # For AMD CPUs
+    echo 'options kvm_amd nested=1' | sudo tee /etc/modprobe.d/kvm-amd.conf
+    # Reload module (Intel example)
+    sudo modprobe -r kvm_intel
+    sudo modprobe kvm_intel
+
+### Configure VM for Nested Virtualization
+
+    # Edit VM configuration
+    virsh edit ubuntu-vm1
+    # Add or modify CPU configuration:
+    <cpu mode='host-passthrough' check='none' migratable='on'/>
+
+## Performance Optimization
+
+### CPU Pinning
+
+    ​​​​​​​# Pin vCPUs to physical CPUs
+    virsh vcpupin ubuntu-vm1 0 0
+    virsh vcpupin ubuntu-vm1 1 1
+
+## Memory Optimization
+
+    ​​​​​​​# Set memory balloon
+    virsh setmem ubuntu-vm1 2048M --config
+    # Enable hugepages
+    echo 'vm.nr_hugepages = 1024' | sudo tee -a /etc/sysctl.conf
+    sudo sysctl -p
+
+## Disk I/O Optimization
+
+Use VirtIO drivers and cache modes:
+
+    ​​​​​​​<disk type='file' device='disk'>
+    <driver name='qemu' type='qcow2' cache='writeback' io='threads'/>
+    <source file='/var/kvm/images/ubuntu-vm1.img'/>
+    <target dev='vda' bus='virtio'/>
+    </disk>
+
+## Backup and Migration
+
+### Backup VMs
+
+    ​​​​​​​# Backup VM configuration
+    virsh dumpxml ubuntu-vm1 > ubuntu-vm1.xml
+    # Backup disk image
+    sudo cp /var/kvm/images/ubuntu-vm1.img /backup/
+    # Create compressed backup
+    sudo qemu-img convert -c -O qcow2 /var/kvm/images/ubuntu-vm1.img /backup/ubuntu-vm1-backup.qcow2
+
+### Live Migration (requires shared storage)
+
+    # Migrate to another host
+    virsh migrate --live ubuntu-vm1 qemu+ssh://dest-host/system
+
+### Troubleshooting Common Issues
+
+#### VM Won't Start
+
+    # Check logs
+    journalctl -u libvirtd -f
+    # Verify VM configuration
+    virsh domblklist ubuntu-vm1
+    virsh domiflist ubuntu-vm1
+    # Check for errors
+    virsh start ubuntu-vm1 --console
+
+#### Network Issues
+
+    # Verify bridge configuration
+    brctl show
+    ip addr show br0
+    # Check VM network
+    virsh domiflist ubuntu-vm1
+    virsh domifaddr ubuntu-vm1
+
+#### Permission Issues
+
+    # Fix ownership
+    sudo chown -R libvirt-qemu:kvm /var/lib/libvirt/images/
+    # Check AppArmor
+    sudo aa-status
+
+### Security Best Practices
+
+#### Regular Updates
+    sudo apt update && sudo apt upgrade
+
+#### Firewall Configuration
+    sudo ufw allow 22/tcp
+	sudo ufw enable
+
+#### SELinux/AppArmor
+* Keep security modules enabled
+* Update policies as needed
+#### Resource Limits
+* Set CPU and memory limits
+* Use cgroups for resource control
+#### Network Isolation
+* Use VLANs for network segmentation
+* Implement firewall rules between VMs
+
+## Conclusion
+
+KVM on Ubuntu 24.04 provides a robust, enterprise-ready virtualization platform that's both powerful and free. With features like live migration, snapshots, and nested virtualization, it rivals commercial hypervisors while maintaining the flexibility of open source.
+
+Whether you're running a home lab, development environment, or production infrastructure, KVM offers the tools and performance needed for modern virtualization workloads. The combination of command-line tools and graphical interfaces makes it accessible to both beginners and advanced users.
+
+As you continue your virtualization journey, explore advanced features like:
+
+* GPU passthrough for graphics-intensive workloads
+* SR-IOV for high-performance networking
+* Integration with cloud platforms like OpenStack
+* Automation with tools like Terraform and Ansible
+
+With Ubuntu 24.04 LTS's five-year support cycle, you have a stable foundation for building and maintaining your virtualized infrastructure.

+ 161 - 0
README.md

@@ -0,0 +1,161 @@
+# Notas sobre la creación de VM
+
+## Comando general para lanzar la VM
+
+Lo encontré en (este enlace)[https://wiki.debian.org/KVM#Introduction]
+
+## Corregir error de desconexión de monitor
+
+Para que no de error de que se desconecta del monitor, hay que modificar el fichero
+
+    /etc/libvirt/qemu.conf
+
+y añadir las siguientes líneas (yo las puse al final del fichero)
+
+    user = "root"
+    group = "root"
+
+
+# Especificar initrd y kernel
+
+| Distro |Kernel path|RAM disk path|
+|Fedora|/isolinux/vmlinuz|/isolinux/initrd.img|
+|RHEL5/CentOS5|/isolinux/vmlinuz|/isolinux/initrd.img|
+|openSUSE|/boot/i386/loader/linux|/boot/i386/loader/initrd|
+|Mandriva|/i586/isolinux/alt0/vmlinuz|/i586/isolinux/alt0/all.rdz|
+|Ubuntu|/casper/vmlinuz|/casper/initrd.gz or /casper/initrd|
+|Debian|/install.386/vmlinuz/|/isolinux/initrd.img|
+
+
+## Relocate an existing libvirtd (KVM) images directory
+By default, KVM (libvirtd) images on Ubuntu and most other Linux distributions are found in /var/lib/libvirt/images. This can be inconvenient if you don't have a separate /var partition that can grow over time to accommodate multiple large images.
+
+You _can_ simply rename the images folder to something else and then symlink to a larger space with it (e.g. ```ln -s /data1/libvirt/images /var/lib/libvirt/images```). That's what I used to do.
+
+But that can lead to all sorts of unanticipated trouble. The _right_ way to have your images on a bigger disk is to change the path for libvirt's default storage pool to a partition on that big disk, which is logically where KVM is going to create them.
+
+NOTE: The Ubuntu package for libvirt-daemon-system automatically sets up a [libvirt group](https://documentation.ubuntu.com/server/how-to/virtualisation/libvirt/) for libvirt admins (that includes members of the sudo group by default). Members of libvirt can run virsh commands without sudo. YMMV if not a member of the sudo group, or not on Ubuntu.
+
+First check to make sure a default pool exists:
+
+```bash
+$ virsh pool-list --all
+ Name      State    Autostart
+-------------------------------
+ default   active   yes
+```
+
+**NOTE: If no default pool exists, follow the instructions in [this gist](https://gist.github.com/plembo/13ce29c9279807adfd9bd6b959f43fac) to create one on your preferred storage volume.**
+
+Assuming a default pool exists, find the current default pool's path:
+
+```xml
+$ virsh pool-dumpxml default
+<pool type='dir'>
+  <name>default</name>
+  <uuid>91c6d1b3-4e42-4a1f-989e-89b2127da056</uuid>
+  <capacity unit='bytes'>133070688256</capacity>
+  <allocation unit='bytes'>25177309184</allocation>
+  <available unit='bytes'>107893379072</available>
+  <source>
+  </source>
+  <target>
+    <path>/var/lib/libvirt/images</path>
+    <permissions>
+      <mode>0711</mode>
+      <owner>64055</owner>
+      <group>108</group>
+    </permissions>
+  </target>
+</pool>
+```
+
+Before going further it is best to shut down ("destroy") all existing virtual machines).
+
+Now use ```virsh edit``` to change the disk path in each virtual machines's configuration to the default pool's new location. Assuming this will be "/data1/libvirt/images", you would proceed like this:
+
+```xml
+$ virsh edit example
+...
+<disk type='file' device='disk'>
+    <driver name='qemu' type='qcow2'/>
+-   <source file='/var/lib/libvirt/images/example.qcow2'/>
++   <source file='/data1/libvirt/images/example.qcow2'/>
+```
+(the line will then read ```<source file='/data1/libvirt/images/example.qcow2'```
+
+Next, the default pool should be completely shut down:
+
+```
+$ virsh pool-destroy default
+```
+Then, undefined:
+
+```
+$ virsh pool-undefine default
+```
+NOTE: By default, virt-manager creates additional pools automatically for things like iso files. These should also be destroyed and undefined before proceeding, to free things up for redefining the default pool (if you don't, the system will spit out "error: operation failed: Storage source conflict with pool" messages when you try redefining).
+
+Now, recreate the default pool anew and start:
+
+```bash
+$ virsh pool-define-as default dir --target "/data1/libvirt/images"
+$ virsh pool-build default
+$ virsh pool-start default
+$ virsh pool-autostart default
+```
+
+Check the status with virsh-info:
+```bash
+$ virsh pool-info default
+```
+
+And then the configuration with pool-dumpxml:
+
+```bash
+$ virsh pool-dumpxml default
+```
+
+Finally, move any existing disk images from /var/lib/libvirt/images to the new location (e.g. /data1/libvirt/images).
+
+
+## Cambiar el interfaz de red de una VM
+
+To change a VM's network with virsh, you can either edit the VM's XML configuration using virsh edit and then restart the VM, or use virsh net-edit to modify the network itself and then restart the network. The most common method is to shut down the VM, edit its XML definition, and then start it again. For network-wide changes, you can edit the network's XML definition and then restart the network to apply the changes. 
+
+### Method 1: Editing the VM's network configuration
+
+This method is for when you want to change the network attached to a specific VM.
+
+1. Shut down the VM:
+    virsh shutdown <vm_name>
+2. Edit the VM's XML:
+    virsh edit <vm_name>
+
+This will open the VM's XML file in a text editor. Find the <interface> section for the network you want to change.
+
+    <interface type='network'>
+      <mac address='52:54:00:7a:a0:cd'/>
+-      <source network='default'/>
++      <source network='hostbridge'/>
+      <model type='virtio'/>
+      <address type='pci' domain='0x0000' bus='0x01' slot='0x00' function='0x0'/>
+    </interface>
+
+
+3. Save and close the editor.
+
+Apply the changes:
+
+    virsh start <vm_name>
+
+The VM will start with the new network configuration. 
+
+
+
+## Renombrar máquina
+
+    virsh dumpxml myvm > foo.xml
+    <edit foo.xml, change the name, move storage>
+    virsh undefine myvm
+    virsh define foo.xml

+ 82 - 0
antix.xml

@@ -0,0 +1,82 @@
+<domain type='kvm'>
+  <name>antix</name>
+  <uuid>063a31db-b307-41cb-9a7e-c18e7f24208c</uuid>
+  <memory unit='KiB'>4296704</memory>
+  <currentMemory unit='KiB'>4296704</currentMemory>
+  <vcpu placement='static'>1</vcpu>
+  <os>
+    <type arch='x86_64' machine='pc-i440fx-6.2'>hvm</type>
+    <boot dev='hd'/>
+  </os>
+  <features>
+    <acpi/>
+    <apic/>
+  </features>
+  <cpu mode='host-model' check='partial'/>
+  <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>destroy</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/antix.qcow2'/>
+      <target dev='vda' bus='virtio'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/>
+    </disk>
+    <disk type='file' device='cdrom'>
+      <driver name='qemu' type='raw'/>
+      <source file='/var/lib/libvirt/images/isos/antiX-23.2_x64-base.iso'/>
+      <target dev='hda' bus='ide'/>
+      <readonly/>
+      <address type='drive' controller='0' bus='0' target='0' unit='0'/>
+    </disk>
+    <controller type='usb' index='0' model='piix3-uhci'>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/>
+    </controller>
+    <controller type='pci' index='0' model='pci-root'/>
+    <controller type='ide' index='0'>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/>
+    </controller>
+    <interface type='network'>
+      <mac address='52:54:00:85:d2:e8'/>
+      <source network='default'/>
+      <model type='virtio'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' 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>
+    <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='vnc' port='-1' autoport='yes'>
+      <listen type='address'/>
+    </graphics>
+    <audio id='1' type='none'/>
+    <video>
+      <model type='cirrus' vram='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='0x04' function='0x0'/>
+    </memballoon>
+  </devices>
+</domain>
+

+ 8 - 0
instala.sh

@@ -0,0 +1,8 @@
+virt-install --virt-type kvm --name ubuntu22 \
+	--location /mnt/Externo/vms/images/isos/ubuntu-22.04.5-live-server-amd64.iso,initrd=/casper/initrd,kernel=/casper/vmlinuz \
+	--os-variant ubuntu22.04 \
+	--disk size=30 \
+	--memory 4096 \
+	--graphics spice \
+	--console pty,target_type=serial  \
+	--extra-args console=ttyS0

+ 13 - 0
instalaGrafico.sh

@@ -0,0 +1,13 @@
+virt-install \
+  --name my-spice-vm \
+  --ram 2048 \
+  --vcpus 2 \
+  --disk path=/var/lib/libvirt/images/my-vm.qcow2,size=20 \
+  --os-type linux \
+  --os-variant detect=on \
+  --location /home/creylopez/VM/ubuntu-22.04.5-live-server-amd64.iso,initrd=/casper/initrd,kernel=/casper/vmlinuz \
+  --graphics spice,listen=0.0.0.0 \
+  --video qxl \
+  --console pty,target_type=serial \
+  --noautoconsole 
+

+ 8 - 0
instalaWorker1.sh

@@ -0,0 +1,8 @@
+virt-install --virt-type kvm --name worker1 \
+	--location /home/creylopez/VM/ubuntu-22.04.5-live-server-amd64.iso,initrd=/casper/initrd,kernel=/casper/vmlinuz \
+	--os-variant ubuntu22.04 \
+	--disk size=30 \
+	--memory 4096 \
+	--graphics none \
+	--console pty,target_type=serial  \
+	--extra-args console=ttyS0

+ 19 - 0
kubeconfig-principal

@@ -0,0 +1,19 @@
+apiVersion: v1
+clusters:
+- cluster:
+    certificate-authority-data: LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUJlakNDQVIrZ0F3SUJBZ0lCQURBS0JnZ3Foa2pPUFFRREFqQWtNU0l3SUFZRFZRUUREQmx5YTJVeUxYTmwKY25abGNpMWpZVUF4TnpZMU16Z3dNVFF5TUI0WERUSTFNVEl4TURFMU1qSXlNbG9YRFRNMU1USXdPREUxTWpJeQpNbG93SkRFaU1DQUdBMVVFQXd3WmNtdGxNaTF6WlhKMlpYSXRZMkZBTVRjMk5UTTRNREUwTWpCWk1CTUdCeXFHClNNNDlBZ0VHQ0NxR1NNNDlBd0VIQTBJQUJFcEFBaU9vWURoeHh0TGZsTkFQL0RsdHRsamgxMjdsV3RIeXR0dSsKS25LbjZ6bEJOdE8xeHhpMkxiK2JpOVF5aGlxekdaMFd4QUlKcHpMbnB5SUdUMnlqUWpCQU1BNEdBMVVkRHdFQgovd1FFQXdJQ3BEQVBCZ05WSFJNQkFmOEVCVEFEQVFIL01CMEdBMVVkRGdRV0JCU1VxdTkxekdXQ1QyZVQ3dTVFCldNZkkydFZjN1RBS0JnZ3Foa2pPUFFRREFnTkpBREJHQWlFQXJNblVyRDlYS1V6bFBURVNGeU1odnczU09EdVAKSVFSZjNZemFTQWh3cGQwQ0lRQ2sxZHBMZks2bUpBams4U2RpZklGUVJoZ3hsVmRSckViMm5aWDlkU2FJdEE9PQotLS0tLUVORCBDRVJUSUZJQ0FURS0tLS0tCg==
+    server: https://192.168.1.110:6443
+  name: default
+contexts:
+- context:
+    cluster: default
+    user: default
+  name: default
+current-context: default
+kind: Config
+preferences: {}
+users:
+- name: default
+  user:
+    client-certificate-data: LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUJrekNDQVRpZ0F3SUJBZ0lJSENpV1NFRElYZ0F3Q2dZSUtvWkl6ajBFQXdJd0pERWlNQ0FHQTFVRUF3d1oKY210bE1pMWpiR2xsYm5RdFkyRkFNVGMyTlRNNE1ERTBNakFlRncweU5URXlNVEF4TlRJeU1qSmFGdzB5TmpFeQpNVEF4TlRJeU1qSmFNREF4RnpBVkJnTlZCQW9URG5ONWMzUmxiVHB0WVhOMFpYSnpNUlV3RXdZRFZRUURFd3h6CmVYTjBaVzA2WVdSdGFXNHdXVEFUQmdjcWhrak9QUUlCQmdncWhrak9QUU1CQndOQ0FBUWVOTjgvaFlKYjhWRVQKcm4rWm5IeEYxUndmay9rQXJqTUhQY3plVlNwRkFwMWx4bFZRSkIwU2pHYkNYQVMxdFlGSWgvVTBqUzBEMEhBOQpWNitQUkd3Tm8wZ3dSakFPQmdOVkhROEJBZjhFQkFNQ0JhQXdFd1lEVlIwbEJBd3dDZ1lJS3dZQkJRVUhBd0l3Ckh3WURWUjBqQkJnd0ZvQVVMcFZoRUJETkRLMml3dTVtc2wySUUwNm43RVl3Q2dZSUtvWkl6ajBFQXdJRFNRQXcKUmdJaEFLQmFkZFRQZ3FaNnQrSnhGVU9ubmU4VkxCd3EzQ1hCOEZ4MzBSSnA4RjZVQWlFQWtZTnJYejIvTkRONApXdEo1SXJURVZ4cFVuZHhhSHR0LzFoZmhMNGx3NStvPQotLS0tLUVORCBDRVJUSUZJQ0FURS0tLS0tCi0tLS0tQkVHSU4gQ0VSVElGSUNBVEUtLS0tLQpNSUlCZVRDQ0FSK2dBd0lCQWdJQkFEQUtCZ2dxaGtqT1BRUURBakFrTVNJd0lBWURWUVFEREJseWEyVXlMV05zCmFXVnVkQzFqWVVBeE56WTFNemd3TVRReU1CNFhEVEkxTVRJeE1ERTFNakl5TWxvWERUTTFNVEl3T0RFMU1qSXkKTWxvd0pERWlNQ0FHQTFVRUF3d1pjbXRsTWkxamJHbGxiblF0WTJGQU1UYzJOVE00TURFME1qQlpNQk1HQnlxRwpTTTQ5QWdFR0NDcUdTTTQ5QXdFSEEwSUFCT0dxTkhDYzJ5cHUvZkNPaVl4ZDJhQzZjR3d3ZXZsREozUC92TkRuCjZkN2ZqQS9NOGx5bnlUNVdmSy9KWUhtVVVhYVNrRXVMczNwWWJ1Z2MveFl0UnBTalFqQkFNQTRHQTFVZER3RUIKL3dRRUF3SUNwREFQQmdOVkhSTUJBZjhFQlRBREFRSC9NQjBHQTFVZERnUVdCQlF1bFdFUUVNME1yYUxDN21heQpYWWdUVHFmc1JqQUtCZ2dxaGtqT1BRUURBZ05JQURCRkFpQkRQS2x1VzV0Q29uU2N6eGZEWUpQbWJPOFVGTERPCk1odldPRW05dDRENmtRSWhBS2pqWDByTVByaWlWTGM5N3NLczFoTGljbXdjYnZCeVU2bnZuaDNlY0ZSZgotLS0tLUVORCBDRVJUSUZJQ0FURS0tLS0tCg==
+    client-key-data: LS0tLS1CRUdJTiBFQyBQUklWQVRFIEtFWS0tLS0tCk1IY0NBUUVFSU1wQ2lRSng1a216UksvYnZXSEtmOTVUNWIxS3RZVnBlZFEyYUVUUWhMQkFvQW9HQ0NxR1NNNDkKQXdFSG9VUURRZ0FFSGpUZlA0V0NXL0ZSRTY1L21aeDhSZFVjSDVQNUFLNHpCejNNM2xVcVJRS2RaY1pWVUNRZApFb3htd2x3RXRiV0JTSWYxTkkwdEE5QndQVmV2ajBSc0RRPT0KLS0tLS1FTkQgRUMgUFJJVkFURSBLRVktLS0tLQo=

+ 6 - 0
kvm-hostbridge.xml

@@ -0,0 +1,6 @@
+<network>
+  <name>hostbridge</name>
+  <forward mode="bridge"/>
+  <bridge name="br0"/>
+</network>
+

+ 234 - 0
principal.xml

@@ -0,0 +1,234 @@
+<domain type='kvm' id='15'>
+  <name>principal</name>
+  <uuid>e47924db-e2eb-4fda-ac58-027025edff08</uuid>
+  <metadata>
+    <libosinfo:libosinfo xmlns:libosinfo="http://libosinfo.org/xmlns/libvirt/domain/1.0">
+      <libosinfo:os id="http://ubuntu.com/ubuntu/22.04"/>
+    </libosinfo:libosinfo>
+  </metadata>
+  <memory unit='KiB'>8388608</memory>
+  <currentMemory unit='KiB'>8388608</currentMemory>
+  <vcpu placement='static'>2</vcpu>
+  <resource>
+    <partition>/machine</partition>
+  </resource>
+  <os>
+    <type arch='x86_64' machine='pc-q35-8.2'>hvm</type>
+    <boot dev='hd'/>
+  </os>
+  <features>
+    <acpi/>
+    <apic/>
+  </features>
+  <cpu mode='host-passthrough' check='none' migratable='on'/>
+  <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>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' discard='unmap'/>
+      <source file='/var/lib/libvirt/images/principal.qcow2' index='3'/>
+      <backingStore/>
+      <target dev='vda' bus='virtio'/>
+      <alias name='virtio-disk0'/>
+      <address type='pci' domain='0x0000' bus='0x04' slot='0x00' function='0x0'/>
+    </disk>
+    <disk type='file' device='disk'>
+      <driver name='qemu' type='raw' cache='none'/>
+      <source file='/var/lib/libvirt/images/principal-rook.qcow2' index='2'/>
+      <backingStore/>
+      <target dev='vdb' bus='virtio'/>
+      <alias name='virtio-disk1'/>
+      <address type='pci' domain='0x0000' bus='0x07' slot='0x00' function='0x0'/>
+    </disk>
+    <disk type='file' device='cdrom'>
+      <driver name='qemu'/>
+      <target dev='sda' bus='sata'/>
+      <readonly/>
+      <alias name='sata0-0-0'/>
+      <address type='drive' controller='0' bus='0' target='0' unit='0'/>
+    </disk>
+    <controller type='usb' index='0' model='qemu-xhci' ports='15'>
+      <alias name='usb'/>
+      <address type='pci' domain='0x0000' bus='0x02' slot='0x00' function='0x0'/>
+    </controller>
+    <controller type='pci' index='0' model='pcie-root'>
+      <alias name='pcie.0'/>
+    </controller>
+    <controller type='pci' index='1' model='pcie-root-port'>
+      <model name='pcie-root-port'/>
+      <target chassis='1' port='0x8'/>
+      <alias name='pci.1'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x0' multifunction='on'/>
+    </controller>
+    <controller type='pci' index='2' model='pcie-root-port'>
+      <model name='pcie-root-port'/>
+      <target chassis='2' port='0x9'/>
+      <alias name='pci.2'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/>
+    </controller>
+    <controller type='pci' index='3' model='pcie-root-port'>
+      <model name='pcie-root-port'/>
+      <target chassis='3' port='0xa'/>
+      <alias name='pci.3'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/>
+    </controller>
+    <controller type='pci' index='4' model='pcie-root-port'>
+      <model name='pcie-root-port'/>
+      <target chassis='4' port='0xb'/>
+      <alias name='pci.4'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x3'/>
+    </controller>
+    <controller type='pci' index='5' model='pcie-root-port'>
+      <model name='pcie-root-port'/>
+      <target chassis='5' port='0xc'/>
+      <alias name='pci.5'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x4'/>
+    </controller>
+    <controller type='pci' index='6' model='pcie-root-port'>
+      <model name='pcie-root-port'/>
+      <target chassis='6' port='0xd'/>
+      <alias name='pci.6'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x5'/>
+    </controller>
+    <controller type='pci' index='7' model='pcie-root-port'>
+      <model name='pcie-root-port'/>
+      <target chassis='7' port='0xe'/>
+      <alias name='pci.7'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x6'/>
+    </controller>
+    <controller type='pci' index='8' model='pcie-root-port'>
+      <model name='pcie-root-port'/>
+      <target chassis='8' port='0xf'/>
+      <alias name='pci.8'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x7'/>
+    </controller>
+    <controller type='pci' index='9' model='pcie-root-port'>
+      <model name='pcie-root-port'/>
+      <target chassis='9' port='0x10'/>
+      <alias name='pci.9'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0' multifunction='on'/>
+    </controller>
+    <controller type='pci' index='10' model='pcie-root-port'>
+      <model name='pcie-root-port'/>
+      <target chassis='10' port='0x11'/>
+      <alias name='pci.10'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x1'/>
+    </controller>
+    <controller type='pci' index='11' model='pcie-root-port'>
+      <model name='pcie-root-port'/>
+      <target chassis='11' port='0x12'/>
+      <alias name='pci.11'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x2'/>
+    </controller>
+    <controller type='pci' index='12' model='pcie-root-port'>
+      <model name='pcie-root-port'/>
+      <target chassis='12' port='0x13'/>
+      <alias name='pci.12'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x3'/>
+    </controller>
+    <controller type='pci' index='13' model='pcie-root-port'>
+      <model name='pcie-root-port'/>
+      <target chassis='13' port='0x14'/>
+      <alias name='pci.13'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x4'/>
+    </controller>
+    <controller type='pci' index='14' model='pcie-root-port'>
+      <model name='pcie-root-port'/>
+      <target chassis='14' port='0x15'/>
+      <alias name='pci.14'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x5'/>
+    </controller>
+    <controller type='pci' index='15' model='pcie-root-port'>
+      <model name='pcie-root-port'/>
+      <target chassis='15' port='0x16'/>
+      <alias name='pci.15'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x6'/>
+    </controller>
+    <controller type='pci' index='16' model='pcie-to-pci-bridge'>
+      <model name='pcie-pci-bridge'/>
+      <alias name='pci.16'/>
+      <address type='pci' domain='0x0000' bus='0x08' slot='0x00' function='0x0'/>
+    </controller>
+    <controller type='sata' index='0'>
+      <alias name='ide'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x1f' function='0x2'/>
+    </controller>
+    <controller type='virtio-serial' index='0'>
+      <alias name='virtio-serial0'/>
+      <address type='pci' domain='0x0000' bus='0x03' slot='0x00' function='0x0'/>
+    </controller>
+    <interface type='bridge'>
+      <mac address='52:54:00:6c:97:9e'/>
+      <source bridge='br0'/>
+      <target dev='vnet11'/>
+      <model type='virtio'/>
+      <alias name='net0'/>
+      <address type='pci' domain='0x0000' bus='0x01' slot='0x00' function='0x0'/>
+    </interface>
+    <serial type='pty'>
+      <source path='/dev/pts/1'/>
+      <target type='isa-serial' port='0'>
+        <model name='isa-serial'/>
+      </target>
+      <alias name='serial0'/>
+    </serial>
+    <console type='pty' tty='/dev/pts/1'>
+      <source path='/dev/pts/1'/>
+      <target type='serial' port='0'/>
+      <alias name='serial0'/>
+    </console>
+    <channel type='unix'>
+      <source mode='bind' path='/run/libvirt/qemu/channel/15-principal/org.qemu.guest_agent.0'/>
+      <target type='virtio' name='org.qemu.guest_agent.0' state='disconnected'/>
+      <alias name='channel0'/>
+      <address type='virtio-serial' controller='0' bus='0' port='1'/>
+    </channel>
+    <input type='mouse' bus='ps2'>
+      <alias name='input0'/>
+    </input>
+    <input type='keyboard' bus='ps2'>
+      <alias name='input1'/>
+    </input>
+    <graphics type='vnc' port='5901' autoport='yes' listen='127.0.0.1'>
+      <listen type='address' address='127.0.0.1'/>
+    </graphics>
+    <audio id='1' type='none'/>
+    <video>
+      <model type='cirrus' vram='16384' heads='1' primary='yes'/>
+      <alias name='video0'/>
+      <address type='pci' domain='0x0000' bus='0x10' slot='0x01' function='0x0'/>
+    </video>
+    <watchdog model='itco' action='reset'>
+      <alias name='watchdog0'/>
+    </watchdog>
+    <memballoon model='virtio'>
+      <alias name='balloon0'/>
+      <address type='pci' domain='0x0000' bus='0x05' slot='0x00' function='0x0'/>
+    </memballoon>
+    <rng model='virtio'>
+      <backend model='random'>/dev/urandom</backend>
+      <alias name='rng0'/>
+      <address type='pci' domain='0x0000' bus='0x06' slot='0x00' function='0x0'/>
+    </rng>
+  </devices>
+  <seclabel type='dynamic' model='apparmor' relabel='yes'>
+    <label>libvirt-e47924db-e2eb-4fda-ac58-027025edff08</label>
+    <imagelabel>libvirt-e47924db-e2eb-4fda-ac58-027025edff08</imagelabel>
+  </seclabel>
+  <seclabel type='dynamic' model='dac' relabel='yes'>
+    <label>+0:+0</label>
+    <imagelabel>+0:+0</imagelabel>
+  </seclabel>
+</domain>
+

+ 153 - 0
ubuntu44.config

@@ -0,0 +1,153 @@
+<domain type='kvm' id='14'>
+  <name>ubuntu44</name>
+  <uuid>99de809d-00fe-4722-a30d-a019c50c0ebd</uuid>
+  <memory unit='KiB'>2097152</memory>
+  <currentMemory unit='KiB'>2097152</currentMemory>
+  <vcpu placement='static'>1</vcpu>
+  <resource>
+    <partition>/machine</partition>
+  </resource>
+  <os>
+    <type arch='x86_64' machine='pc-i440fx-6.2'>hvm</type>
+    <boot dev='hd'/>
+  </os>
+  <features>
+    <acpi/>
+    <apic/>
+  </features>
+  <cpu mode='custom' match='exact' check='full'>
+    <model fallback='forbid'>EPYC-Milan</model>
+    <vendor>AMD</vendor>
+    <feature policy='require' name='x2apic'/>
+    <feature policy='require' name='tsc-deadline'/>
+    <feature policy='require' name='hypervisor'/>
+    <feature policy='require' name='tsc_adjust'/>
+    <feature policy='require' name='vaes'/>
+    <feature policy='require' name='vpclmulqdq'/>
+    <feature policy='require' name='stibp'/>
+    <feature policy='require' name='arch-capabilities'/>
+    <feature policy='require' name='ssbd'/>
+    <feature policy='require' name='cmp_legacy'/>
+    <feature policy='require' name='overflow-recov'/>
+    <feature policy='require' name='succor'/>
+    <feature policy='require' name='stibp-always-on'/>
+    <feature policy='require' name='virt-ssbd'/>
+    <feature policy='require' name='amd-psfd'/>
+    <feature policy='require' name='lbrv'/>
+    <feature policy='require' name='tsc-scale'/>
+    <feature policy='require' name='vmcb-clean'/>
+    <feature policy='require' name='flushbyasid'/>
+    <feature policy='require' name='pause-filter'/>
+    <feature policy='require' name='pfthreshold'/>
+    <feature policy='require' name='v-vmsave-vmload'/>
+    <feature policy='require' name='vgif'/>
+    <feature policy='require' name='no-nested-data-bp'/>
+    <feature policy='require' name='lfence-always-serializing'/>
+    <feature policy='require' name='null-sel-clr-base'/>
+    <feature policy='require' name='sbpb'/>
+    <feature policy='require' name='ibpb-brtype'/>
+    <feature policy='require' name='rdctl-no'/>
+    <feature policy='require' name='skip-l1dfl-vmentry'/>
+    <feature policy='require' name='mds-no'/>
+    <feature policy='require' name='pschange-mc-no'/>
+    <feature policy='require' name='gds-no'/>
+    <feature policy='require' name='rfds-no'/>
+    <feature policy='disable' name='pcid'/>
+    <feature policy='require' name='topoext'/>
+  </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>destroy</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='/mnt/vms/images/ubuntu44.qcow2' index='2'/>
+      <backingStore/>
+      <target dev='vda' bus='virtio'/>
+      <alias name='virtio-disk0'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/>
+    </disk>
+    <disk type='file' device='cdrom'>
+      <driver name='qemu' type='raw'/>
+      <source file='/mnt/vms/images/ubuntu-22.04.5-live-server-amd64.iso' index='1'/>
+      <backingStore/>
+      <target dev='hda' bus='ide'/>
+      <readonly/>
+      <alias name='ide0-0-0'/>
+      <address type='drive' controller='0' bus='0' target='0' unit='0'/>
+    </disk>
+    <controller type='usb' index='0' model='piix3-uhci'>
+      <alias name='usb'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/>
+    </controller>
+    <controller type='pci' index='0' model='pci-root'>
+      <alias name='pci.0'/>
+    </controller>
+    <controller type='ide' index='0'>
+      <alias name='ide'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/>
+    </controller>
+    <interface type='network'>
+      <mac address='52:54:00:00:ce:e2'/>
+      <source network='default' portid='197d6fe4-f51b-4fbd-92ba-781fbbcee760' bridge='virbr0'/>
+      <target dev='vnet10'/>
+      <model type='virtio'/>
+      <alias name='net0'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
+    </interface>
+    <serial type='pty'>
+      <source path='/dev/pts/12'/>
+      <target type='isa-serial' port='0'>
+        <model name='isa-serial'/>
+      </target>
+      <alias name='serial0'/>
+    </serial>
+    <console type='pty' tty='/dev/pts/12'>
+      <source path='/dev/pts/12'/>
+      <target type='serial' port='0'/>
+      <alias name='serial0'/>
+    </console>
+    <input type='tablet' bus='usb'>
+      <alias name='input0'/>
+      <address type='usb' bus='0' port='1'/>
+    </input>
+    <input type='mouse' bus='ps2'>
+      <alias name='input1'/>
+    </input>
+    <input type='keyboard' bus='ps2'>
+      <alias name='input2'/>
+    </input>
+    <graphics type='vnc' port='5900' autoport='yes' listen='127.0.0.1'>
+      <listen type='address' address='127.0.0.1'/>
+    </graphics>
+    <audio id='1' type='none'/>
+    <video>
+      <model type='cirrus' vram='16384' heads='1' primary='yes'/>
+      <alias name='video0'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
+    </video>
+    <memballoon model='virtio'>
+      <alias name='balloon0'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
+    </memballoon>
+  </devices>
+  <seclabel type='dynamic' model='apparmor' relabel='yes'>
+    <label>libvirt-99de809d-00fe-4722-a30d-a019c50c0ebd</label>
+    <imagelabel>libvirt-99de809d-00fe-4722-a30d-a019c50c0ebd</imagelabel>
+  </seclabel>
+  <seclabel type='dynamic' model='dac' relabel='yes'>
+    <label>+0:+0</label>
+    <imagelabel>+0:+0</imagelabel>
+  </seclabel>
+</domain>
+

+ 218 - 0
worker1.xml

@@ -0,0 +1,218 @@
+<domain type='kvm' id='14'>
+  <name>worker1</name>
+  <uuid>a08f74b8-cf3c-46b9-8490-7cbb1c075bdb</uuid>
+  <metadata>
+    <libosinfo:libosinfo xmlns:libosinfo="http://libosinfo.org/xmlns/libvirt/domain/1.0">
+      <libosinfo:os id="http://ubuntu.com/ubuntu/22.04"/>
+    </libosinfo:libosinfo>
+  </metadata>
+  <memory unit='KiB'>4194304</memory>
+  <currentMemory unit='KiB'>4194304</currentMemory>
+  <vcpu placement='static'>2</vcpu>
+  <resource>
+    <partition>/machine</partition>
+  </resource>
+  <os>
+    <type arch='x86_64' machine='pc-q35-8.2'>hvm</type>
+    <boot dev='hd'/>
+  </os>
+  <features>
+    <acpi/>
+    <apic/>
+  </features>
+  <cpu mode='host-passthrough' check='none' migratable='on'/>
+  <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>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' discard='unmap'/>
+      <source file='/var/lib/libvirt/images/worker1.qcow2' index='3'/>
+      <backingStore/>
+      <target dev='vda' bus='virtio'/>
+      <alias name='virtio-disk0'/>
+      <address type='pci' domain='0x0000' bus='0x04' slot='0x00' function='0x0'/>
+    </disk>
+    <disk type='file' device='disk'>
+      <driver name='qemu' type='raw' cache='none'/>
+      <source file='/var/lib/libvirt/images/worker1-rook.qcow2' index='2'/>
+      <backingStore/>
+      <target dev='vdb' bus='virtio'/>
+      <alias name='virtio-disk1'/>
+      <address type='pci' domain='0x0000' bus='0x07' slot='0x00' function='0x0'/>
+    </disk>
+    <disk type='file' device='cdrom'>
+      <driver name='qemu'/>
+      <target dev='sda' bus='sata'/>
+      <readonly/>
+      <alias name='sata0-0-0'/>
+      <address type='drive' controller='0' bus='0' target='0' unit='0'/>
+    </disk>
+    <controller type='usb' index='0' model='qemu-xhci' ports='15'>
+      <alias name='usb'/>
+      <address type='pci' domain='0x0000' bus='0x02' slot='0x00' function='0x0'/>
+    </controller>
+    <controller type='pci' index='0' model='pcie-root'>
+      <alias name='pcie.0'/>
+    </controller>
+    <controller type='pci' index='1' model='pcie-root-port'>
+      <model name='pcie-root-port'/>
+      <target chassis='1' port='0x8'/>
+      <alias name='pci.1'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x0' multifunction='on'/>
+    </controller>
+    <controller type='pci' index='2' model='pcie-root-port'>
+      <model name='pcie-root-port'/>
+      <target chassis='2' port='0x9'/>
+      <alias name='pci.2'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/>
+    </controller>
+    <controller type='pci' index='3' model='pcie-root-port'>
+      <model name='pcie-root-port'/>
+      <target chassis='3' port='0xa'/>
+      <alias name='pci.3'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/>
+    </controller>
+    <controller type='pci' index='4' model='pcie-root-port'>
+      <model name='pcie-root-port'/>
+      <target chassis='4' port='0xb'/>
+      <alias name='pci.4'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x3'/>
+    </controller>
+    <controller type='pci' index='5' model='pcie-root-port'>
+      <model name='pcie-root-port'/>
+      <target chassis='5' port='0xc'/>
+      <alias name='pci.5'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x4'/>
+    </controller>
+    <controller type='pci' index='6' model='pcie-root-port'>
+      <model name='pcie-root-port'/>
+      <target chassis='6' port='0xd'/>
+      <alias name='pci.6'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x5'/>
+    </controller>
+    <controller type='pci' index='7' model='pcie-root-port'>
+      <model name='pcie-root-port'/>
+      <target chassis='7' port='0xe'/>
+      <alias name='pci.7'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x6'/>
+    </controller>
+    <controller type='pci' index='8' model='pcie-root-port'>
+      <model name='pcie-root-port'/>
+      <target chassis='8' port='0xf'/>
+      <alias name='pci.8'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x7'/>
+    </controller>
+    <controller type='pci' index='9' model='pcie-root-port'>
+      <model name='pcie-root-port'/>
+      <target chassis='9' port='0x10'/>
+      <alias name='pci.9'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0' multifunction='on'/>
+    </controller>
+    <controller type='pci' index='10' model='pcie-root-port'>
+      <model name='pcie-root-port'/>
+      <target chassis='10' port='0x11'/>
+      <alias name='pci.10'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x1'/>
+    </controller>
+    <controller type='pci' index='11' model='pcie-root-port'>
+      <model name='pcie-root-port'/>
+      <target chassis='11' port='0x12'/>
+      <alias name='pci.11'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x2'/>
+    </controller>
+    <controller type='pci' index='12' model='pcie-root-port'>
+      <model name='pcie-root-port'/>
+      <target chassis='12' port='0x13'/>
+      <alias name='pci.12'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x3'/>
+    </controller>
+    <controller type='pci' index='13' model='pcie-root-port'>
+      <model name='pcie-root-port'/>
+      <target chassis='13' port='0x14'/>
+      <alias name='pci.13'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x4'/>
+    </controller>
+    <controller type='pci' index='14' model='pcie-root-port'>
+      <model name='pcie-root-port'/>
+      <target chassis='14' port='0x15'/>
+      <alias name='pci.14'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x5'/>
+    </controller>
+    <controller type='sata' index='0'>
+      <alias name='ide'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x1f' function='0x2'/>
+    </controller>
+    <controller type='virtio-serial' index='0'>
+      <alias name='virtio-serial0'/>
+      <address type='pci' domain='0x0000' bus='0x03' slot='0x00' function='0x0'/>
+    </controller>
+    <interface type='bridge'>
+      <mac address='52:54:00:03:99:56'/>
+      <source bridge='br0'/>
+      <target dev='vnet13'/>
+      <model type='virtio'/>
+      <alias name='net0'/>
+      <address type='pci' domain='0x0000' bus='0x01' slot='0x00' function='0x0'/>
+    </interface>
+    <serial type='pty'>
+      <source path='/dev/pts/1'/>
+      <target type='isa-serial' port='0'>
+        <model name='isa-serial'/>
+      </target>
+      <alias name='serial0'/>
+    </serial>
+    <console type='pty' tty='/dev/pts/1'>
+      <source path='/dev/pts/1'/>
+      <target type='serial' port='0'/>
+      <alias name='serial0'/>
+    </console>
+    <channel type='unix'>
+      <source mode='bind' path='/run/libvirt/qemu/channel/14-worker1/org.qemu.guest_agent.0'/>
+      <target type='virtio' name='org.qemu.guest_agent.0' state='disconnected'/>
+      <alias name='channel0'/>
+      <address type='virtio-serial' controller='0' bus='0' port='1'/>
+    </channel>
+    <input type='mouse' bus='ps2'>
+      <alias name='input0'/>
+    </input>
+    <input type='keyboard' bus='ps2'>
+      <alias name='input1'/>
+    </input>
+    <graphics type='vnc' port='5901' autoport='yes' listen='127.0.0.1'>
+      <listen type='address' address='127.0.0.1'/>
+    </graphics>
+    <audio id='1' type='none'/>
+    <watchdog model='itco' action='reset'>
+      <alias name='watchdog0'/>
+    </watchdog>
+    <memballoon model='virtio'>
+      <alias name='balloon0'/>
+      <address type='pci' domain='0x0000' bus='0x05' slot='0x00' function='0x0'/>
+    </memballoon>
+    <rng model='virtio'>
+      <backend model='random'>/dev/urandom</backend>
+      <alias name='rng0'/>
+      <address type='pci' domain='0x0000' bus='0x06' slot='0x00' function='0x0'/>
+    </rng>
+  </devices>
+  <seclabel type='dynamic' model='apparmor' relabel='yes'>
+    <label>libvirt-a08f74b8-cf3c-46b9-8490-7cbb1c075bdb</label>
+    <imagelabel>libvirt-a08f74b8-cf3c-46b9-8490-7cbb1c075bdb</imagelabel>
+  </seclabel>
+  <seclabel type='dynamic' model='dac' relabel='yes'>
+    <label>+0:+0</label>
+    <imagelabel>+0:+0</imagelabel>
+  </seclabel>
+</domain>
+

+ 218 - 0
worker2.xml

@@ -0,0 +1,218 @@
+<domain type='kvm' id='16'>
+  <name>worker2</name>
+  <uuid>8e6f0622-9dbb-49d9-a4a4-ce0053f7a6bb</uuid>
+  <metadata>
+    <libosinfo:libosinfo xmlns:libosinfo="http://libosinfo.org/xmlns/libvirt/domain/1.0">
+      <libosinfo:os id="http://ubuntu.com/ubuntu/22.04"/>
+    </libosinfo:libosinfo>
+  </metadata>
+  <memory unit='KiB'>4194304</memory>
+  <currentMemory unit='KiB'>4194304</currentMemory>
+  <vcpu placement='static'>2</vcpu>
+  <resource>
+    <partition>/machine</partition>
+  </resource>
+  <os>
+    <type arch='x86_64' machine='pc-q35-8.2'>hvm</type>
+    <boot dev='hd'/>
+  </os>
+  <features>
+    <acpi/>
+    <apic/>
+  </features>
+  <cpu mode='host-passthrough' check='none' migratable='on'/>
+  <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>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' discard='unmap'/>
+      <source file='/var/lib/libvirt/images/worker2.qcow2' index='3'/>
+      <backingStore/>
+      <target dev='vda' bus='virtio'/>
+      <alias name='virtio-disk0'/>
+      <address type='pci' domain='0x0000' bus='0x04' slot='0x00' function='0x0'/>
+    </disk>
+    <disk type='file' device='disk'>
+      <driver name='qemu' type='raw' cache='none'/>
+      <source file='/var/lib/libvirt/images/worker2-rook.qcow2' index='2'/>
+      <backingStore/>
+      <target dev='vdb' bus='virtio'/>
+      <alias name='virtio-disk1'/>
+      <address type='pci' domain='0x0000' bus='0x07' slot='0x00' function='0x0'/>
+    </disk>
+    <disk type='file' device='cdrom'>
+      <driver name='qemu'/>
+      <target dev='sda' bus='sata'/>
+      <readonly/>
+      <alias name='sata0-0-0'/>
+      <address type='drive' controller='0' bus='0' target='0' unit='0'/>
+    </disk>
+    <controller type='usb' index='0' model='qemu-xhci' ports='15'>
+      <alias name='usb'/>
+      <address type='pci' domain='0x0000' bus='0x02' slot='0x00' function='0x0'/>
+    </controller>
+    <controller type='pci' index='0' model='pcie-root'>
+      <alias name='pcie.0'/>
+    </controller>
+    <controller type='pci' index='1' model='pcie-root-port'>
+      <model name='pcie-root-port'/>
+      <target chassis='1' port='0x8'/>
+      <alias name='pci.1'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x0' multifunction='on'/>
+    </controller>
+    <controller type='pci' index='2' model='pcie-root-port'>
+      <model name='pcie-root-port'/>
+      <target chassis='2' port='0x9'/>
+      <alias name='pci.2'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/>
+    </controller>
+    <controller type='pci' index='3' model='pcie-root-port'>
+      <model name='pcie-root-port'/>
+      <target chassis='3' port='0xa'/>
+      <alias name='pci.3'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/>
+    </controller>
+    <controller type='pci' index='4' model='pcie-root-port'>
+      <model name='pcie-root-port'/>
+      <target chassis='4' port='0xb'/>
+      <alias name='pci.4'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x3'/>
+    </controller>
+    <controller type='pci' index='5' model='pcie-root-port'>
+      <model name='pcie-root-port'/>
+      <target chassis='5' port='0xc'/>
+      <alias name='pci.5'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x4'/>
+    </controller>
+    <controller type='pci' index='6' model='pcie-root-port'>
+      <model name='pcie-root-port'/>
+      <target chassis='6' port='0xd'/>
+      <alias name='pci.6'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x5'/>
+    </controller>
+    <controller type='pci' index='7' model='pcie-root-port'>
+      <model name='pcie-root-port'/>
+      <target chassis='7' port='0xe'/>
+      <alias name='pci.7'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x6'/>
+    </controller>
+    <controller type='pci' index='8' model='pcie-root-port'>
+      <model name='pcie-root-port'/>
+      <target chassis='8' port='0xf'/>
+      <alias name='pci.8'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x7'/>
+    </controller>
+    <controller type='pci' index='9' model='pcie-root-port'>
+      <model name='pcie-root-port'/>
+      <target chassis='9' port='0x10'/>
+      <alias name='pci.9'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0' multifunction='on'/>
+    </controller>
+    <controller type='pci' index='10' model='pcie-root-port'>
+      <model name='pcie-root-port'/>
+      <target chassis='10' port='0x11'/>
+      <alias name='pci.10'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x1'/>
+    </controller>
+    <controller type='pci' index='11' model='pcie-root-port'>
+      <model name='pcie-root-port'/>
+      <target chassis='11' port='0x12'/>
+      <alias name='pci.11'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x2'/>
+    </controller>
+    <controller type='pci' index='12' model='pcie-root-port'>
+      <model name='pcie-root-port'/>
+      <target chassis='12' port='0x13'/>
+      <alias name='pci.12'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x3'/>
+    </controller>
+    <controller type='pci' index='13' model='pcie-root-port'>
+      <model name='pcie-root-port'/>
+      <target chassis='13' port='0x14'/>
+      <alias name='pci.13'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x4'/>
+    </controller>
+    <controller type='pci' index='14' model='pcie-root-port'>
+      <model name='pcie-root-port'/>
+      <target chassis='14' port='0x15'/>
+      <alias name='pci.14'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x5'/>
+    </controller>
+    <controller type='sata' index='0'>
+      <alias name='ide'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x1f' function='0x2'/>
+    </controller>
+    <controller type='virtio-serial' index='0'>
+      <alias name='virtio-serial0'/>
+      <address type='pci' domain='0x0000' bus='0x03' slot='0x00' function='0x0'/>
+    </controller>
+    <interface type='bridge'>
+      <mac address='52:54:00:ab:81:ca'/>
+      <source bridge='br0'/>
+      <target dev='vnet14'/>
+      <model type='virtio'/>
+      <alias name='net0'/>
+      <address type='pci' domain='0x0000' bus='0x01' slot='0x00' function='0x0'/>
+    </interface>
+    <serial type='pty'>
+      <source path='/dev/pts/2'/>
+      <target type='isa-serial' port='0'>
+        <model name='isa-serial'/>
+      </target>
+      <alias name='serial0'/>
+    </serial>
+    <console type='pty' tty='/dev/pts/2'>
+      <source path='/dev/pts/2'/>
+      <target type='serial' port='0'/>
+      <alias name='serial0'/>
+    </console>
+    <channel type='unix'>
+      <source mode='bind' path='/run/libvirt/qemu/channel/16-worker2/org.qemu.guest_agent.0'/>
+      <target type='virtio' name='org.qemu.guest_agent.0' state='disconnected'/>
+      <alias name='channel0'/>
+      <address type='virtio-serial' controller='0' bus='0' port='1'/>
+    </channel>
+    <input type='mouse' bus='ps2'>
+      <alias name='input0'/>
+    </input>
+    <input type='keyboard' bus='ps2'>
+      <alias name='input1'/>
+    </input>
+    <graphics type='vnc' port='5901' autoport='yes' listen='127.0.0.1'>
+      <listen type='address' address='127.0.0.1'/>
+    </graphics>
+    <audio id='1' type='none'/>
+    <watchdog model='itco' action='reset'>
+      <alias name='watchdog0'/>
+    </watchdog>
+    <memballoon model='virtio'>
+      <alias name='balloon0'/>
+      <address type='pci' domain='0x0000' bus='0x05' slot='0x00' function='0x0'/>
+    </memballoon>
+    <rng model='virtio'>
+      <backend model='random'>/dev/urandom</backend>
+      <alias name='rng0'/>
+      <address type='pci' domain='0x0000' bus='0x06' slot='0x00' function='0x0'/>
+    </rng>
+  </devices>
+  <seclabel type='dynamic' model='apparmor' relabel='yes'>
+    <label>libvirt-8e6f0622-9dbb-49d9-a4a4-ce0053f7a6bb</label>
+    <imagelabel>libvirt-8e6f0622-9dbb-49d9-a4a4-ce0053f7a6bb</imagelabel>
+  </seclabel>
+  <seclabel type='dynamic' model='dac' relabel='yes'>
+    <label>+0:+0</label>
+    <imagelabel>+0:+0</imagelabel>
+  </seclabel>
+</domain>
+