diff --git a/src/libxl/libxl_conf.c b/src/libxl/libxl_conf.c index e092b11df5..2321660281 100644 --- a/src/libxl/libxl_conf.c +++ b/src/libxl/libxl_conf.c @@ -975,6 +975,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->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; } @@ -1113,6 +1125,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; }