|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen master] libxl: don't try to rename dm save file for PVH
commit cfb0cfb27d25e6f4ae81c13f201367ab9a350611
Author: Vitaly Kuznetsov <vkuznets@xxxxxxxxxx>
AuthorDate: Mon Mar 20 19:03:10 2017 +0100
Commit: Wei Liu <wei.liu2@xxxxxxxxxx>
CommitDate: Wed Mar 22 11:28:25 2017 +0000
libxl: don't try to rename dm save file for PVH
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 <vkuznets@xxxxxxxxxx>
Acked-by: Wei Liu <wei.liu2@xxxxxxxxxx>
---
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);
--
generated by git-patchbot for /home/xen/git/xen.git#master
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxx
https://lists.xenproject.org/xen-changelog
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |