Description of problem: The "re-detection of transient VMs after libvirtd restart" seems not to work if the transient domain was migrated. Version-Release number of selected component (if applicable): libvirt-0.6.4 + "Fix re-detection of transient VMs after libvirtd restart" patch. Ref: http://git.et.redhat.com/?p=libvirt.git;a=commit;h=524188b221f5e8dc66a7f203e1633dab3aa8dcf2 (I searched for other related fix which might affect my tests but I didn't find any). Steps to Reproduce: 1. Start a transient vm on one node. 2. Migrate the vm to a second node. 3. Restart libvirtd daemon on the second node. Actual results: The vm now is in the "pause" status and on destroy it remains defined. Expected results: The vm should be in the "running" status and a destroy should completely remove the vm from the defined domains. Additional info: [root@node1 ~]# ls /var/run/libvirt/qemu/ [root@node1 ~]# service libvirtd restart Stopping libvirtd daemon: [ OK ] Starting libvirtd daemon: [ OK ] [root@node1 ~]# virsh list --all Id Name State ---------------------------------- [root@node2 ~]# ls /var/run/libvirt/qemu/ [root@node2 ~]# service libvirtd restart Stopping libvirtd daemon: [ OK ] Starting libvirtd daemon: [ OK ] [root@node2 ~]# virsh list --all Id Name State ---------------------------------- [root@node1 ~]# virsh create test1.xml Domain test1 created from test1.xml [root@node1 ~]# virsh list --all Id Name State ---------------------------------- 1 test1 running [root@node1 ~]# virsh migrate test1 qemu+ssh://node2/system [root@node1 ~]# virsh list --all Id Name State ---------------------------------- [root@node2 ~]# virsh list --all Id Name State ---------------------------------- 1 test1 running [root@node2 ~]# service libvirtd restart Stopping libvirtd daemon: [ OK ] Starting libvirtd daemon: [ OK ] # virsh list --all Id Name State ---------------------------------- 1 test1 paused [root@node2 ~]# virsh destroy test1 Domain test1 destroyed [root@node2 ~]# virsh list --all Id Name State ---------------------------------- - test1 shut off
Created attachment 348891 [details] test1.xml VM test1.xml creation file.
Created attachment 348892 [details] test1-node1.xml VM test1 xml file before migration: # cp /var/run/libvirt/qemu/test1.xml test1-node1.xml
Created attachment 348893 [details] test1-node2.xml VM test1 xml file after migration: # cp /var/run/libvirt/qemu/test1.xml test1-node1.xml
Created attachment 348894 [details] libvirtd-debug.log libvirtd debug on restart.
Hum, paphio:~ -> diff test1-node1.xml test1-node2.xml 1,3c1,3 < <domstatus state='running' pid='6969'> < <monitor path='/dev/pts/12'/> < <domain type='kvm' id='9'> --- > <domstatus state='paused' pid='7290'> > <monitor path='/dev/pts/7'/> > <domain type='kvm' id='6'> So I would think it's that when the migration is started on node2 the domain is defined as paused but we forget to mark it as running once the migration completed and the guest is actually resumed. Daniel
Created attachment 349050 [details] libvirt-0.6.5-save-status-on-migration.patch Proposed patch.
I should point out that the patch I posted resolves only the "paused" issue. If you destroy a migrated transient domain it sill remain defined. (Expected result: the migrated transient domain should be completely removed).
This patch looks suitable for committing upstream to me
Yup applied upstream, so that will make 0.6.5, thanks ! Daniel