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.
Bug 589944 - Unexpected results when resuming hibernated VM
Summary: Unexpected results when resuming hibernated VM
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: kernel
Version: 6.0
Hardware: All
OS: Linux
low
medium
Target Milestone: rc
: 6.2
Assignee: Stefan Assmann
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks: 562808 580953 846704
TreeView+ depends on / blocked
 
Reported: 2010-05-07 11:07 UTC by Stefan Assmann
Modified: 2013-01-09 22:33 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-07-16 10:41:11 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Stefan Assmann 2010-05-07 11:07:20 UTC
Description of problem:
Installed RHEL6 VM inside of RHEL6. Tried to hibernate the VM. That part seems to work but powering up the VM again just starts the VM like no hibernation happened.

Version-Release number of selected component (if applicable):
virt-manager-0.8.4-1.el6.noarch

How reproducible:
always

Steps to Reproduce:
1. hibernate VM
2. try to reboot VM
  
Actual results:
VM restart as if no hibernation happened

Expected results:
VM resumes properly

Comment 2 RHEL Program Management 2010-05-07 12:58:54 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
inclusion.

Comment 3 Cole Robinson 2010-05-11 18:09:25 UTC
Can you provide the exact steps you are taking? What is the guest OS? How are you 'hibernating' the machine? Does the machine fully turn off afterwards? When you start the machine afterwards, what exactly are you expecting that isn't happening?

Either way, reassigning to KVM since it doesn't sound virt-manager specific.

Comment 4 Juan Quintela 2010-05-11 19:06:38 UTC
Stefan, what do you mean here by?
- hybernate VM
- try to reboot VM

I paused the machine, and once there:
- reboot don't work
- resume (pressing back pause) works as expected.

Comment 5 Stefan Assmann 2010-05-12 10:46:09 UTC
More detailed information:
RHEL6 host running RHEL6 kvm guest

In the RHEL6 guest (GNOME) I went to System -> Shut Down -> Hibernate. After that the guest performs hibernation and shuts off completely. When I select the VM in virt-manager now and click the "Run" button the machine powers up again.
The problem is that it doesn't restore the hibernated state but performs a "normal" start, as you would expect it after regularly powering down the VM.

Comment 6 Juan Quintela 2010-05-13 19:05:24 UTC
Gleb, do we support hibernate/resume for gests?

Comment 7 Gleb Natapov 2010-05-14 09:02:08 UTC
(In reply to comment #6)
> Gleb, do we support hibernate/resume for gests?    

We do (mainly for WHQL testing). But in case of S4 (hibernate to disk) all the real work is done by guest OS. There is nothing in KVM that is there specifically to support S4. Most (all of them in case of linux guests) of the bugs reported about S4 turned to be guest bugs.

Comment 8 Gleb Natapov 2010-05-14 09:03:28 UTC
(In reply to comment #5)
> More detailed information:
> RHEL6 host running RHEL6 kvm guest
> 
> In the RHEL6 guest (GNOME) I went to System -> Shut Down -> Hibernate. After
> that the guest performs hibernation and shuts off completely. When I select the
> VM in virt-manager now and click the "Run" button the machine powers up again.
> The problem is that it doesn't restore the hibernated state but performs a
> "normal" start, as you would expect it after regularly powering down the VM.    

Try this without virt-manager. Run qemu manually, hibernate, run qemu once again.

Comment 9 Stefan Assmann 2010-05-14 10:04:59 UTC
ran "sudo /usr/libexec/qemu-kvm -boot c -drive file=/extern/images/RHEL6.img -m 512"
clicked System -> Shutdown -> Hibernate
VM wrote to disk and shut itself down
ran "sudo /usr/libexec/qemu-kvm -boot c -drive file=/extern/images/RHEL6.img -m 512" again

VM does not resume hibernated state and shows GDM login prompt.

Comment 10 Gleb Natapov 2010-05-14 10:28:44 UTC
And can you check please if hibernate works on real HW?

Comment 11 Stefan Assmann 2010-05-14 10:34:02 UTC
yes, I'm running RHEL6 on my host as well and hibernate works there.

Comment 12 Gleb Natapov 2010-05-14 10:42:26 UTC
Run "swapon -s" in the guest. Remember the name of  a swap device. Hibernate the guest. When doing resume add "resume=swap device" to kernel command line.

Comment 13 Stefan Assmann 2010-05-14 11:25:31 UTC
I've added "resume=/dev/dm-1" as given by swapon -s and now the system doesn't start anymore giving the error

no root device found
Boot has failed, sleeping forever

Comment 14 Gleb Natapov 2010-05-14 12:27:40 UTC
provide full boot log.

Comment 15 Gleb Natapov 2010-05-14 12:27:56 UTC
provide full boot log.

Comment 16 Stefan Assmann 2010-05-14 12:37:52 UTC
can't do

sudo /usr/libexec/qemu-kvm -boot c -drive file=/extern/images/RHEL6.img -m 512 -append "console=ttyS0" -serial file:log.txt

-append only allowed with -kernel option

Gleb this seems fairly easy to reproduce, could you please try to reproduce it on one of your machines? You know your way around qemu-kvm much better than I do.

Comment 17 Gleb Natapov 2010-05-14 12:41:14 UTC
Also what "cat /proc/mdstat" in the guest shows?

Comment 18 Gleb Natapov 2010-05-14 12:42:51 UTC
(In reply to comment #16)
> can't do
> 
> sudo /usr/libexec/qemu-kvm -boot c -drive file=/extern/images/RHEL6.img -m 512
> -append "console=ttyS0" -serial file:log.txt
You should edit grub menu inside guest to add console=ttyS0 to kernel parameter.

> 
> -append only allowed with -kernel option
> 
> Gleb this seems fairly easy to reproduce, could you please try to reproduce it
> on one of your machines? You know your way around qemu-kvm much better than I
> do.    

This has nothing to do with qemu-kvm. This is guest bug.

Comment 19 Gleb Natapov 2010-05-16 09:20:29 UTC
I can reproduce this with guest kernel 2.6.32-25.el6.x86_64 (2.6.32-19.el6.x86_64 doesn't allow to suspend to disk at all).
If I add another disk to VM and configure it to be swap device (without LVM) suspend and resume works. The bug need to be reassigned to kernel.

Comment 20 RHEL Program Management 2010-07-15 14:02:36 UTC
This issue has been proposed when we are only considering blocker
issues in the current Red Hat Enterprise Linux release. It has
been denied for the current Red Hat Enterprise Linux release.

** If you would still like this issue considered for the current
release, ask your support representative to file as a blocker on
your behalf. Otherwise ask that it be considered for the next
Red Hat Enterprise Linux release. **

Comment 23 RHEL Program Management 2011-10-07 15:02:19 UTC
Since RHEL 6.2 External Beta has begun, and this bug remains
unresolved, it has been rejected as it is not proposed as
exception or blocker.

Red Hat invites you to ask your support representative to
propose this request, if appropriate and relevant, in the
next release of Red Hat Enterprise Linux.

Comment 24 Karen Noel 2012-07-13 18:22:10 UTC
Is this still a problem in RHEL 6.3?

Comment 25 Stefan Assmann 2012-07-16 06:41:45 UTC
works with 6.3.


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