|
|
9119d9 |
From 66b00a2567f5e00e0d94ee5af4a1b1c65dd90341 Mon Sep 17 00:00:00 2001
|
|
|
9119d9 |
Message-Id: <66b00a2567f5e00e0d94ee5af4a1b1c65dd90341@dist-git>
|
|
|
9119d9 |
From: Michal Privoznik <mprivozn@redhat.com>
|
|
|
9119d9 |
Date: Mon, 29 Sep 2014 12:57:10 +0200
|
|
|
9119d9 |
Subject: [PATCH] qemuPrepareNVRAM: Save domain after NVRAM path generation
|
|
|
9119d9 |
|
|
|
9119d9 |
https://bugzilla.redhat.com/show_bug.cgi?id=1026772
|
|
|
9119d9 |
|
|
|
9119d9 |
On a domain startup, the variable store path is generated if needed.
|
|
|
9119d9 |
The path is intended to be generated only once. However, the updated
|
|
|
9119d9 |
domain definition is not saved into config dir rather than state XML
|
|
|
9119d9 |
only. So later, whenever the domain is destroyed and the daemon is
|
|
|
9119d9 |
restarted, the generated path is forgotten and the file may be left
|
|
|
9119d9 |
behind on virDomainUndefine() call.
|
|
|
9119d9 |
|
|
|
9119d9 |
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
|
|
|
9119d9 |
(cherry picked from commit 3a3c3780b478ccf137b434754c7c6b1ddbdf1ac2)
|
|
|
9119d9 |
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
|
|
|
9119d9 |
---
|
|
|
9119d9 |
src/qemu/qemu_process.c | 3 +++
|
|
|
9119d9 |
1 file changed, 3 insertions(+)
|
|
|
9119d9 |
|
|
|
9119d9 |
diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c
|
|
|
9119d9 |
index 9294619..d675add 100644
|
|
|
9119d9 |
--- a/src/qemu/qemu_process.c
|
|
|
9119d9 |
+++ b/src/qemu/qemu_process.c
|
|
|
9119d9 |
@@ -3874,6 +3874,9 @@ qemuPrepareNVRAM(virQEMUDriverConfigPtr cfg,
|
|
|
9119d9 |
goto cleanup;
|
|
|
9119d9 |
|
|
|
9119d9 |
generated = true;
|
|
|
9119d9 |
+
|
|
|
9119d9 |
+ if (virDomainSaveConfig(cfg->configDir, def) < 0)
|
|
|
9119d9 |
+ goto cleanup;
|
|
|
9119d9 |
}
|
|
|
9119d9 |
|
|
|
9119d9 |
if (!virFileExists(loader->nvram)) {
|
|
|
9119d9 |
--
|
|
|
9119d9 |
2.1.2
|
|
|
9119d9 |
|