<div dir="ltr">Hi,<div><br></div><div>I am adding a disk to my KVM virtual server, but for some reason it refuses to honor the <address></div><div><br></div><div style>I have tried the following 3:</div><div style><br>
</div><div style><div>    <disk type='block' device='disk'></div><div>      <driver name='phy' type='raw'/></div><div>      <source dev='/dev/nbd2'/></div><div>      <target dev='vdb' bus='virtio'/></div>
<div>      <serial>my-fake-serial</serial></div><div>      <address type='drive' controller='0' bus='1' target='3' unit='2'/></div><div>    </disk></div><div>
<br></div><div><br></div><div><div>    <disk type='block' device='disk'></div><div>      <driver name='phy' type='raw'/></div><div>      <source dev='/dev/nbd2'/></div>
<div>      <target dev='vdb' bus='virtio'/></div><div>      <serial>my-fake-serial</serial></div><div>      <address type='pci' bus='0x00' slot='0x08' function='0x0'/></div>
<div>    </disk></div></div><div><br></div><div><br></div><div><div>    <disk type='block' device='disk'></div><div>      <driver name='phy' type='raw'/></div><div>      <source dev='/dev/nbd2'/></div>
<div>      <target dev='vdb' bus='virtio'/></div><div>      <serial>my-fake-serial</serial></div><div>      <address type='virtio-serial' controller='0' bus='0' port='8'/></div>
<div>    </disk></div></div><div><br></div><div style>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:</div>
<div style><br></div><div style>pci-0000:00:05.0<br></div><div style><br></div><div style>Further, how do I read the "my-fake-serial" from within the virtual machine?</div><div style><br></div><div style>I have tried using this:</div>
<div style>udevadm info -a -p $(udevadm info -q path -n /dev/vdb)<br></div><div style><br></div><div style>But it does not show the serial string there anywhere.</div><div style><br></div><div style>Regards,</div><div style>
Daniele</div></div></div>