mirror of
https://github.com/virt-manager/virt-manager.git
synced 2025-01-24 02:04:13 +03:00
cloner: get original XML with security informations
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1455491 Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
This commit is contained in:
parent
6b8f0b6e1a
commit
8e0303059e
23
tests/clone-xml/graphics-password-in.xml
Normal file
23
tests/clone-xml/graphics-password-in.xml
Normal file
@ -0,0 +1,23 @@
|
||||
<domain type='kvm'>
|
||||
<name>clone-orig</name>
|
||||
<uuid>aaa3ae22-fed2-bfbd-ac02-3bea3bcfad82</uuid>
|
||||
<memory>262144</memory>
|
||||
<currentMemory>262144</currentMemory>
|
||||
<vcpu>1</vcpu>
|
||||
<os>
|
||||
<type arch='i686' machine='pc'>hvm</type>
|
||||
<boot dev='cdrom'/>
|
||||
</os>
|
||||
<features>
|
||||
<acpi/>
|
||||
</features>
|
||||
<clock offset='utc'/>
|
||||
<on_poweroff>destroy</on_poweroff>
|
||||
<on_reboot>restart</on_reboot>
|
||||
<on_crash>destroy</on_crash>
|
||||
<devices>
|
||||
<emulator>/usr/bin/qemu-kvm</emulator>
|
||||
<input type='mouse' bus='ps2'/>
|
||||
<graphics type='vnc' port='-1' autoport='yes' listen='127.0.0.1' passwd='foo'/>
|
||||
</devices>
|
||||
</domain>
|
23
tests/clone-xml/graphics-password-out.xml
Normal file
23
tests/clone-xml/graphics-password-out.xml
Normal file
@ -0,0 +1,23 @@
|
||||
<domain type="kvm">
|
||||
<name>clone-new</name>
|
||||
<uuid>12345678-1234-1234-1234-123456789012</uuid>
|
||||
<memory>262144</memory>
|
||||
<currentMemory>262144</currentMemory>
|
||||
<vcpu>1</vcpu>
|
||||
<os>
|
||||
<type arch="i686" machine="pc">hvm</type>
|
||||
<boot dev="cdrom"/>
|
||||
</os>
|
||||
<features>
|
||||
<acpi/>
|
||||
</features>
|
||||
<clock offset="utc"/>
|
||||
<on_poweroff>destroy</on_poweroff>
|
||||
<on_reboot>restart</on_reboot>
|
||||
<on_crash>destroy</on_crash>
|
||||
<devices>
|
||||
<emulator>/usr/bin/qemu-kvm</emulator>
|
||||
<input type="mouse" bus="ps2"/>
|
||||
<graphics type="vnc" port="-1" autoport="yes" listen="127.0.0.1" passwd="foo"/>
|
||||
</devices>
|
||||
</domain>
|
@ -187,3 +187,7 @@ class TestClone(unittest.TestCase):
|
||||
def testCloneNvramNewpool(self):
|
||||
base = "nvram-newpool"
|
||||
self._clone_helper(base)
|
||||
|
||||
def testCloneGraphicsPassword(self):
|
||||
base = "graphics-password"
|
||||
self._clone_helper(base)
|
||||
|
@ -282,7 +282,8 @@ class Cloner(object):
|
||||
|
||||
if self.original_guest is not None and not self.original_xml:
|
||||
self.original_dom = self._lookup_vm(self.original_guest)
|
||||
self.original_xml = self.original_dom.XMLDesc(0)
|
||||
flags = libvirt.VIR_DOMAIN_XML_SECURE
|
||||
self.original_xml = self.original_dom.XMLDesc(flags)
|
||||
|
||||
logging.debug("Original XML:\n%s", self.original_xml)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user