On Wed, Apr 13, 2016 at 10:11:54AM +0100, Richard W.M. Jones wrote: > On Tue, Apr 12, 2016 at 06:46:31PM +0300, Roman Kagan wrote: > > + (* Presence of virtio-scsi controller. *) > > + let has_virtio_scsi = > > + let obj = Xml.xpath_eval_expression xpathctx > > + "/domain/devices/controller[@model='virtio-scsi']" in > > I guess this short cut is OK. A true test would involve checking the > <target bus="scsi"> on each disk and matching it back to the > controller. In other words, a huge pain! Maybe you can add an "XXX" > comment in the source about this.
On a second look, I'm not sure I got your comment right. AFAICS there's no way in libvirt xml to define multiple scsi buses, so all the matching I can do is just to notice the presence of virtio-scsi controller, and attribute all SCSI drives to it. This is exactly what happens in the patch. Am I missing something? Thanks, Roman. _______________________________________________ Libguestfs mailing list [email protected] https://www.redhat.com/mailman/listinfo/libguestfs
