Libvirt Disk Configuration

From Software Heritage Wiki
Jump to: navigation, 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 :

Configuration Sources

The current configuration (which should be optimized for performance) originates from those pages:

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=''>
    <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'/>
    <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'/>