Created attachment 1168664 [details] virsh dumpxml domain1 Description of problem: In Aarch64 , after add a virtio disk to a existing VM, reboot to take effect.And then run the virsh dumpxml domain1 and virsh edit domain1 got the different xml file. Version-Release number of selected component (if applicable): 1.3.1 How reproducible: Steps to Reproduce: 1. Use virt-manager to create a Fedora23 guest image, use the default setting. After installing, reboot the image. The xml file is in the attachment 2. Using virt-manager to add a virtio disk to this image. The virtio disk is 2GB, bus=virtio, the xml file as below: [Thu, 16 Jun 2016 08:50:56 virt-manager 18462] DEBUG (domain:1014) attach_device with xml= <disk type="file" device="disk"> <driver name="qemu" type="qcow2"/> <source file="/var/lib/libvirt/images/f23-1.qcow2"/> <target dev="vda" bus="virtio"/> </disk> [Thu, 16 Jun 2016 08:50:56 virt-manager 18462] DEBUG (libvirtobject:74) Redefining <vmmDomain name=f23> with XML diff: --- Original XML +++ New XML @@ -54,5 +54,10 @@ <console type="pty"> <target type="serial" port="0"/> </console> + <disk type="file" device="disk"> + <driver name="qemu" type="qcow2"/> + <source file="/var/lib/libvirt/images/f23-1.qcow2"/> + <target dev="vda" bus="virtio"/> + </disk> </devices> </domain> 3.Reboot the VM. 4.Enter into the VM, in the /dev, there is no vda device. 5.In the host: virsh edit domain1 got the edit.xml virsh dumpxml domain1 got the dumpxml.xml They in the attachment. Actual results: In the edit.xml: <disk type='file' device='disk'> <driver name='qemu' type='qcow2'/> <source file='/var/lib/libvirt/images/f23-1.qcow2'/> <target dev='vda' bus='virtio'/> <address type='virtio-mmio'/> </disk> In the dumpxml.xml: <disk type='file' device='disk'> <driver name='qemu' type='qcow2'/> <source file='/var/lib/libvirt/images/f23-1.qcow2'/> <backingStore/> <target dev='vda' bus='virtio'/> <alias name='virtio-disk0'/> <address type='pci' domain='0x0000' bus='0x02' slot='0x01' function='0x0'/> </disk> Also , there is no vda in the VM. Expected results: Both two xml files are the same, and in VM existing vda device. Additional info:
Created attachment 1168665 [details] virsh edit domain1
Hi Kevin, Soft-reboot isn't good enough because it doesn't restart the qemu process and doesn't use new XML. You need to shutdown and start the VM again in order to load the new XML.
Also note that "virsh dumpxml" and "virsh edit" in general will *not* give the same XML when the guest is running. This is because "virsh dumpxml" provides the current state of the running guest, *not* just the configuration. If you want virsh dumpxml to provide the same output as virsh edit, use this instead: virsh dumpxml --inactive $guest That will provide just the persistent config, without any of the runtime-only things like <alias>.