[PATCH 07/10] WIP: qemu_snapshot: Add the guest name to the transient disk path

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Masayoshi Mizuma <m.mizuma@xxxxxxxxxxxxxx>

Add the guest name to the transient disk path name to match the path
of transient disks for hotplugging.

Signed-off-by: Masayoshi Mizuma <m.mizuma@xxxxxxxxxxxxxx>
---
 src/qemu/qemu_snapshot.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/qemu/qemu_snapshot.c b/src/qemu/qemu_snapshot.c
index 93b74b035a..a5cc0d47f2 100644
--- a/src/qemu/qemu_snapshot.c
+++ b/src/qemu/qemu_snapshot.c
@@ -1195,7 +1195,8 @@ qemuSnapshotDiskPrepareDisksTransient(virDomainObjPtr vm,
         snapdisk->src = virStorageSourceNew();
         snapdisk->src->type = VIR_STORAGE_TYPE_FILE;
         snapdisk->src->format = VIR_STORAGE_FILE_QCOW2;
-        snapdisk->src->path = g_strdup_printf("%s.TRANSIENT", domdisk->src->path);
+        snapdisk->src->path = g_strdup_printf("%s.TRANSIENT-%s",
+                                       domdisk->src->path, vm->def->name);
 
         if (virFileExists(snapdisk->src->path)) {
             virReportError(VIR_ERR_OPERATION_UNSUPPORTED,
-- 
2.27.0




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux