| int_entry "keepalive_interval"
| int_entry "keepalive_count"
+ let network_entry = str_entry "migration_address"
+
(* Each entry in the config is one of the following ... *)
let entry = vnc_entry
| spice_entry
| process_entry
| device_entry
| rpc_entry
+ | network_entry
let comment = [ label "#comment" . del /#[ \t]*/ "# " . store /([^ \t\n][^\n]*)?/ . del /\n/ "\n" ]
let empty = [ label "#empty" . eol ]
# Defaults to -1.
#
#seccomp_sandbox = 1
+
+
+
+# Override the listen address for all incoming migrations. Defaults to
+# 0.0.0.0 or :: in case if both host and qemu are capable of IPv6.
+#migration_address = "127.0.0.1"
unsigned int flags)
{
virQEMUDriverPtr driver = dconn->privateData;
+ virQEMUDriverConfigPtr cfg = virQEMUDriverGetConfig(driver);
virDomainDefPtr def = NULL;
const char *dom_xml = NULL;
const char *dname = NULL;
const char *uri_in = NULL;
- const char *listenAddress = NULL;
+ const char *listenAddress = cfg->migrationAddress;
char *origname = NULL;
int ret = -1;
- virCheckFlags(QEMU_MIGRATION_FLAGS, -1);
+ virCheckFlagsGoto(QEMU_MIGRATION_FLAGS, cleanup);
if (virTypedParamsValidate(params, nparams, QEMU_MIGRATION_PARAMETERS) < 0)
- return -1;
+ goto cleanup;
if (virTypedParamsGetString(params, nparams,
VIR_MIGRATE_PARAM_DEST_XML,
virTypedParamsGetString(params, nparams,
VIR_MIGRATE_PARAM_LISTEN_ADDRESS,
&listenAddress) < 0)
- return -1;
+ goto cleanup;
if (flags & VIR_MIGRATE_TUNNELLED) {
/* this is a logical error; we never should have gotten here with
cleanup:
VIR_FREE(origname);
virDomainDefFree(def);
+ virObjectUnref(cfg);
return ret;
}