Advertisement
Guest User

kvmXmlPassthrough

a guest
Feb 15th, 2025
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
XML 6.81 KB | None | 0 0
  1. <domain type="kvm">
  2.   <name>win10</name>
  3.   <uuid>4d86ee4e-5691-441a-8276-06eec545bb87</uuid>
  4.   <metadata>
  5.     <libosinfo:libosinfo xmlns:libosinfo="http://libosinfo.org/xmlns/libvirt/domain/1.0">
  6.       <libosinfo:os id="http://microsoft.com/win/10"/>
  7.     </libosinfo:libosinfo>
  8.   </metadata>
  9.   <memory unit="KiB">8388608</memory>
  10.   <currentMemory unit="KiB">8388608</currentMemory>
  11.   <vcpu placement="static">4</vcpu>
  12.   <os>
  13.     <type arch="x86_64" machine="pc-q35-4.2">hvm</type>
  14.     <loader readonly="yes" type="pflash">/usr/share/OVMF/OVMF_CODE_4M.fd</loader>
  15.     <nvram>/var/lib/libvirt/qemu/nvram/win10_VARS.fd</nvram>
  16.     <boot dev="hd"/>
  17.   </os>
  18.   <features>
  19.     <acpi/>
  20.     <apic/>
  21.     <hyperv>
  22.       <relaxed state="on"/>
  23.       <vapic state="on"/>
  24.       <spinlocks state="on" retries="8191"/>
  25.       <vendor_id state="on" value="kvm hyperv"/>
  26.     </hyperv>
  27.     <kvm>
  28.       <hidden state="on"/>
  29.     </kvm>
  30.     <vmport state="off"/>
  31.     <ioapic driver="kvm"/>
  32.   </features>
  33.   <cpu mode="host-passthrough" check="none"/>
  34.   <clock offset="localtime">
  35.     <timer name="rtc" tickpolicy="catchup"/>
  36.     <timer name="pit" tickpolicy="delay"/>
  37.     <timer name="hpet" present="no"/>
  38.     <timer name="hypervclock" present="yes"/>
  39.   </clock>
  40.   <on_poweroff>destroy</on_poweroff>
  41.   <on_reboot>restart</on_reboot>
  42.   <on_crash>destroy</on_crash>
  43.   <pm>
  44.     <suspend-to-mem enabled="no"/>
  45.     <suspend-to-disk enabled="no"/>
  46.   </pm>
  47.   <devices>
  48.     <emulator>/usr/bin/qemu-system-x86_64</emulator>
  49.     <disk type="file" device="disk">
  50.       <driver name="qemu" type="qcow2"/>
  51.       <source file="/var/lib/libvirt/images/win10.qcow2"/>
  52.       <target dev="sda" bus="sata"/>
  53.       <address type="drive" controller="0" bus="0" target="0" unit="0"/>
  54.     </disk>
  55.     <disk type="file" device="cdrom">
  56.       <driver name="qemu" type="raw"/>
  57.       <source file="/home/user/Shared/nvidia.iso"/>
  58.       <target dev="sdb" bus="sata"/>
  59.       <readonly/>
  60.       <address type="drive" controller="0" bus="0" target="0" unit="1"/>
  61.     </disk>
  62.     <disk type="file" device="cdrom">
  63.       <driver name="qemu" type="raw"/>
  64.       <source file="/data/ISOs/virtio-win.iso"/>
  65.       <target dev="sdc" bus="sata"/>
  66.       <readonly/>
  67.       <address type="drive" controller="0" bus="0" target="0" unit="2"/>
  68.     </disk>
  69.     <controller type="usb" index="0" model="qemu-xhci" ports="15">
  70.       <address type="pci" domain="0x0000" bus="0x02" slot="0x00" function="0x0"/>
  71.     </controller>
  72.     <controller type="sata" index="0">
  73.       <address type="pci" domain="0x0000" bus="0x00" slot="0x1f" function="0x2"/>
  74.     </controller>
  75.     <controller type="pci" index="0" model="pcie-root"/>
  76.     <controller type="pci" index="1" model="pcie-root-port">
  77.       <model name="pcie-root-port"/>
  78.       <target chassis="1" port="0x10"/>
  79.       <address type="pci" domain="0x0000" bus="0x00" slot="0x02" function="0x0" multifunction="on"/>
  80.     </controller>
  81.     <controller type="pci" index="2" model="pcie-root-port">
  82.       <model name="pcie-root-port"/>
  83.       <target chassis="2" port="0x11"/>
  84.       <address type="pci" domain="0x0000" bus="0x00" slot="0x02" function="0x1"/>
  85.     </controller>
  86.     <controller type="pci" index="3" model="pcie-root-port">
  87.       <model name="pcie-root-port"/>
  88.       <target chassis="3" port="0x12"/>
  89.       <address type="pci" domain="0x0000" bus="0x00" slot="0x02" function="0x2"/>
  90.     </controller>
  91.     <controller type="pci" index="4" model="pcie-root-port">
  92.       <model name="pcie-root-port"/>
  93.       <target chassis="4" port="0x13"/>
  94.       <address type="pci" domain="0x0000" bus="0x00" slot="0x02" function="0x3"/>
  95.     </controller>
  96.     <controller type="pci" index="5" model="pcie-root-port">
  97.       <model name="pcie-root-port"/>
  98.       <target chassis="5" port="0x14"/>
  99.       <address type="pci" domain="0x0000" bus="0x00" slot="0x02" function="0x4"/>
  100.     </controller>
  101.     <controller type="pci" index="6" model="pcie-root-port">
  102.       <model name="pcie-root-port"/>
  103.       <target chassis="6" port="0x15"/>
  104.       <address type="pci" domain="0x0000" bus="0x00" slot="0x02" function="0x5"/>
  105.     </controller>
  106.     <controller type="pci" index="7" model="pcie-root-port">
  107.       <model name="pcie-root-port"/>
  108.       <target chassis="7" port="0x16"/>
  109.       <address type="pci" domain="0x0000" bus="0x00" slot="0x02" function="0x6"/>
  110.     </controller>
  111.     <controller type="virtio-serial" index="0">
  112.       <address type="pci" domain="0x0000" bus="0x03" slot="0x00" function="0x0"/>
  113.     </controller>
  114.     <filesystem type="mount" accessmode="passthrough">
  115.       <source dir="/home/user/Shared"/>
  116.       <target dir="shared"/>
  117.       <address type="pci" domain="0x0000" bus="0x07" slot="0x00" function="0x0"/>
  118.     </filesystem>
  119.     <interface type="network">
  120.       <mac address="52:54:00:ad:46:d8"/>
  121.       <source network="network"/>
  122.       <model type="virtio"/>
  123.       <address type="pci" domain="0x0000" bus="0x01" slot="0x00" function="0x0"/>
  124.     </interface>
  125.     <serial type="pty">
  126.       <target type="isa-serial" port="0">
  127.         <model name="isa-serial"/>
  128.       </target>
  129.     </serial>
  130.     <console type="pty">
  131.       <target type="serial" port="0"/>
  132.     </console>
  133.     <channel type="spicevmc">
  134.       <target type="virtio" name="com.redhat.spice.0"/>
  135.       <address type="virtio-serial" controller="0" bus="0" port="1"/>
  136.     </channel>
  137.     <input type="tablet" bus="usb">
  138.       <address type="usb" bus="0" port="1"/>
  139.     </input>
  140.     <input type="mouse" bus="ps2"/>
  141.     <input type="keyboard" bus="ps2"/>
  142.     <graphics type="spice" autoport="yes">
  143.       <listen type="address"/>
  144.       <image compression="off"/>
  145.     </graphics>
  146.     <sound model="ich9">
  147.       <address type="pci" domain="0x0000" bus="0x00" slot="0x1b" function="0x0"/>
  148.     </sound>
  149.     <video>
  150.       <model type="qxl" ram="65536" vram="65536" vgamem="16384" heads="1" primary="yes"/>
  151.       <address type="pci" domain="0x0000" bus="0x00" slot="0x01" function="0x0"/>
  152.     </video>
  153.     <hostdev mode="subsystem" type="pci" managed="yes">
  154.       <source>
  155.         <address domain="0x0000" bus="0x01" slot="0x00" function="0x0"/>
  156.       </source>
  157.       <address type="pci" domain="0x0000" bus="0x04" slot="0x00" function="0x0"/>
  158.     </hostdev>
  159.     <hostdev mode="subsystem" type="pci" managed="yes">
  160.       <source>
  161.         <address domain="0x0000" bus="0x01" slot="0x00" function="0x1"/>
  162.       </source>
  163.       <address type="pci" domain="0x0000" bus="0x05" slot="0x00" function="0x0"/>
  164.     </hostdev>
  165.     <redirdev bus="usb" type="spicevmc">
  166.       <address type="usb" bus="0" port="2"/>
  167.     </redirdev>
  168.     <redirdev bus="usb" type="spicevmc">
  169.       <address type="usb" bus="0" port="3"/>
  170.     </redirdev>
  171.     <memballoon model="virtio">
  172.       <address type="pci" domain="0x0000" bus="0x06" slot="0x00" function="0x0"/>
  173.     </memballoon>
  174.   </devices>
  175. </domain>
  176.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement