Signed-off-by: liguang <lig.fnst(a)cn.fujitsu.com>
---
src/qemu/qemu_domain.c | 2 +-
src/qemu/qemu_driver.c | 3 +++
2 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c
index a5592b9..eb5a3d1 100644
--- a/src/qemu/qemu_domain.c
+++ b/src/qemu/qemu_domain.c
@@ -1647,7 +1647,7 @@ qemuDomainSnapshotForEachQcow2Raw(struct qemud_driver *driver,
int i;
bool skipped = false;
- qemuimgarg[0] = qemuFindQemuImgBinary(driver);
+ qemuimgarg[0] = driver->qemuImgBinary;
if (qemuimgarg[0] == NULL) {
/* qemuFindQemuImgBinary set the error */
return -1;
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index 5f91688..a25fb53 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -626,6 +626,9 @@ qemudStartup(int privileged) {
if (!qemu_driver->domainEventState)
goto error;
+ /* find kvm-img or qemu-img */
+ qemuFindQemuImgBinary(qemu_driver);
+
/* read the host sysinfo */
if (privileged)
qemu_driver->hostsysinfo = virSysinfoRead();
--
1.7.1