Libvirt Disk Configuration
Jump to navigation
Jump to search
Libvirt Disk Configuration
Storage issues
Disk configuration for maximum performance on Libvirt/Qemu guests is quite fiddly.
Uffizi (storage VM) suffered from the symptoms described in the following thread : http://www.spinics.net/lists/kvm/msg51361.html
Configuration Sources
The current configuration (which should be optimized for performance) originates from those pages:
- http://blog.vmsplice.net/2013/03/new-in-qemu-14-high-performance-virtio.html
- http://wiki.mikejung.biz/KVM_/_Xen
- https://www.suse.com/documentation/sles11/book_kvm/data/sect1_1_chapter_book_kvm.html
Summary of the configuration
- virtio-blk-pci
- cache=directsync
- io=native
- scsi=off
- config-wce=off
- x-data-plane=on
XML configuration
<domain type='kvm' xmlns:qemu='http://libvirt.org/schemas/domain/qemu/1.0'> [...] <devices> <disk type='block' device='disk'> <driver name='qemu' type='raw' cache='directsync' io='native'/> <source dev='/dev/vg-louvre/uffizi-root'/> <target dev='vda' bus='virtio'/> </disk> [...] </devices> [...] <qemu:commandline> <qemu:arg value='-set'/> <qemu:arg value='device.virtio-disk0.scsi=off'/> <qemu:arg value='-set'/> <qemu:arg value='device.virtio-disk0.config-wce=off'/> <qemu:arg value='-set'/> <qemu:arg value='device.virtio-disk0.x-data-plane=on'/> [...] </qemu:commandline> </domain>