|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [PATCH v19 for-4.14 04/13] tools/libxl: populate xenstore entries when launching dm for VM fork
No need to call libxl__domain_make since the domain already exists, only need
to populate the xenstore entries via libxl__domain_make_xs_entries.
Signed-off-by: Tamas K Lengyel <tamas.lengyel@xxxxxxxxx>
---
tools/libxl/libxl_create.c | 11 ++++++++++-
tools/libxl/libxl_types.idl | 1 +
2 files changed, 11 insertions(+), 1 deletion(-)
diff --git a/tools/libxl/libxl_create.c b/tools/libxl/libxl_create.c
index 09cf99d304..c3614e5a30 100644
--- a/tools/libxl/libxl_create.c
+++ b/tools/libxl/libxl_create.c
@@ -1244,7 +1244,13 @@ static void initiate_domain_create(libxl__egc *egc,
ret = libxl__domain_config_setdefault(gc,d_config,domid);
if (ret) goto error_out;
- ret = libxl__domain_make(gc, d_config, dbs, &domid, dcs->soft_reset);
+ /* If no dm_restore_file is specified we are in the normal path */
+ if (!d_config->dm_restore_file)
+ ret = libxl__domain_make(gc, d_config, dbs, &domid, dcs->soft_reset);
+ else
+ ret = libxl__domain_make_xs_entries(gc, d_config, &dcs->build_state,
+ domid);
+
if (ret) {
LOGD(ERROR, domid, "cannot make domain: %d", ret);
dcs->guest_domid = domid;
@@ -2052,6 +2058,9 @@ static int do_domain_create(libxl_ctx *ctx,
libxl_domain_config *d_config,
cdcs->dcs.domid = INVALID_DOMID;
cdcs->dcs.soft_reset = false;
+ if (d_config->dm_restore_file)
+ cdcs->dcs.domid = *domid;
+
if (cdcs->dcs.restore_params.checkpointed_stream ==
LIBXL_CHECKPOINTED_STREAM_COLO) {
cdcs->dcs.colo_proxy_script =
diff --git a/tools/libxl/libxl_types.idl b/tools/libxl/libxl_types.idl
index 9d3f05f399..b9cc139b0a 100644
--- a/tools/libxl/libxl_types.idl
+++ b/tools/libxl/libxl_types.idl
@@ -961,6 +961,7 @@ libxl_domain_config = Struct("domain_config", [
("on_watchdog", libxl_action_on_shutdown),
("on_crash", libxl_action_on_shutdown),
("on_soft_reset", libxl_action_on_shutdown),
+ ("dm_restore_file", string, {'const': True}),
], dir=DIR_IN)
libxl_diskinfo = Struct("diskinfo", [
--
2.25.1
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |