Comment 2 for bug 1387945

Revision history for this message
Eli Qiao (taget-9) wrote :

i'd like to mark this as invalid in nova.

if you specify an device name, libvirt will use it as just a hint
nova pass this device to libvirt, and libvirt treat is as just a hint. cause it can not know how guest kernel treat it.

2014-11-03 15:10:17.982 DEBUG nova.virt.libvirt.config [req-71da8b06-befb-40e0-8cb3-7553f62eceef admin admin] Generated XML ('<disk type="block" device="disk">\n <driver name="qemu" type="raw" cache="none"/>\n <source dev="/dev/disk/by-path/ip-cloudcontroller:3260-iscsi-iqn.2010-10.org.openstack:volume-3f629777-ccf5-43fa-92e8-da6bd9d8d282-lun-1"/>\n <target bus="virtio" dev="vdd"/>\n <serial>3f629777-ccf5-43fa-92e8-da6bd9d8d282</serial>\n</disk>\n',) from (pid=2970) to_xml /opt/stack/nova/nova/virt/libvirt/config.py:81

see :http://libvirt.org/formatdomain.html#elementsDisks

target
The target element controls the bus / device under which the disk is exposed to the guest OS. The dev attribute indicates the "logical" device name. The actual device name specified is not guaranteed to map to the device name in the guest OS. Treat it as a device ordering hint. The optional bus attribute specifies the type of disk device to emulate; possible values are driver specific, with typical values being "ide", "scsi", "virtio", "xen", "usb", "sata", or "sd" "sd" since 1.1.2. If omitted, the bus type is inferred from the style of the device name (e.g. a device named 'sda' will typically be exported using a SCSI bus). The optional attribute tray indicates the tray status of the removable disks (i.e. CDROM or Floppy disk), the value can be either "open" or "closed", defaults to "closed". NB, the value of tray could be updated while the domain is running. The optional attribute removable sets the removable flag for USB disks, and its value can be either "on" or "off", defaulting to "off". Since 0.0.3; bus attribute since 0.4.3; tray attribute since 0.9.11; "usb" attribute value since after 0.4.4; "sata" attribute value since 0.9.7; "removable" attribute value since 1.1.3