Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Description of problem:
Libvirt is not honoring the VIR_DOMAIN_START_PAUSED flag when resuming a managed save domain. Additionally, when libvirt starts a paused domain, it is failing to issue a VIR_DOMAIN_EVENT_SUSPENDED to reflect the domain state, which may confuse management apps that are using events to track domain transitions. Similar event problems occur when reverting to a snapshot.
Version-Release number of selected component (if applicable):
libvirt-0.9.4-6.el6
How reproducible:
100%
Steps to Reproduce:
1. virsh start dom --paused
2. virsh resume dom
3. virsh managedsave dom
4. virsh start dom --paused
5. virsh pause dom
6. virsh snapshot-create-as dom name
7. virsh destroy dom
8. virsh snapshot-revert dom name
Actual results:
1. VIR_DOMAIN_EVENT_STARTED issued, but no VIR_DOMAIN_EVENT_SUSPENDED
2. VIR_DOMAIN_EVENT_RESUMED issued
3. VIR_DOMAIN_EVENT_STOPPED issued
4. VIR_DOMAIN_EVENT_STARTED issued and domain is running
5. VIR_DOMAIN_EVENT_SUSPENDED issued
6. no event, but snapshot remembers it is paused
7. VIR_DOMAIN_EVENT_STOPPED issued
8. VIR_DOMAIN_EVENT_STARTED and VIR_DOMAIN_EVENT_SUSPENDED both issued, but vcpus had a window where they temporarily ran and differ from the state of the snapshot
Expected results:
1. both VIR_DOMAIN_EVENT_STARTED and VIR_DOMAIN_EVENT_SUSPENDED issued
2. VIR_DOMAIN_EVENT_RESUMED issued
3. VIR_DOMAIN_EVENT_STOPPED issued
4. VIR_DOMAIN_EVENT_STARTED and VIR_DOMAIN_EVENT_PAUSED issued, domain is paused
5. error, since domain is already paused
6. no event, but snapshot remembers it is paused
7. VIR_DOMAIN_EVENT_STOPPED issued
8. VIR_DOMAIN_EVENT_STARTED and VIR_DOMAIN_EVENT_SUSPENDED both issued, domain is paused and in same state as at the time of the snapshot
Additional info:
One other bug to be fixed in this area of code at the same time: Newer qemu does not allow 'qemu -loadvm name' to revert to an inactive internal snapshot - if there is no accompanying vm state in the snapshot name, the attempt is rejected. To fix that, the revert code needs to use 'qemu-img snapshot -a name'. Fixing this is necessary before bug 674537 can be tested.
Upstream now has several patches, culminating in this commit, that should fix this bug:
commit 7dc44eb059fc976e7c88091477a981a4a90bf2f5
Author: Eric Blake <eblake>
Date: Sat Aug 27 13:48:19 2011 -0600
snapshot: fine-tune qemu snapshot revert states
For a system checkpoint of a running or paused domain, it's fairly
easy to honor new flags for altering which state to use after the
revert. For an inactive snapshot, the revert has to be done while
there is no qemu process, so do back-to-back transitions; this also
lets us revert to inactive snapshots even for transient domains.
* src/qemu/qemu_driver.c (qemuDomainRevertToSnapshot): Support new
flags.
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/RHBA-2011-1513.html