http://libvirt.org/formatdomain.html#elementsHostDevSubsys
At this description used "drive"-typed address for SCSI.
But when i get xml-description of scsi-devices by
<code>
unsigned int flags VIR_CONNECT_LIST_NODE_DEVICES_CAP_SCSI_HOST ;
int ret = virConnectListAllNodeDevices
(currWorkConnect, &nodeDevices, flags);
then get by virNodeDeviceGetXMLDesc(nodeDevices[i], 0));
</code>
i have same:
<device>
<name>scsi_host2</name>
<path>/sys/devices/pci0000:00/0000:00:1f.2/ata3/host2</path>
<parent>pci_0000_00_1f_2</parent>
<capability type='scsi_host'>
<host>2</host>
<unique_id>3</unique_id>
</capability>
</device>
.
I understand that this device description contains a
"pci"-typed addresses. Then where to get the "scsi"-typed
address?
--
Fl@sh
On Sun, Oct 19, 2014 at 10:01:26PM +0400, Fl@sh wrote:> http://libvirt.org/formatdomain.html#elementsHostDevSubsys > > At this description used "drive"-typed address for SCSI. > > But when i get xml-description of scsi-devices by > <code> > unsigned int flags > VIR_CONNECT_LIST_NODE_DEVICES_CAP_SCSI_HOST ;You've asked for the SCSI HBA here - ie the drive *controller* not the drives themselves. VIR_CONNECT_LIST_NODE_DEVICES_CAP_SCSI_HOST = 1 << 5, /* SCSI Host Bus Adapter */ VIR_CONNECT_LIST_NODE_DEVICES_CAP_SCSI_TARGET = 1 << 6, /* SCSI Target */ VIR_CONNECT_LIST_NODE_DEVICES_CAP_SCSI = 1 << 7, /* SCSI device */ You want CAP_SCSI for the actual devices. Regards, Daniel -- |: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :| |: http://libvirt.org -o- http://virt-manager.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|
On Mon, 20 Oct 2014 09:27:49 +0100 "Daniel P. Berrange" <berrange@redhat.com> wrote:> On Sun, Oct 19, 2014 at 10:01:26PM +0400, Fl@sh wrote: > > http://libvirt.org/formatdomain.html#elementsHostDevSubsys.....> You want CAP_SCSI for the actual devices. >Ok. But i have new question: XML-description into docs contains: ... <devices> <hostdev mode='subsystem' type='scsi' sgio='filtered' rawio='yes'> <source> <adapter name='scsi_host0'/> <address type='scsi' bus='0' target='0' unit='0'/> </source> .... </devices> ... It contain the address of device with three attributes (bus, target and unit). But SCSI addressing contain four attributes (host, bus, target, lun) and in XML-description from virNodeDeviceGetXMLDesc device capabilities contain this parameters too. Same: ... <capability type='scsi'> <host>4</host> <bus>0</bus> <target>0</target> <lun>0</lun> <type>cdrom</type> </capability> ... How i can use this four parameters into XML-description of SCSI HostDev for set device? Why in first case it have 3 attributes, but in second case it have 4 attributes? -- Fl@sh