Bug 675319 - qemu guests autostart problem
qemu guests autostart problem
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: libvirt (Show other bugs)
5.6
x86_64 Linux
unspecified Severity medium
: rc
: ---
Assigned To: Daniel Veillard
Virtualization Bugs
:
Depends On:
Blocks: 807971
  Show dependency treegraph
 
Reported: 2011-02-04 16:35 EST by Joe Julian
Modified: 2013-01-07 23:56 EST (History)
19 users (show)

See Also:
Fixed In Version: libvirt-0.8.2-26.el5
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 632100
Environment:
Last Closed: 2013-01-07 23:56:26 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Joe Julian 2011-02-04 16:35:56 EST
+++ This bug was initially created as a clone of Bug #632100 +++

Description of problem:

After upgrading from Fedora 12 to Fedora 13qemu domains is not marked as autostarted.

Version-Release number of selected component (if applicable):
libvirt-0.8.2-1.fc13.x86_64
qemu-system-x86-0.12.5-1.fc13.x86_64

How reproducible:
Upgrade working Fedora 12 system with libvirt/qemu guests marked as autostart.

Steps to Reproduce:
1.
2.
3.
  
Actual results:

lrwxrwxrwx 1 root root 27 Aug  4 15:35 /etc/libvirt/qemu/autostart/tecom.xml -> /etc/libvirt/qemu/tecom.xml

[root@xen005 ~]# virsh dominfo tecom
Id:             3
Name:           tecom
UUID:           c5f94da4-46d7-c645-8273-a2bdbd5a4327
OS Type:        hvm
State:          running
CPU(s):         1
CPU time:       80038.1s
Max memory:     262144 kB
Used memory:    262144 kB
Persistent:     yes
Autostart:      disable

[root@xen005 ~]# virsh autostart tecom
error: Failed to mark domain tecom as autostarted
error: Failed to create symlink '/etc/libvirt/qemu/autostart/tecom.xml to '/etc/libvirt/qemu/tecom.xml': File exists

Expected results:
Autostart:      enable

Additional info:

--- Additional comment from joe@julianfamily.org on 2011-02-04 16:26:03 EST ---

I had the same error with libvirt-0.8.2-15.el5_6.1

Removing the symlinks from /etc/libvirt/qemu/autostart allowed me to run "virsh autostart {dom}" successfully though.

Subsequent calls of that command are also still successful. I was not able to determine what caused autostart to be considered disabled.
Comment 1 Roland Friedwagner 2011-05-09 09:26:03 EDT
Same annoying behavior here since upgrading KVM-Hosts from RHEL 5.5 to 5.6

libvirt-0.8.2-15.el5_6.3

=> it renders the checking status via remote requests like this 
   $ virsh -c qemu+ssh://kvm-XX/system dominfo YYY
   impossible

=> this breaks autostart status monitoring
Comment 2 Roland Friedwagner 2011-05-09 09:44:54 EDT
> Subsequent calls of that command are also still successful. I was not able to
> determine what caused autostart to be considered disabled.

The autostart status disable of virsh dominfo _always_ show "disabled"
after restarting libvirt.

@Joe Julian: Did you restarted libvirtd after recreating the symlink
             via virsh autostart ?
Comment 3 Joe Julian 2011-05-09 11:02:58 EDT
No, the last time I had this happen (last night) I had just destroyed some domains and started them again.
Comment 4 Eric Blake 2011-06-14 16:20:31 EDT
Upstream patch here: https://www.redhat.com/archives/libvir-list/2011-June/msg00479.html
Comment 7 RHEL Product and Program Management 2012-03-30 10:18:15 EDT
This request was evaluated by Red Hat Product Management for inclusion
in a Red Hat Enterprise Linux release.  Product Management has
requested further review of this request by Red Hat Engineering, for
potential inclusion in a Red Hat Enterprise Linux release for currently
deployed products.  This request is not yet committed for inclusion in
a release.
Comment 12 hongming 2012-06-26 05:10:32 EDT
Verify it using the following versions , it can't be reproduced. So move its status to verified.

Versions 
kernel 2.6.18-321.el5
libvirt-0.8.2-26.el5
kvm-83-254.el5

Steps 
1. # virsh dominfo rhel5.7
Id:             -
Name:           rhel5.7
UUID:           2aa631dd-46b5-4b18-dc4f-1ff5f57bf2f2
OS Type:        hvm
State:          shut off
CPU(s):         1
Max memory:     1048576 kB
Used memory:    1048576 kB
Persistent:     yes
Autostart:      disable

