Bug 1594985
| Summary: | Renaming a virtual machine does not re-create autostart symlink | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux Advanced Virtualization | Reporter: | bugzilla |
| Component: | libvirt | Assignee: | Erik Skultety <eskultet> |
| Status: | CLOSED CURRENTRELEASE | QA Contact: | Yanqiu Zhang <yanqzhan> |
| Severity: | unspecified | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 8.0 | CC: | dyuan, eskultet, fjin, jdenemar, lmen, xuzhang, yanqzhan |
| Target Milestone: | rc | Keywords: | TestOnly |
| Target Release: | 8.0 | Flags: | knoel:
mirror+
|
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | libvirt-5.0.0-1.el8 | Doc Type: | If docs needed, set a value |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2020-03-11 22:29:10 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
|
Description
bugzilla
2018-06-25 23:05:16 UTC
Fixed upstream by:
commit 359b938b8b37254e3e714a2a50e4b9a444516133
Refs: v4.5.0-190-g359b938b8b
Author: Julio Faracco <jcfaracco>
AuthorDate: Thu Jul 19 01:21:48 2018 -0300
Commit: Erik Skultety <eskultet>
CommitDate: Thu Jul 19 11:22:28 2018 +0200
qemu: Fix broken autostart symlink after renaming domain
If a domain is configured to start on boot, it has a symlink to the
domain definition inside the autostart directory. If you rename this
domain, the definition is renamed too. The symlink need to be pointed to
this renamed file. This commit recreates the symlink after renaming the
XML file.
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1594985
Signed-off-by: Julio Faracco <jcfaracco>
Signed-off-by: Erik Skultety <eskultet>
Reproduce this bug on rhel7.7 with: libvirt-4.5.0-23.virtcov.el7.x86_64 qemu-kvm-rhev-2.12.0-33.el7.x86_64 Steps: 1.# virsh autostart yqz-7.7 Domain yqz-7.7 marked as autostarted # virsh list --all --autostart Id Name State ---------------------------------------------------- - yqz-7.7 shut off # ls -l /etc/libvirt/qemu/autostart/ total 0 lrwxrwxrwx. 1 root root 29 Jul 9 05:34 yqz-7.7.xml -> /etc/libvirt/qemu/yqz-7.7.xml 2.# virsh domrename yqz-7.7 new-7.7 Domain successfully renamed # file /etc/libvirt/qemu/autostart/yqz-7.7.xml /etc/libvirt/qemu/autostart/yqz-7.7.xml: broken symbolic link to `/etc/libvirt/qemu/yqz-7.7.xml' 3.# systemctl restart libvirtd # virsh list --all --autostart Id Name State ---------------------------------------------------- # virsh domstate new-7.7 shut off Verify this bug on rhel-av8.0.1 with: libvirt-daemon-5.0.0-11.module+el8.0.1+3459+e357ef2f.x86_64 qemu-kvm-3.1.0-27.module+el8.0.1+3253+c5371cb3.x86_64 Steps: 1.# virsh autostart avocado-vt-vm1 Domain avocado-vt-vm1 marked as autostarted # virsh list --all --autostart Id Name State --------------------------------- - avocado-vt-vm1 shut off # ls -l /etc/libvirt/qemu/autostart/ total 0 lrwxrwxrwx. 1 root root 36 Jul 9 05:29 avocado-vt-vm1.xml -> /etc/libvirt/qemu/avocado-vt-vm1.xml 2.# virsh domrename avocado-vt-vm1 new-vm1 Domain successfully renamed # ls -l /etc/libvirt/qemu/autostart/ total 0 lrwxrwxrwx. 1 root root 29 Jul 9 05:30 new-vm1.xml -> /etc/libvirt/qemu/new-vm1.xml # file /etc/libvirt/qemu/autostart/new-vm1.xml /etc/libvirt/qemu/autostart/new-vm1.xml: symbolic link to /etc/libvirt/qemu/new-vm1.xml 3.# systemctl restart libvirtd # virsh list --all --autostart Id Name State ------------------------- 1 new-vm1 running And no error or warning in libvirtd.log Since the test result is as expected, mark this bug as verified. This work was completed and shipped long ago. Closing the bug. |