mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-23 21:34:54 +03:00
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: Daniel P. Berrange <berrange@redhat.com> Signed-off-by: Joao Martins <joao.m.martins@oracle.com>
This commit is contained in:
parent
cd57b7c742
commit
a040ba9ed4
@ -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"
|
||||
|
Loading…
Reference in New Issue
Block a user