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