2. # virsh autostart rhel5.7
Domain rhel5.7 marked as autostarted

3. # virsh dominfo rhel5.7
Id:             -
Name:           rhel5.7
UUID:           2aa631dd-46b5-4b18-dc4f-1ff5f57bf2f2
OS Type:        hvm
State:          shut off
CPU(s):         1
Max memory:     1048576 kB
Used memory:    1048576 kB
Persistent:     yes
Autostart:      enable


4. # virsh start rhel5.7
Domain rhel5.7 started

5. # virsh destroy rhel5.7
Domain rhel5.7 destroyed

6. # service libvirtd restart
Stopping libvirtd daemon:                                  [  OK  ]
Starting libvirtd daemon:                                  [  OK  ]

7. # virsh list --all
 Id Name                 State
----------------------------------
  2 rhel5.7              running
Comment 13 hongming 2012-06-27 06:30:11 EDT
After do the following verifying steps , the error occurs after downgrading libvirt with guest with autostart. But It don't occur after upgrading.Move its status to ASSIGNED.

1) Upgrade libvirt 
# virsh dominfo rhel5.7
Id:             2
Name:           rhel5.7
UUID:           2aa631dd-46b5-4b18-dc4f-1ff5f57bf2f2
OS Type:        hvm
State:          running
CPU(s):         1
CPU time:       165.1s
Max memory:     1048576 kB
Used memory:    1048576 kB
Persistent:     yes
Autostart:      enable

# rpm -Uvh libvirt-0.8.2-26.el5.x86_64.rpm libvirt-python-0.8.2-26.el5.x86_64.rpm
Preparing...                ########################################### [100%]
   1:libvirt                ########################################### [ 50%]
   2:libvirt-python         ########################################### [100%]

# service libvirtd restart
Stopping libvirtd daemon:                                  [  OK  ]
Starting libvirtd daemon:                                  [  OK  ]

# virsh dominfo rhel5.7
Id:             2
Name:           rhel5.7
UUID:           2aa631dd-46b5-4b18-dc4f-1ff5f57bf2f2
OS Type:        hvm
State:          running
CPU(s):         1
CPU time:       165.1s
Max memory:     1048576 kB
Used memory:    1048576 kB
Persistent:     yes
Autostart:      enable

# virsh autostart rhel5.7
Domain rhel5.7 marked as autostarted


2) Downgrade libvirt

# virsh dominfo rhel5.7
Id:             2
Name:           rhel5.7
UUID:           2aa631dd-46b5-4b18-dc4f-1ff5f57bf2f2
OS Type:        hvm
State:          running
CPU(s):         1
CPU time:       6.6s
Max memory:     1048576 kB
Used memory:    1048576 kB
Persistent:     yes
Autostart:      enable

# rpm -Uvh libvirt-0.8.2-25.el5.x86_64.rpm libvirt-python-0.8.2-25.el5.x86_64.rpm --oldpackage
Preparing...                ########################################### [100%]
   1:libvirt                ########################################### [ 50%]
   2:libvirt-python         ########################################### [100%]

# service libvirtd restart
Stopping libvirtd daemon:                                  [  OK  ]
Starting libvirtd daemon:                                  [  OK  ]

# virsh dominfo rhel5.7
Id:             2
Name:           rhel5.7
UUID:           2aa631dd-46b5-4b18-dc4f-1ff5f57bf2f2
OS Type:        hvm
State:          running
CPU(s):         1
CPU time:       31.8s
Max memory:     1048576 kB
Used memory:    1048576 kB
Persistent:     yes
Autostart:      disable

# virsh autostart rhel5.7
error: Failed to mark domain rhel5.7 as autostarted
error: Failed to create symlink '/etc/libvirt/qemu/autostart/rhel5.7.xml to '/etc/libvirt/qemu/rhel5.7.xml': File exists
Comment 14 hongming 2012-06-27 23:28:05 EDT
Because there are only libvirt-0.8.2-25.el5 and libvirt-0.8.2-26.el5 in rhel5 and the bug isn't fixed in libvirt-0.8.2-25. The above downgrade testing is invalid. The results in downgrade and upgrade testing all are correct. 


So move it to VERIFIED again.
Comment 16 errata-xmlrpc 2013-01-07 23:56:26 EST
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHSA-2013-0127.html

Note You need to log in before you can comment on or make changes to this bug.