[libvirt] [PATCH v2] virsh domxml-from-native to treat SCSI as the bus type for pseries by default

Ján Tomko jtomko at redhat.com
Fri Nov 15 15:26:55 UTC 2013


On 11/15/2013 03:10 PM, Shivaprasad bhat wrote:
> I checked that the domxml-to-native doesnt process -device option in
> qemuParseCommandLine. It simply add an arg entry into the xml.
>  <qemu:arg value='-device'/>
>     <qemu:arg
> value='scsi-cd,bus=scsi0.0,channel=0,scsi-id=0,lun=2,drive=drive-scsi0-0-0-2,id=scsi0-0-0-2,bootindex=1'/>
> 
> May be we should check these ide strings for device option in
> qemuParseCommandLine() and error out. Let me know if this is the right
> approach than doing in PostParsing.
>

Knowing how to parse them (at least the command line libvirt generates) would
be better :) Personally, I think adding the arg entry is better than an error.

IMO the way to do it would be in the functions that parse the "-hdX" option
(and "-drive", if they work).

> 
>     But it seems domxml-to-native can't even parse the command line libvirt
>     outputs for disks at the moment:
>     error: internal error: missing index/unit/bus parameter in drive
>     'file=/var/iso/f19.iso,if=none,id=drive-ide0-1-0,readonly=on,format=raw'
> 
> The -drive option parsing doesnt process the id="XXXXXX" attribute today. The
> bus, index, unitid need to be derived from the string "drive-ide0-1-0". Let me
> know if you want me to add the parsing code. Otherwise, I see there is no
> mention of id="" in any of the common usage documentation. Link that i
> referred is http://wiki.qemu.org/download/qemu-doc.html. Is that a hidden
> attribute? 

id is just a name, the important part is the -device argument that contains
that uses the id in the drive= parameter, and also specifies the bus.

Jan

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20131115/293135dd/attachment-0001.sig>


More information about the libvir-list mailing list