Bionic seems indeed broken in this use case

root@b:~# virsh domrename h-test h-test-newname
Domain successfully renamed

root@b:~# ll /etc/libvirt/qemu/autostart/
total 3
drwxr-xr-x 2 root root  3 Mar 26 08:56 ./
drwxr-xr-x 4 root root  5 Mar 26 09:13 ../
lrwxrwxrwx 1 root root 28 Mar 26 08:56 h-test.xml -> 
/etc/libvirt/qemu/h-test.xml


You already mentioned that you issue "virsh autostart" again after the rename, 
which in newer releases isn't needed anymore.


Indeed this will now fail to create the matching link
root@b:~# virsh autostart h-test-newname
Domain h-test-newname marked as autostarted

root@b:~# ll /etc/libvirt/qemu/autostart/
total 3
drwxr-xr-x 2 root root  3 Mar 26 08:56 ./
drwxr-xr-x 4 root root  5 Mar 26 09:13 ../
lrwxrwxrwx 1 root root 28 Mar 26 08:56 h-test.xml -> 
/etc/libvirt/qemu/h-test.xml


Until I've found the fix (if it is backportable at all) this will be an easy 
workaround:
root@b:~# ln -s /etc/libvirt/qemu/h-test-newname.xml 
/etc/libvirt/qemu/autostart/
root@b:~# ll /etc/libvirt/qemu/autostart/
total 3
drwxr-xr-x 2 root root  3 Mar 26 09:15 ./
drwxr-xr-x 4 root root  5 Mar 26 09:13 ../
lrwxrwxrwx 1 root root 36 Mar 26 09:15 h-test-newname.xml -> 
/etc/libvirt/qemu/h-test-newname.xml

** Changed in: libvirt (Ubuntu Bionic)
       Status: New => Confirmed

** Changed in: libvirt (Ubuntu Focal)
       Status: New => Fix Released

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1921325

Title:
  VM will not auto-start automatically when server is rebooted after
  virsh domrename

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/libvirt/+bug/1921325/+subscriptions

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to