]> xenbits.xensource.com Git - libvirt.git/commitdiff
qemu: fix cannot set graphic passwd via qemuDomainSaveImageDefineXML
authorLuyao Huang <lhuang@redhat.com>
Tue, 20 Jan 2015 09:04:41 +0000 (17:04 +0800)
committerMichal Privoznik <mprivozn@redhat.com>
Wed, 28 Jan 2015 15:56:34 +0000 (16:56 +0100)
https://bugzilla.redhat.com/show_bug.cgi?id=1183890

When we try to update a xml to a image file, we will clear the
graphics passwd settings, because we do not pass VIR_DOMAIN_XML_SECURE
to qemuDomainDefCopy, qemuDomainDefFormatBuf won't format the passwd.

Add VIR_DOMAIN_XML_SECURE flag when we call qemuDomainDefCopy
in qemuDomainSaveImageUpdateDef.

Signed-off-by: Luyao Huang <lhuang@redhat.com>
src/qemu/qemu_driver.c

index bc0a48c172f57d3dfa50303a8c94f10e0bc9face..1d3bee67f413360fd10f417d807a3b0b477ea60b 100644 (file)
@@ -5623,7 +5623,8 @@ qemuDomainSaveImageUpdateDef(virQEMUDriverPtr driver,
 
     if (!(newdef_migr = qemuDomainDefCopy(driver,
                                           newdef,
-                                          VIR_DOMAIN_XML_MIGRATABLE)))
+                                          VIR_DOMAIN_XML_MIGRATABLE |
+                                          VIR_DOMAIN_XML_SECURE)))
         goto cleanup;
 
     if (!virDomainDefCheckABIStability(def, newdef_migr)) {