Skip to content

Instantly share code, notes, and snippets.

@retspen
Created December 9, 2017 07:33
Show Gist options
  • Save retspen/526d8fb240657582322188d7fa636997 to your computer and use it in GitHub Desktop.
Save retspen/526d8fb240657582322188d7fa636997 to your computer and use it in GitHub Desktop.
Libvirt tips
# Command line for libvirt
<qemu:commandline>
<qemu:arg value='-drive'/>
<qemu:arg value='file=/var/lib/libvirt/centos.img,format=raw,if=none,id=drive-nvme-disk0'/>
<qemu:arg value='-device'/>
<qemu:arg value='nvme,id=drive-nvme-disk0,serial=serial0'/>
</qemu:commandline>
# IO tune
<disk type='file' device='disk'>
<driver name='qemu' type='raw'/>
<source file='/media/arhiv/vm1.img'/>
<target dev='vda' bus='virtio'/>
<iotune>
<read_iops_sec>120</read_iops_sec>
<write_iops_sec>90</write_iops_sec>
</iotune>
</disk>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment