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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Jan,

Thanks for the replies.

On Fri, Nov 15, 2013 at 1:29 PM, Ján Tomko <jtomko@xxxxxxxxxx> wrote:
On 11/15/2013 04:20 AM, Li Zhang wrote:
> On 2013年11月14日 18:02, Ján Tomko wrote:
>> On 10/28/2013 10:20 AM, Shivaprasad G Bhat wrote:
>>> The bus type IDE being enum Zero, the bus type on pseries system appears as
>>> IDE for all the disk types. Pseries platform needs this to appear as SCSI
>>> instead of IDE.
>>>
>>> Signed-off-by: Shivaprasad G Bhat <sbhat@xxxxxxxxxxxxxxxxxx>
>>> ---
>>>   src/qemu/qemu_domain.c |   11 +++++++++++
>>>   1 file changed, 11 insertions(+)
>>>
...
>> This would also affect XML parsing, as these PostParse functions are called
>> when parsing the XML too, not just when doing a XML->native translation.
>>
>> This also affect all the disks specified on the command line. You shouldn't
>> assume the disk is SCSI when IDE was explicitly specified.
>
> This patch is to parse "-hda" as SCSI device type because Power doesn't
> support IDE device.
> I am not sure whether it's necessary to keep IDE device type for Power in
> libvirt.
> Currently, QEMU set "-hda" as SCSI for Power platform.
>

Yes, since QEMU treats it as SCSI, we could do the same for -hdX.
I meant that we shouldn't correct command line like
-device ide-cd,drive=ddd,bus=ide.0 to SCSI.
 
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.
 
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? 

So, I assume only the "un-documented" options("id=drive-ide0-1-0") may be "many" of them are not working.

Otherwise options "drive file=file,if=scsi,bus=0,unit=6" or "qemu -drive file=file,index=0,if=floppy" are working.

The documented usage "-drive file=a" and "-drive file=b" Fails though. Even the id attribute parsing doesnt help here :) 

Thanks and Regards
Shiva
Jan
--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]