qemu-devel
[Top][All Lists]
Advanced

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

RE: [PATCH] vl: transform QemuOpts device to JSON syntax device


From: Duan, Zhenzhong
Subject: RE: [PATCH] vl: transform QemuOpts device to JSON syntax device
Date: Thu, 24 Feb 2022 11:19:34 +0000


>-----Original Message-----
>From: Daniel P. Berrangé <berrange@redhat.com>
>Sent: Thursday, February 24, 2022 5:14 PM
>To: Peter Krempa <pkrempa@redhat.com>
>Cc: Duan, Zhenzhong <zhenzhong.duan@intel.com>; qemu-
>devel@nongnu.org; kwolf@redhat.com; mst@redhat.com;
>lersek@redhat.com; pbonzini@redhat.com; eblake@redhat.com
>Subject: Re: [PATCH] vl: transform QemuOpts device to JSON syntax device
>
>On Thu, Feb 24, 2022 at 10:09:35AM +0100, Peter Krempa wrote:
>> On Thu, Feb 24, 2022 at 09:02:02 +0000, Daniel P. Berrangé wrote:
>> > On Thu, Feb 24, 2022 at 02:06:53PM +0800, Zhenzhong Duan wrote:
>> > > While there are mixed use of traditional -device option and JSON
>> > > syntax option, QEMU reports conflict, e.x:
>> > >
>> > > /usr/libexec/qemu-kvm -nodefaults \
>> > >   -device '{"driver":"virtio-scsi-
>pci","id":"scsi0","bus":"pci.0","addr":"0x02.0"}' \
>> > >   -device virtio-scsi-pci,id=scsi1,bus=pci.0
>> >
>> > Why are you attempting to mix JSON and non-JSON syntax at the same
>> > time ? The expectation is that any mgmt app adopting JSON syntax
>> > will do so universally and not mix old and new syntax. So in
>> > practice the scenario above is not one that QEMU ever intended to
>> > have used by apps.
>>
>> Based on the previous post they are using some 'qemu:commandline'
>> overrides with the legacy syntax with new libvirt which uses JSON
>> syntax:
>>
>> <qemu:commandline>
>>   <qemu:arg value='-netdev'/>
>>     <qemu:arg value='user,id=mynet0,hostfwd=tcp::44483-:22'/>
>>     <qemu:arg value='-device'/>
>>   <qemu:arg
>> value='virtio-net-pci,netdev=mynet0,mac=00:16:3E:68:00:10,romfile='/>
>> </qemu:commandline>
>>
>> I suggested that they should add the required functionality to libvirt
>> instead of trying to hack qemu:
>>
>> https://lists.gnu.org/archive/html/qemu-devel/2022-02/msg05068.html
>
>Or the other answer is to switch to use JSON syntax in the above command
>line passthrough config.
>
>Or to specify the PCI address so it doesn't clash with other devices already
>present.

Thanks Daniel and Peter for comments.
Clear on my side. I'll synchronize your suggestions to my colleague.

Regards
Zhenzhong

reply via email to

[Prev in Thread] Current Thread [Next in Thread]