[libvirt-users] How to device port on the controller
Martin Kletzander
mkletzan at redhat.com
Tue Apr 9 11:29:26 UTC 2013
On 04/08/2013 11:58 PM, Daniele Testa wrote:
> 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?
>
The serial for vdb for example is in /sys/class/block/vdb/serial
I know I haven't helped with the addresses, don't know much about that,
but try attaching your libvirt version and the log of
/var/log/libvirt/qemu/<machine_name>.log.
I'll see when I'll get to you. Maybe somebody will found out in the
meantime. If not, feel free to create a bug for this.
Martin
More information about the libvirt-users
mailing list