Bug 589944 - Unexpected results when resuming hibernated VM
Unexpected results when resuming hibernated VM
Status: CLOSED CURRENTRELEASE
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: kernel (Show other bugs)
6.0
All Linux
low Severity medium
: rc
: 6.2
Assigned To: Stefan Assmann
Virtualization Bugs
:
Depends On:
Blocks: 562808 580953 846704
  Show dependency treegraph
 
Reported: 2010-05-07 07:07 EDT by Stefan Assmann
Modified: 2013-01-09 17:33 EST (History)
6 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-07-16 06:41:11 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Stefan Assmann 2010-05-07 07:07:20 EDT
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 Product and Program Management 2010-05-07 08:58:54 EDT
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 14:09:25 EDT
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 15:06:38 EDT
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 06:46:09 EDT
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 15:05:24 EDT
Gleb, do we support hibernate/resume for gests?
Comment 7 Gleb Natapov 2010-05-14 05:02:08 EDT
(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 05:03:28 EDT
(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 06:04:59 EDT
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 06:28:44 EDT
And can you check please if hibernate works on real HW?
Comment 11 Stefan Assmann 2010-05-14 06:34:02 EDT
yes, I'm running RHEL6 on my host as well and hibernate works there.
Comment 12 Gleb Natapov 2010-05-14 06:42:26 EDT
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 07:25:31 EDT
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 08:27:40 EDT
provide full boot log.
Comment 15 Gleb Natapov 2010-05-14 08:27:56 EDT
provide full boot log.
Comment 16 Stefan Assmann 2010-05-14 08:37:52 EDT
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 08:41:14 EDT
Also what "cat /proc/mdstat" in the guest shows?
Comment 18 Gleb Natapov 2010-05-14 08:42:51 EDT
(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 05:20:29 EDT
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 Product and Program Management 2010-07-15 10:02:36 EDT
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 Product and Program Management 2011-10-07 11:02:19 EDT
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 14:22:10 EDT
Is this still a problem in RHEL 6.3?
Comment 25 Stefan Assmann 2012-07-16 02:41:45 EDT
works with 6.3.

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