Bug 589863 - Enable 'autostart' doesn't take effect actually
Summary: Enable 'autostart' doesn't take effect actually
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: libvirt
Version: 6.0
Hardware: i386
OS: Linux
Target Milestone: rc
: ---
Assignee: Jiri Denemark
QA Contact: Virtualization Bugs
Depends On:
Blocks: Rhel6.1LibvirtTier1
TreeView+ depends on / blocked
Reported: 2010-05-07 06:57 UTC by zhanghaiyan
Modified: 2011-05-19 13:18 UTC (History)
10 users (show)

Fixed In Version: libvirt-0.8.7-1.el6
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 645664 (view as bug list)
Last Closed: 2011-05-19 13:18:43 UTC
Target Upstream Version:

Attachments (Terms of Use)

System ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2011:0596 normal SHIPPED_LIVE libvirt bug fix and enhancement update 2011-05-18 17:56:36 UTC

Description zhanghaiyan 2010-05-07 06:57:25 UTC
Description of problem:
Enable the 'autostart' for a running guest, it seems take effect when checking
dominfo. But after reboot the host, the guest doesn't automatically start but actually in shutoff status.

Version-Release number of selected component (if applicable):
- kernel-2.6.32-24.el6.i686
- libvirt-0.8.1-1.el6.i686

How reproducible:

Steps to Reproduce:
1. # cat vm1.xml
<domain type='lxc'>
 <clock offset='utc'/>
  <interface type='network'>
   <source network='default'/>
  <console type='pty' />
2. # virsh define vm1.xml

3. # virsh start vm1
Domain vm1 started

4.# virsh list --all
 Id Name                 State
4584 vm1                  running
  - fedora-rawhide       shut off

5. # virsh autostart vm1
Domain vm1 marked as autostarted

6. # virsh dominfo vm1
Id:             2577
Name:           vm1
UUID:           05a58f1a-a738-be83-99f2-3b27af79b66b
OS Type:        exe
State:          running
CPU(s):         1
CPU time:       0.0s
Max memory:     500000 kB
Used memory:    364 kB
Autostart:      enable

7. Reboot host

8. After host is rebooted,  # virsh list --all
 Id Name                 State
  - fedora-rawhide       shut off
  - vm1                  shut off

# virsh dominfo vm1
Id:             -
Name:           vm1
UUID:           05a58f1a-a738-be83-99f2-3b27af79b66b
OS Type:        exe
State:          shut off
CPU(s):         1
Max memory:     500000 kB
Used memory:    500000 kB
Autostart:      enable

Actual results:
After reboot the host, the guest didn't automatically start.

Expected results:
After reboot the host, the guest should automatically start.

Comment 2 RHEL Program Management 2010-05-07 09:04:48 UTC
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux major release.  Product Management has requested further
review of this request by Red Hat Engineering, for potential inclusion in a Red
Hat Enterprise Linux Major release.  This request is not yet committed for

Comment 4 Daniel Berrangé 2010-10-11 15:18:53 UTC
This should be addressed upstream

commit b611a3fb47e0e71a1309867bc4f261dee0f5401f
Author: Ryota Ozaki <ozaki.ryota@gmail.com>
Date:   Thu Jul 29 23:21:17 2010 +0900

    lxc: Fix 'autostart' doesn't take effect actually
    lxcStartup forgot to call lxcAutostartConfigs. Fix it.

Comment 6 Cui Chun 2011-02-09 09:26:24 UTC
Rechecked it on the following test environment according to steps in description. It is passed.

Test environment:

Go into lxc mode first
# virsh -c lxc:///

Comment 9 errata-xmlrpc 2011-05-19 13:18:43 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.


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