Comment 5 for bug 1318544

Revision history for this message
Bob Ball (bob-ball) wrote :

Identified + confirmed this issue.

vdi_attached_here retrieves a "guess" of the device name from XAPI. When using HVM guests, XAPI assumes that the guest is Windows and therefore returns "hdb". This is clearly wrong.

We need to change the _wait_for_dev function to iterate over sysfs to find the correct disk.
e.g. assuming the UUID of the disk plugged was 8bf0e9c2-b636-4e43-a1a4-e02a339d7d82:
{quote}
root@DevStackOSDomU:~# xenstore-read domid
35
root@DevStackOSDomU:~# ls -d /sys/devices/vbd-*
/sys/devices/vbd-51712 /sys/devices/vbd-51728

root@DevStackOSDomU:~# xenstore-read /local/domain/0/backend/vbd/35/51712/vdi
["VDI", "1a6bad09-c13f-c7dd-b0af-cfb7e8de518c\\/9dcb54df-71f0-46eb-8db5-400f62e68629"]

root@DevStackOSDomU:~# xenstore-read /local/domain/0/backend/vbd/35/51728/vdi
["VDI", "1a6bad09-c13f-c7dd-b0af-cfb7e8de518c\\/8bf0e9c2-b636-4e43-a1a4-e02a339d7d82"]

root@DevStackOSDomU:~# ls /sys/devices/vbd-51728/block
xvdb
{/quote}