[libvirt-users] How to device port on the controller

Daniele Testa daniele.testa at gmail.com
Mon Apr 8 21:58:18 UTC 2013


Hi,

I am adding a disk to my KVM virtual server, but for some reason it refuses
to honor the <address>

I have tried the following 3:

    <disk type='block' device='disk'>
      <driver name='phy' type='raw'/>
      <source dev='/dev/nbd2'/>
      <target dev='vdb' bus='virtio'/>
      <serial>my-fake-serial</serial>
      <address type='drive' controller='0' bus='1' target='3' unit='2'/>
    </disk>


    <disk type='block' device='disk'>
      <driver name='phy' type='raw'/>
      <source dev='/dev/nbd2'/>
      <target dev='vdb' bus='virtio'/>
      <serial>my-fake-serial</serial>
      <address type='pci' bus='0x00' slot='0x08' function='0x0'/>
    </disk>


    <disk type='block' device='disk'>
      <driver name='phy' type='raw'/>
      <source dev='/dev/nbd2'/>
      <target dev='vdb' bus='virtio'/>
      <serial>my-fake-serial</serial>
      <address type='virtio-serial' controller='0' bus='0' port='8'/>
    </disk>

I would assume the last one is the one to use, as I am using a "virtio"
bus. However, the <address> attribute is simply ignored and the disk is
always attached as this:

pci-0000:00:05.0

Further, how do I read the "my-fake-serial" from within the virtual machine?

I have tried using this:
udevadm info -a -p $(udevadm info -q path -n /dev/vdb)

But it does not show the serial string there anywhere.

Regards,
Daniele
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/libvirt-users/attachments/20130408/b7e4cce4/attachment.htm>


More information about the libvirt-users mailing list