提交 d0106d58 编写于 作者: M Marek Marczykowski 提交者: Jim Fehlig

libxl: support backend domain setting for disk and net devices

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.  Specifying backend domain by ID or UUID is currently not
supported.
Signed-off-by: NMarek Marczykowski-Górecki <marmarek@invisiblethingslab.com>
上级 c374353c
......@@ -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;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册