mirror of
https://github.com/vagrant-libvirt/vagrant-libvirt.git
synced 2025-02-25 18:55:27 -06:00
Adds disk driver options: io, copy_on_read, discard and detect_zeroes for both the primary vm disk and additional disks. Minor refactor of existing volume_cache to deprecate and replace with a single call to disk_driver that contains all of the options. Usage of the volume_cache option will now result in a message to ui that it has been replaced, as well as a warning that it is ignored if disk_driveris set. The old option volume_cache is only used if disk_driver is not present (even if :cache is not set - in that case, the hypervisor default is always used). Resolves #998
157 lines
4.4 KiB
XML
157 lines
4.4 KiB
XML
<domain type='kvm' xmlns:qemu='http://libvirt.org/schemas/domain/qemu/1.0'>
|
|
<name></name>
|
|
<title>title</title>
|
|
<description>description</description>
|
|
<uuid></uuid>
|
|
<memory></memory>
|
|
<vcpu cpuset='1-4,^3,6'>1</vcpu>
|
|
|
|
|
|
<cpu mode='custom'>
|
|
<model fallback='allow'>qemu64</model>
|
|
<feature name='AAA' policy='required'/>
|
|
<topology sockets='1' cores='3' threads='2'/>
|
|
</cpu>
|
|
|
|
<numatune>
|
|
<memory nodeset='1-4,^3,6'/>
|
|
</numatune>
|
|
<cputune>
|
|
<shares>1024</shares>
|
|
</cputune>
|
|
|
|
<os>
|
|
<type arch='x86_64' machine='pc-compatible'>hvm</type>
|
|
<loader readonly='yes' type='rom'>/efi/loader</loader>
|
|
<bootmenu enable='yes'/>
|
|
<kernel></kernel>
|
|
<initrd></initrd>
|
|
<cmdline></cmdline>
|
|
</os>
|
|
<features>
|
|
<acpi/>
|
|
<apic/>
|
|
<pae/>
|
|
<hyperv>
|
|
<BBB state='on' />
|
|
</hyperv>
|
|
</features>
|
|
<clock offset='variable'>
|
|
<timer name='t1'/>
|
|
<timer name='t2' track='b' tickpolicy='c' frequency='d' mode='e' present='yes'/>
|
|
</clock>
|
|
<devices>
|
|
<emulator>/usr/bin/kvm-spice</emulator>
|
|
<disk type='file' device='disk'>
|
|
<driver name='qemu' type='qcow2' cache='unsafe' io='threads' copy_on_read='on' discard='unmap' detect_zeroes='on'/>
|
|
<source file='/var/lib/libvirt/images/test.qcow2'/>
|
|
<target dev='vda' bus='ide'/>
|
|
</disk>
|
|
<disk type='file' device='disk'>
|
|
<driver name='qemu' type='qcow2' cache='default'/>
|
|
<source file='/var/lib/libvirt/images/test-disk1.qcow2'/>
|
|
<target dev='vdb' bus='virtio'/>
|
|
</disk>
|
|
<disk type='file' device='disk'>
|
|
<driver name='qemu' type='qcow2' cache='default' io='threads' copy_on_read='on' discard='unmap' detect_zeroes='on'/>
|
|
<source file='/var/lib/libvirt/images/test-disk2.qcow2'/>
|
|
<target dev='vdc' bus='virtio'/>
|
|
</disk>
|
|
|
|
<disk type='file' device='cdrom'>
|
|
<source file=''/>
|
|
<target dev='hda' bus='ide'/>
|
|
<readonly/>
|
|
</disk>
|
|
<disk type='file' device='cdrom'>
|
|
<source file=''/>
|
|
<target dev='hdb' bus='ide'/>
|
|
<readonly/>
|
|
</disk>
|
|
|
|
<serial type='pty'>
|
|
<target port='0'/>
|
|
</serial>
|
|
<console type='pty'>
|
|
<target port='0'/>
|
|
</console>
|
|
|
|
<channel type='unix' >
|
|
<target type='virtio'
|
|
name="org.qemu.guest_agent.0"
|
|
/>
|
|
</channel>
|
|
<channel type='spicevmc' >
|
|
<target type='virtio'
|
|
name="com.redhat.spice.0"
|
|
/>
|
|
</channel>
|
|
<channel type='unix' >
|
|
<source
|
|
path="/tmp/foo"
|
|
/>
|
|
<target type='guestfwd'
|
|
address="192.0.2.42"
|
|
port="4242"
|
|
/>
|
|
</channel>
|
|
|
|
<input type='mouse' bus='ps2'/>
|
|
|
|
<graphics type='vnc' port='-1' autoport='yes' listen='127.0.0.1' keymap='en-us' />
|
|
<video>
|
|
<model type='cirrus' vram='9216' heads='1'/>
|
|
</video>
|
|
<rng model='virtio'>
|
|
<backend model='random'>/dev/random</backend>
|
|
</rng>
|
|
<hostdev mode='subsystem' type='pci' managed='yes'>
|
|
<source>
|
|
<address domain='0x0000'
|
|
bus='0x06'
|
|
slot='0x12'
|
|
function='0x5'/>
|
|
</source>
|
|
</hostdev>
|
|
<hostdev mode='subsystem' type='pci' managed='yes'>
|
|
<source>
|
|
<address domain='0x0001'
|
|
bus='0x03'
|
|
slot='0x00'
|
|
function='0x0'/>
|
|
</source>
|
|
</hostdev>
|
|
<hostdev mode='subsystem' type='usb'>
|
|
<source startupPolicy='mandatory'>
|
|
<vendor id='0x1234'/>
|
|
<product id='0xabcd'/>
|
|
<address bus='1' device='2'/>
|
|
</source>
|
|
</hostdev>
|
|
<redirdev bus='usb' type='tcp'>
|
|
</redirdev>
|
|
<redirfilter>
|
|
<usbdev class='0x0b' vendor='0x08e6' product='0x3437' version='2.00' allow='yes'/>
|
|
</redirfilter>
|
|
<watchdog model='i6300esb' action='reset'/>
|
|
|
|
<smartcard mode='passthrough' type='spicevmc'/>
|
|
|
|
<tpm model='tpm-tis'>
|
|
<backend type='passthrough'>
|
|
<device path='/dev/tpm0'/>
|
|
</backend>
|
|
</tpm>
|
|
<controller type='usb' model='nec-xhci' ports="4" />
|
|
</devices>
|
|
|
|
<qemu:commandline>
|
|
<qemu:arg value='-device'/>
|
|
<qemu:arg value='dummy-device'/>
|
|
<qemu:env name='QEMU_AUDIO_DRV' value='pa'/>
|
|
<qemu:env name='QEMU_AUDIO_TIMER_PERIOD' value='150'/>
|
|
<qemu:env name='QEMU_PA_SAMPLES' value='1024'/>
|
|
<qemu:env name='QEMU_PA_SERVER' value='/run/user/1000/pulse/native'/>
|
|
</qemu:commandline>
|
|
</domain>
|