提交 a040ba9e 编写于 作者: J Joao Martins 提交者: Daniel P. Berrange

libxl: set net device prefix

Use the newly added virCapabilitiesSetNetPrefix to set
the network prefix for the driver. This in return will
be use by NetDefFormat() and NetDefParseXML() routines
to free any interface name that start with the registered
prefix.
Acked-by: NDaniel P. Berrange <berrange@redhat.com>
Signed-off-by: NJoao Martins <joao.m.martins@oracle.com>
上级 cd57b7c7
......@@ -183,6 +183,9 @@ libxlCapsInitHost(libxl_ctx *ctx, virCapsPtr caps)
virCapabilitiesAddHostFeature(caps, "pae") < 0)
return -1;
if (virCapabilitiesSetNetPrefix(caps, LIBXL_GENERATED_PREFIX_XEN) < 0)
return -1;
return 0;
}
......
......@@ -47,6 +47,10 @@
# define LIBXL_MIGRATION_PORT_MIN 49152
# define LIBXL_MIGRATION_PORT_MAX 49216
/* Used for prefix of ifname of any network name generated dynamically
* by libvirt for Xen, and cannot be used for a persistent network name. */
# define LIBXL_GENERATED_PREFIX_XEN "vif"
# define LIBXL_CONFIG_BASE_DIR SYSCONFDIR "/libvirt"
# define LIBXL_CONFIG_DIR SYSCONFDIR "/libvirt/libxl"
# define LIBXL_AUTOSTART_DIR LIBXL_CONFIG_DIR "/autostart"
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册