Guests with LIBXL_DEVICE_MODEL_VERSION_NONE don't have a device model running so there is no save file to rename.
Signed-off-by: Vitaly Kuznetsov <vkuzn...@redhat.com> --- tools/libxl/libxl_create.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/tools/libxl/libxl_create.c b/tools/libxl/libxl_create.c index 25389e1..95fd96b 100644 --- a/tools/libxl/libxl_create.c +++ b/tools/libxl/libxl_create.c @@ -1664,12 +1664,16 @@ static void domain_soft_reset_cb(libxl__egc *egc, goto error; } - savefile = GCSPRINTF(LIBXL_DEVICE_MODEL_SAVE_FILE".%d", dds->domid); - restorefile = GCSPRINTF(LIBXL_DEVICE_MODEL_RESTORE_FILE".%d", dds->domid); - rc = rename(savefile, restorefile); - if (rc) { - LOGD(ERROR, dds->domid, "failed to rename dm save file."); - goto error; + if (cdcs->dcs.guest_config->b_info.device_model_version != + LIBXL_DEVICE_MODEL_VERSION_NONE) { + savefile = GCSPRINTF(LIBXL_DEVICE_MODEL_SAVE_FILE".%d", dds->domid); + restorefile = GCSPRINTF(LIBXL_DEVICE_MODEL_RESTORE_FILE".%d", + dds->domid); + rc = rename(savefile, restorefile); + if (rc) { + LOGD(ERROR, dds->domid, "failed to rename dm save file."); + goto error; + } } initiate_domain_create(egc, &cdcs->dcs); -- 2.9.3 _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org https://lists.xen.org/xen-devel