mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
qemu: domain: Modify <migrationSource> to look like <disk>
When adding <migrationSource> I've used a slightly unusual approach. To allow using the disk source XML parser and formatter convert <migrationSource> to look like <disk>. This means that <source> will be added as a subelement of <migrationSource> rather than being formatted inline. Conversion from the old format in the parser is very simple as it involves only moving the XPath context current node slightly if the new format is found. The status XML to XML test shows that the upgrade is done correctly. Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
@@ -237,14 +237,16 @@
|
||||
</qemuCaps>
|
||||
<job type='none' async='migration out' phase='perform3' flags='0x0'>
|
||||
<disk dev='vdb' migrating='yes'>
|
||||
<migrationSource type='network' format='raw' protocol='nbd' name='drive-virtio-disk1' tlsFromConfig='0'>
|
||||
<host name='andariel.usersys.redhat.com' port='49152'/>
|
||||
<privateData>
|
||||
<nodenames>
|
||||
<nodename type='storage' name='migration-vdb-storage'/>
|
||||
<nodename type='format' name='migration-vdb-format'/>
|
||||
</nodenames>
|
||||
</privateData>
|
||||
<migrationSource type='network' format='raw'>
|
||||
<source protocol='nbd' name='drive-virtio-disk1' tlsFromConfig='0'>
|
||||
<host name='andariel.usersys.redhat.com' port='49152'/>
|
||||
<privateData>
|
||||
<nodenames>
|
||||
<nodename type='storage' name='migration-vdb-storage'/>
|
||||
<nodename type='format' name='migration-vdb-format'/>
|
||||
</nodenames>
|
||||
</privateData>
|
||||
</source>
|
||||
</migrationSource>
|
||||
</disk>
|
||||
<disk dev='vdc' migrating='yes'>
|
||||
|
||||
@@ -237,25 +237,29 @@
|
||||
</qemuCaps>
|
||||
<job type='none' async='migration out' phase='perform3' flags='0x0'>
|
||||
<disk dev='vdb' migrating='yes'>
|
||||
<migrationSource type='network' format='raw' protocol='nbd' name='drive-virtio-disk1' tlsFromConfig='0'>
|
||||
<host name='andariel.usersys.redhat.com' port='49152'/>
|
||||
<privateData>
|
||||
<nodenames>
|
||||
<nodename type='storage' name='migration-vdb-storage'/>
|
||||
<nodename type='format' name='migration-vdb-format'/>
|
||||
</nodenames>
|
||||
</privateData>
|
||||
<migrationSource type='network' format='raw'>
|
||||
<source protocol='nbd' name='drive-virtio-disk1' tlsFromConfig='0'>
|
||||
<host name='andariel.usersys.redhat.com' port='49152'/>
|
||||
<privateData>
|
||||
<nodenames>
|
||||
<nodename type='storage' name='migration-vdb-storage'/>
|
||||
<nodename type='format' name='migration-vdb-format'/>
|
||||
</nodenames>
|
||||
</privateData>
|
||||
</source>
|
||||
</migrationSource>
|
||||
</disk>
|
||||
<disk dev='vdc' migrating='yes'>
|
||||
<migrationSource type='network' format='raw' protocol='nbd' name='drive-virtio-disk2' tlsFromConfig='0'>
|
||||
<host name='andariel.usersys.redhat.com' port='49152'/>
|
||||
<privateData>
|
||||
<nodenames>
|
||||
<nodename type='storage' name='migration-vdc-storage'/>
|
||||
<nodename type='format' name='migration-vdc-format'/>
|
||||
</nodenames>
|
||||
</privateData>
|
||||
<migrationSource type='network' format='raw'>
|
||||
<source protocol='nbd' name='drive-virtio-disk2' tlsFromConfig='0'>
|
||||
<host name='andariel.usersys.redhat.com' port='49152'/>
|
||||
<privateData>
|
||||
<nodenames>
|
||||
<nodename type='storage' name='migration-vdc-storage'/>
|
||||
<nodename type='format' name='migration-vdc-format'/>
|
||||
</nodenames>
|
||||
</privateData>
|
||||
</source>
|
||||
</migrationSource>
|
||||
</disk>
|
||||
<disk dev='hda' migrating='no'/>
|
||||
|
||||
Reference in New Issue
Block a user