[libvirt] pci bus slot in libvirt

Fong Vang sudoyang at gmail.com
Tue Jun 26 20:09:24 UTC 2012


What's the best way to configure multiple disks in libvirt?  How many
slots can you have?  This is from the xml dump:

In some of my configurations, I have this:

    <disk type='block' device='disk'>
      <driver name='qemu' type='raw' cache='none' io='native'/>
      <source dev='/dev/sdb1'/>
      <target dev='vdb' bus='virtio'/>
      <alias name='virtio-disk1'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x03'
function='0x0'/>
    </disk>

while others are created as such:

  <devices>
    <emulator>/usr/bin/qemu-kvm</emulator>
    <disk type='file' device='disk'>
      <driver name='qemu' type='qcow2'/>
      <source file='/data2/VMs/libvirt/images/win2k8-1.qcow2'/>
      <target dev='hda' bus='ide'/>
      <alias name='ide0-0-0'/>
      <address type='drive' controller='0' bus='0' target='0' unit='0'/>
    </disk>

Which way is better?  The top one defines the bus and slot while the
bottom defines the controller, bus, target, and unit.

BTW, how many slots can we define per bus?




More information about the libvir-list mailing list