Marek Marczykowski-Górecki wrote: > From: Marek Marczykowski <marmarek@xxxxxxxxxxxxxxxxxxxxxx> > > This implement handling of <backenddomain name=''/> parameter introduced in > previous patch. > > Works on Xen >= 4.3, because only there libxl supports setting backend domain > by name, not XID. > > Signed-off-by: Marek Marczykowski-Górecki <marmarek@xxxxxxxxxxxxxxxxxxxxxx> > --- > Changes in v2: > - rebase on 1.0.6+ > - fix indentation > - make libxl_name_to_domid switch more defensive > > Changes in v3: > - rebase on 1.2.12+ > - leave name->XID resolution to libxl itself, which greatly simplify > the code (but requires Xen at least 4.3) > > Changes in v4: > - change back to def->domain_name in disk handling code > > src/libxl/libxl_conf.c | 24 ++++++++++++++++++++++++ > 1 file changed, 24 insertions(+) > > diff --git a/src/libxl/libxl_conf.c b/src/libxl/libxl_conf.c > index 0555b91..5cf3d8f 100644 > --- a/src/libxl/libxl_conf.c > +++ b/src/libxl/libxl_conf.c > @@ -971,6 +971,18 @@ libxlMakeDisk(virDomainDiskDefPtr l_disk, libxl_device_disk *x_disk) > return -1; > } > > + if (l_disk->domain_name) { > +#ifdef LIBXL_HAVE_DEVICE_BACKEND_DOMNAME > + if (VIR_STRDUP(x_disk->backend_domname, l_disk->src->domain_name) < 0) > l_disk->domain_name. > + return -1; > +#else > + virReportError(VIR_ERR_XML_DETAIL, "%s", > + _("this version of libxenlight does not " > + "support backend domain name")); > + return -1; > +#endif > + } > + > return 0; > } > > @@ -1098,6 +1110,18 @@ libxlMakeNic(virDomainDefPtr def, > return -1; > } > > + if (l_nic->domain_name) { > +#ifdef LIBXL_HAVE_DEVICE_BACKEND_DOMNAME > + if (VIR_STRDUP(x_nic->backend_domname, l_nic->domain_name) < 0) > + return -1; > +#else > + virReportError(VIR_ERR_XML_DETAIL, "%s", > + _("this version of libxenlight does not " > + "support backend domain name")); > + return -1; > +#endif > + } > + > return 0; > } > ACK. I've added the above fix and pushed 2 and 3. BTW, similar to 6/10, can you add parsing/formating of backenddomain in src/xenconfig? Regards, Jim -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list