[libvirt PATCH 3/7] qemuSaveImageStartProcess: add snapshot argument

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

 



When called from snapshot code we will need to pass snapshot object in
order to make internal snapshots work correctly.

Signed-off-by: Pavel Hrdina <phrdina@xxxxxxxxxx>
---
 src/qemu/qemu_saveimage.c | 6 ++++--
 src/qemu/qemu_saveimage.h | 1 +
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/src/qemu/qemu_saveimage.c b/src/qemu/qemu_saveimage.c
index 1eedc900b9..73115af42d 100644
--- a/src/qemu/qemu_saveimage.c
+++ b/src/qemu/qemu_saveimage.c
@@ -572,6 +572,7 @@ qemuSaveImageOpen(virQEMUDriver *driver,
  * @vm: domain object
  * @fd: FD pointer of memory state file
  * @path: path to memory state file
+ * @snapshot: snapshot to load when starting QEMU process or NULL
  * @header: header from memory state file
  * @cookie: cookie from memory state file
  * @asyncJob: type of asynchronous job
@@ -590,6 +591,7 @@ qemuSaveImageStartProcess(virConnectPtr conn,
                           virDomainObj *vm,
                           int *fd,
                           const char *path,
+                          virDomainMomentObj *snapshot,
                           virQEMUSaveHeader *header,
                           qemuDomainSaveCookie *cookie,
                           virDomainAsyncJob asyncJob,
@@ -634,7 +636,7 @@ qemuSaveImageStartProcess(virConnectPtr conn,
         priv->disableSlirp = true;
 
     if (qemuProcessStart(conn, driver, vm, cookie ? cookie->cpu : NULL,
-                         asyncJob, "stdio", *fd, path, NULL,
+                         asyncJob, "stdio", *fd, path, snapshot,
                          VIR_NETDEV_VPORT_PROFILE_OP_RESTORE,
                          start_flags) == 0)
         *started = true;
@@ -701,7 +703,7 @@ qemuSaveImageStartVM(virConnectPtr conn,
                                  virDomainXMLOptionGetSaveCookie(driver->xmlopt)) < 0)
         goto cleanup;
 
-    if (qemuSaveImageStartProcess(conn, driver, vm, fd, path, header, cookie,
+    if (qemuSaveImageStartProcess(conn, driver, vm, fd, path, NULL, header, cookie,
                                   asyncJob, start_flags, "restored", &started) < 0) {
         goto cleanup;
     }
diff --git a/src/qemu/qemu_saveimage.h b/src/qemu/qemu_saveimage.h
index c6a701dcf5..c5ad50558e 100644
--- a/src/qemu/qemu_saveimage.h
+++ b/src/qemu/qemu_saveimage.h
@@ -63,6 +63,7 @@ qemuSaveImageStartProcess(virConnectPtr conn,
                           virDomainObj *vm,
                           int *fd,
                           const char *path,
+                          virDomainMomentObj *snapshot,
                           virQEMUSaveHeader *header,
                           qemuDomainSaveCookie *cookie,
                           virDomainAsyncJob asyncJob,
-- 
2.41.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