Skip to content

Instantly share code, notes, and snippets.

@brettp
Created February 19, 2017 15:40
Show Gist options
  • Select an option

  • Save brettp/ac7c5ed21a3a3f049cb69516c34bf4de to your computer and use it in GitHub Desktop.

Select an option

Save brettp/ac7c5ed21a3a3f049cb69516c34bf4de to your computer and use it in GitHub Desktop.

Revisions

  1. brettp created this gist Feb 19, 2017.
    182 changes: 182 additions & 0 deletions win10.xml
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,182 @@
    <domain type='kvm' id='1' xmlns:qemu='http://libvirt.org/schemas/domain/qemu/1.0'>
    <name>Win10</name>
    <uuid>4fd8244a-6bd8-4065-be0a-df53872e94ed</uuid>
    <memory unit='KiB'>14680064</memory>
    <currentMemory unit='KiB'>14680064</currentMemory>
    <memoryBacking>
    <hugepages/>
    </memoryBacking>
    <vcpu placement='static'>8</vcpu>
    <cputune>
    <vcpupin vcpu='0' cpuset='4'/>
    <vcpupin vcpu='1' cpuset='5'/>
    <vcpupin vcpu='2' cpuset='6'/>
    <vcpupin vcpu='3' cpuset='7'/>
    </cputune>
    <resource>
    <partition>/machine</partition>
    </resource>
    <os>
    <type arch='x86_64' machine='pc-i440fx-xenial'>hvm</type>
    <loader readonly='yes' type='pflash'>/usr/share/OVMF/OVMF_CODE.fd</loader>
    <nvram>/var/lib/libvirt/qemu/nvram/Win10_VARS.fd</nvram>
    <bootmenu enable='yes'/>
    </os>
    <features>
    <acpi/>
    <apic/>
    <hyperv>
    <relaxed state='on'/>
    <vapic state='on'/>
    <spinlocks state='on' retries='8191'/>
    <vendor_id state='on' value='324832324afc'/>
    </hyperv>
    <kvm>
    <hidden state='on'/>
    </kvm>
    </features>
    <cpu mode='host-passthrough'>
    <topology sockets='1' cores='4' threads='2'/>
    </cpu>
    <clock offset='localtime'>
    <timer name='rtc' tickpolicy='catchup'/>
    <timer name='pit' tickpolicy='delay'/>
    <timer name='hpet' present='no'/>
    <timer name='hypervclock' present='yes'/>
    </clock>
    <on_poweroff>destroy</on_poweroff>
    <on_reboot>restart</on_reboot>
    <on_crash>restart</on_crash>
    <pm>
    <suspend-to-mem enabled='no'/>
    <suspend-to-disk enabled='no'/>
    </pm>
    <devices>
    <emulator>/usr/bin/kvm-spice</emulator>
    <disk type='block' device='disk'>
    <driver name='qemu' type='raw' cache='none' io='native'/>
    <source dev='/dev/sdd'/>
    <backingStore/>
    <target dev='vda' bus='virtio'/>
    <alias name='virtio-disk0'/>
    <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
    </disk>
    <disk type='block' device='disk'>
    <driver name='qemu' type='raw' cache='none' io='native'/>
    <source dev='/dev/sda'/>
    <backingStore/>
    <target dev='vdb' bus='virtio'/>
    <boot order='2'/>
    <alias name='virtio-disk1'/>
    <address type='pci' domain='0x0000' bus='0x00' slot='0x0d' function='0x0'/>
    </disk>
    <disk type='file' device='disk'>
    <driver name='qemu' type='qcow2'/>
    <source file='/var/lib/libvirt/images/Win10.qcow2'/>
    <backingStore/>
    <target dev='vdc' bus='virtio'/>
    <alias name='virtio-disk2'/>
    <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
    </disk>
    <controller type='scsi' index='0' model='virtio-scsi'>
    <alias name='scsi0'/>
    <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/>
    </controller>
    <controller type='pci' index='0' model='pci-root'>
    <alias name='pci.0'/>
    </controller>
    <controller type='sata' index='0'>
    <alias name='sata0'/>
    <address type='pci' domain='0x0000' bus='0x00' slot='0x0b' function='0x0'/>
    </controller>
    <controller type='virtio-serial' index='0'>
    <alias name='virtio-serial0'/>
    <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x0'/>
    </controller>
    <controller type='usb' index='0' model='ich9-ehci1'>
    <alias name='usb'/>
    <address type='pci' domain='0x0000' bus='0x00' slot='0x0e' function='0x7'/>
    </controller>
    <controller type='usb' index='0' model='ich9-uhci1'>
    <alias name='usb'/>
    <master startport='0'/>
    <address type='pci' domain='0x0000' bus='0x00' slot='0x0e' function='0x0' multifunction='on'/>
    </controller>
    <controller type='usb' index='0' model='ich9-uhci2'>
    <alias name='usb'/>
    <master startport='2'/>
    <address type='pci' domain='0x0000' bus='0x00' slot='0x0e' function='0x1'/>
    </controller>
    <controller type='usb' index='0' model='ich9-uhci3'>
    <alias name='usb'/>
    <master startport='4'/>
    <address type='pci' domain='0x0000' bus='0x00' slot='0x0e' function='0x2'/>
    </controller>
    <channel type='spicevmc'>
    <target type='virtio' name='com.redhat.spice.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='spice' port='5910' autoport='no' listen='127.0.0.1'>
    <listen type='address' address='127.0.0.1'/>
    <image compression='off'/>
    </graphics>
    <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>
    <hostdev mode='subsystem' type='pci' managed='yes'>
    <driver name='vfio'/>
    <source>
    <address domain='0x0000' bus='0x01' slot='0x00' function='0x0'/>
    </source>
    <alias name='hostdev0'/>
    <address type='pci' domain='0x0000' bus='0x00' slot='0x08' function='0x0'/>
    </hostdev>
    <hostdev mode='subsystem' type='pci' managed='yes'>
    <driver name='vfio'/>
    <source>
    <address domain='0x0000' bus='0x01' slot='0x00' function='0x1'/>
    </source>
    <alias name='hostdev1'/>
    <address type='pci' domain='0x0000' bus='0x00' slot='0x0a' function='0x0'/>
    </hostdev>
    <hostdev mode='subsystem' type='pci' managed='yes'>
    <driver name='vfio'/>
    <source>
    <address domain='0x0000' bus='0x04' slot='0x00' function='0x0'/>
    </source>
    <alias name='hostdev2'/>
    <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/>
    </hostdev>
    <redirdev bus='usb' type='spicevmc'>
    <alias name='redir0'/>
    <address type='usb' bus='0' port='2'/>
    </redirdev>
    <memballoon model='virtio'>
    <alias name='balloon0'/>
    <address type='pci' domain='0x0000' bus='0x00' slot='0x09' function='0x0'/>
    </memballoon>
    </devices>
    <seclabel type='dynamic' model='apparmor' relabel='yes'>
    <label>libvirt-4fd8244a-6bd8-4065-be0a-df53872e94ed</label>
    <imagelabel>libvirt-4fd8244a-6bd8-4065-be0a-df53872e94ed</imagelabel>
    </seclabel>
    <seclabel type='dynamic' model='dac' relabel='yes'>
    <label>+0:+0</label>
    <imagelabel>+0:+0</imagelabel>
    </seclabel>
    <qemu:commandline>
    <qemu:arg value='-netdev'/>
    <qemu:arg value='tap,id=net0,ifname=tap0,script=/etc/qemu/wlp5s0-tap0,downscript=no'/>
    <qemu:arg value='-device'/>
    <qemu:arg value='rtl8139,netdev=net0,mac=52:54:00:12:34:56'/>
    </qemu:commandline>
    </domain>