[libvirt] [PATCH 8/9] libxl: pass cmdline to HVM guests
Marek Marczykowski-Górecki
marmarek at invisiblethingslab.com
Fri Mar 20 21:13:38 UTC 2015
On Fri, Mar 20, 2015 at 02:11:46PM -0600, Jim Fehlig wrote:
> Wei Liu wrote:
> > On Fri, Mar 20, 2015 at 11:18:36AM -0600, Jim Fehlig wrote:
> >
> >> Marek Marczykowski-Górecki wrote:
> >>
> >>> Signed-off-by: Marek Marczykowski-Górecki <marmarek at invisiblethingslab.com>
> >>> ---
> >>> src/libxl/libxl_conf.c | 8 ++++++++
> >>> 1 file changed, 8 insertions(+)
> >>>
> >>> diff --git a/src/libxl/libxl_conf.c b/src/libxl/libxl_conf.c
> >>> index 8ec3c75..d78d2b2 100644
> >>> --- a/src/libxl/libxl_conf.c
> >>> +++ b/src/libxl/libxl_conf.c
> >>> @@ -735,6 +735,14 @@ libxlMakeDomBuildInfo(virDomainDefPtr def,
> >>> libxl_defbool_set(&b_info->device_model_stubdomain,
> >>> def->stubdomain == VIR_TRISTATE_BOOL_YES);
> >>>
> >>> + if (def->os.cmdline && def->os.cmdline[0]) {
> >>> + b_info->extra_hvm = virStringSplit(def->os.cmdline, " ", 0);
> >>>
> >>>
> >> What is the difference between b_info->extra_hvm and b_info->cmdline?
> >> How are these two reconciled in libxl? I.e., what if they contained
> >>
> >
> > In short, I don't think you should use that field at all.
> >
> > b_info->extra_hvm contains the parameters passed to QEMU specifically
> > for HVM guest. Those parameters are not meant to be kernel command line.
> >
> > That field is introduced so that user can append arbitrary parameters to
> > QEMU. I think it's only a stopgap for things we have not implemented in
> > libxl or things we don't want to put into libxl. In reality I think it
> >
> > is rarely used.
>
> Thanks Wei and Ian for the explanation.
>
> Marek, seems we want b_info->cmdline, if the intent is to "pass cmdline
> to HVM guests". Can you review (and test in your setup) the "improve xl
> config parsing" series I posted?
I'll definitely do. But above raises a question - how can I set extra
arguments for qemu? In case of qemu in dom0, it's not a problem because
I can create some wrapper script. But in case of qemu in stubdom, the
only way is to set b_info->extra_hvm. Some additional attributes for
<emulator> tag?
If you're curious why I want to do such things, I have a custom patch for
qemu in stubdom, to have a (LWIP based) DHCP server for the VM there.
Just to get rid of as much as possible from backend domain (which BTW is
not dom0). So I need to pass it some configuration, qemu cmdline seems
like the only feasible option.
--
Best Regards,
Marek Marczykowski-Górecki
Invisible Things Lab
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 473 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20150320/5ca7f7aa/attachment-0001.sig>
More information about the libvir-list
mailing list