[libvirt] [PATCH 2/3] qemu: XMLToNative: Don't open vhostfd

Eric Blake eblake at redhat.com
Fri Mar 14 15:04:47 UTC 2014


On 03/14/2014 08:35 AM, Daniel P. Berrange wrote:
> On Fri, Mar 14, 2014 at 08:03:27AM -0600, Eric Blake wrote:
>> On 03/14/2014 07:42 AM, Daniel P. Berrange wrote:
>>
>>>
>>> The point is to get something that works with the "native" tools. In
>>> Xen world the goal was to create a valid /etc/xen/ config file, in
>>> QEMU world the goal is to create an ARGV set you can use to launch
>>> QEMU. So you are correct that we shouldn't generate ARGV that rely
>>> on FD passing, since the user can't run those.
>>
>> Maybe we could modify the output to give the full shell line, including
>> redirections, as in:
>>
>> qemu ... -use-of-fd 5 ... 5<>/path/to/file
>>
>> But we still have to figure out how to pick fd numbers, and to modify
>> our output to handle redirections...
> 
> I don't think we should be relying on shell magic in the args we
> generate - I'd want something that can be directly used with execve()

We need two separate output formats, then.  We already rely on shell
magic to quote arguments for reuse by shell - so an execve argument
(where we provide a NUL-separated list of arguments) would be a new format.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

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


More information about the libvir-list mailing list