Bug 589947 - Run 'suspend' from inside guest OS, VM becomes unresponsive
Run 'suspend' from inside guest OS, VM becomes unresponsive
Status: CLOSED WONTFIX
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: qemu-kvm (Show other bugs)
6.0
All Linux
low Severity medium
: rc
: ---
Assigned To: Gleb Natapov
Virtualization Bugs
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2010-05-07 07:12 EDT by Stefan Assmann
Modified: 2013-12-08 19:47 EST (History)
8 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2010-05-14 05:35:57 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:12:08 EDT
Description of problem:
Running RHEL6 VM inside RHEL6 host.
Clicking on System -> Shut Down -> Suspend results in an unresponsive VM that never recovers and needs to be "Forced Off"

Version-Release number of selected component (if applicable):
virt-manager-0.8.4-1.el6.noarch
qemu-kvm-0.12.1.2-2.48.el6.x86_64

How reproducible:
always

Steps to Reproduce:
1. start VM
2. Clicking on System -> Shut Down -> Suspend
  
Actual results:
VM becomes unresponsive

Expected results:
VM suspends and recovers on keypress
Comment 2 RHEL Product and Program Management 2010-05-07 08:58:50 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:16:59 EDT
I don't know where in the UI you are seeing System -> Shutdown -> Suspend. That hierarchy isn't in the virt-manager UI. There is 'Suspend' under the right click menu when selecting a VM. This actually is a 'pause' function: right clicking again should show a 'Resume' option which will let the VM continue on its way. Does that work for you?

We should change this to be 'Pause'/'Unpause' like we use in the Details view: I think it's a much clearer name for users. Changing this bug to track the rename.
Comment 4 Stefan Assmann 2010-05-12 02:33:21 EDT
Hi Cole,

sorry for the confusion. I'm talking about "System -> Shutdown -> Suspend" in the VM (RHEL6). So in other words using the suspend functionality of the OS in the running VM itself.
Comment 5 Cole Robinson 2010-05-12 13:46:09 EDT
Ah okay, sorry about the confusion. The suspend vs. pause issue I mentioned isn't even relevant for RHEL6 virt-manager anyways. Reassigning this to kvm
Comment 7 Gleb Natapov 2010-05-13 14:43:27 EDT
(In reply to comment #0)
> Description of problem:
> Running RHEL6 VM inside RHEL6 host.
> Clicking on System -> Shut Down -> Suspend results in an unresponsive VM that
> never recovers and needs to be "Forced Off"
> 
> Version-Release number of selected component (if applicable):
> virt-manager-0.8.4-1.el6.noarch
> qemu-kvm-0.12.1.2-2.48.el6.x86_64
> 
> How reproducible:
> always
> 
> Steps to Reproduce:
> 1. start VM
start VM how? what is your command line?

> 2. Clicking on System -> Shut Down -> Suspend
Do you not what kind of suspend is this? S3 (suspend in ram) or S4 (suspend into disk)?
 
> Actual results:
> VM becomes unresponsive
> 
> Expected results:
> VM suspends and recovers on keypress    
This is not what expected result should be. Expected result is that VM exits in case of S4 
or restarts immediately in case of S3.

Does this works on real HW btw?
Comment 8 Stefan Assmann 2010-05-14 03:00:45 EDT
(In reply to comment #7)
> > Steps to Reproduce:
> > 1. start VM
> start VM how? what is your command line?

I'm only using virt-manager so in that case it means pressing the "Power ON" button in virt-manager.

> 
> > 2. Clicking on System -> Shut Down -> Suspend
> Do you not what kind of suspend is this? S3 (suspend in ram) or S4 (suspend
> into disk)?
> 
> > Actual results:
> > VM becomes unresponsive
> > 
> > Expected results:
> > VM suspends and recovers on keypress    
> This is not what expected result should be. Expected result is that VM exits in
> case of S4 
> or restarts immediately in case of S3.

VM exit on S4 sounds right, but why "restart immediately" on S3?

> 
> Does this works on real HW btw?

Yes it works on real HW.
Comment 9 Gleb Natapov 2010-05-14 03:22:36 EDT
(In reply to comment #8)
> (In reply to comment #7)
> > > Steps to Reproduce:
> > > 1. start VM
> > start VM how? what is your command line?
> 
> I'm only using virt-manager so in that case it means pressing the "Power ON"
> button in virt-manager.
Run ps and see what command line is.

> 
> > 
> > > 2. Clicking on System -> Shut Down -> Suspend
> > Do you not what kind of suspend is this? S3 (suspend in ram) or S4 (suspend
> > into disk)?
> > 
> > > Actual results:
> > > VM becomes unresponsive
> > > 
> > > Expected results:
> > > VM suspends and recovers on keypress    
> > This is not what expected result should be. Expected result is that VM exits in
> > case of S4 
> > or restarts immediately in case of S3.
> 
> VM exit on S4 sounds right, but why "restart immediately" on S3?
> 
That how it works.

> > 
> > Does this works on real HW btw?
> 
> Yes it works on real HW.   
Try to use latest qemu-kvm. If it still does not work try doing this: 
1. as root run "chvt 2" in terminal.
2. login as root
3. run "echo mem > /sys/power/state"

See if it resumes immediately.
Comment 10 Stefan Assmann 2010-05-14 04:26:24 EDT
(In reply to comment #9)
> (In reply to comment #8)
> > (In reply to comment #7)
> > > > Steps to Reproduce:
> > > > 1. start VM
> > > start VM how? what is your command line?
> > 
> > I'm only using virt-manager so in that case it means pressing the "Power ON"
> > button in virt-manager.
> Run ps and see what command line is.

/usr/libexec/qemu-kvm -S -M rhel6.0.0 -enable-kvm -m 512 -smp 1,sockets=1,cores=1,threads=1 -name RHEL6 -uuid 6f9c5f9b-8cd5-0297-8cc9-7b53f6cb1c49 -nodefaults -chardev socket,id=monitor,path=/var/lib/libvirt/qemu/RHEL6.monitor,server,nowait -mon chardev=monitor,mode=control -rtc base=utc -boot c -drive file=/extern/images/RHEL6.img,if=none,id=drive-virtio-disk0,boot=on,format=raw -device virtio-blk-pci,bus=pci.0,addr=0x4,drive=drive-virtio-disk0,id=virtio-disk0 -drive if=none,media=cdrom,id=drive-ide0-1-0,readonly=on -device ide-drive,bus=ide.1,unit=0,drive=drive-ide0-1-0,id=ide0-1-0 -netdev tap,fd=19,id=hostnet0 -device virtio-net-pci,netdev=hostnet0,id=net0,mac=52:54:00:82:62:3d,bus=pci.0,addr=0x5 -chardev pty,id=serial0 -device isa-serial,chardev=serial0 -usb -device usb-tablet,id=input0 -vnc 127.0.0.1:1 -k de -vga cirrus -device AC97,id=sound0,bus=pci.0,addr=0x6 -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3

> > > > Expected results:
> > > > VM suspends and recovers on keypress    
> > > This is not what expected result should be. Expected result is that VM exits in
> > > case of S4 
> > > or restarts immediately in case of S3.
> > 
> > VM exit on S4 sounds right, but why "restart immediately" on S3?
> > 
> That how it works.
> 
> > > 
> > > Does this works on real HW btw?
> > 
> > Yes it works on real HW.   
> Try to use latest qemu-kvm.

Sorry can't get latest qemu-kvm to compile on RHEL6

make
[...]
  CC    x86_64-softmmu/arch_init.o
In file included from /home/sassmann/devel/repos/qemu-kvm/target-i386/cpu.h:22,
                 from /home/sassmann/devel/repos/qemu-kvm/qemu-common.h:98,
                 from /home/sassmann/devel/repos/qemu-kvm/monitor.h:4,
                 from /home/sassmann/devel/repos/qemu-kvm/arch_init.c:31:
./config.h:3:1: error: "CONFIG_SOFTMMU" redefined
In file included from /home/sassmann/devel/repos/qemu-kvm/config.h:2,
                 from /home/sassmann/devel/repos/qemu-kvm/arch_init.c:30:
[...]
./config-target.h:11:1: error: this is the location of the previous definition
make[1]: *** [arch_init.o] Error 1
make: *** [subdir-x86_64-softmmu] Error 2

 If it still does not work try doing this: 
> 1. as root run "chvt 2" in terminal.
> 2. login as root
> 3. run "echo mem > /sys/power/state"
> 
> See if it resumes immediately.    

First time I tried it the screen switch to the boot bios messages and returned about 1-2 seconds after that. However trying it a second time and the echo never returned leaving the shell unresponsive.
Comment 11 Gleb Natapov 2010-05-14 04:55:22 EDT
(In reply to comment #10)
> (In reply to comment #9)
> > (In reply to comment #8)
> > > (In reply to comment #7)
> > > > > Steps to Reproduce:
> > > > > 1. start VM
> > > > start VM how? what is your command line?
> > > 
> > > I'm only using virt-manager so in that case it means pressing the "Power ON"
> > > button in virt-manager.
> > Run ps and see what command line is.
> 
> /usr/libexec/qemu-kvm -S -M rhel6.0.0 -enable-kvm -m 512 -smp
> 1,sockets=1,cores=1,threads=1 -name RHEL6 -uuid
> 6f9c5f9b-8cd5-0297-8cc9-7b53f6cb1c49 -nodefaults -chardev
> socket,id=monitor,path=/var/lib/libvirt/qemu/RHEL6.monitor,server,nowait -mon
> chardev=monitor,mode=control -rtc base=utc -boot c -drive
> file=/extern/images/RHEL6.img,if=none,id=drive-virtio-disk0,boot=on,format=raw
> -device
> virtio-blk-pci,bus=pci.0,addr=0x4,drive=drive-virtio-disk0,id=virtio-disk0
> -drive if=none,media=cdrom,id=drive-ide0-1-0,readonly=on -device
> ide-drive,bus=ide.1,unit=0,drive=drive-ide0-1-0,id=ide0-1-0 -netdev
> tap,fd=19,id=hostnet0 -device
> virtio-net-pci,netdev=hostnet0,id=net0,mac=52:54:00:82:62:3d,bus=pci.0,addr=0x5
> -chardev pty,id=serial0 -device isa-serial,chardev=serial0 -usb -device
> usb-tablet,id=input0 -vnc 127.0.0.1:1 -k de -vga cirrus -device
> AC97,id=sound0,bus=pci.0,addr=0x6 -device
> virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3
Try without virtio. Virtio does not support power management.

> 
> > > > > Expected results:
> > > > > VM suspends and recovers on keypress    
> > > > This is not what expected result should be. Expected result is that VM exits in
> > > > case of S4 
> > > > or restarts immediately in case of S3.
> > > 
> > > VM exit on S4 sounds right, but why "restart immediately" on S3?
> > > 
> > That how it works.
> > 
> > > > 
> > > > Does this works on real HW btw?
> > > 
> > > Yes it works on real HW.   
> > Try to use latest qemu-kvm.
> 
> Sorry can't get latest qemu-kvm to compile on RHEL6
I meant latest qemu-kvm from RHEL6 (qemu-kvm-0.12.1.2-2.53.el6.x86_64).
But if 48 resumes for you at least once from console no need to bother.


> 
>  If it still does not work try doing this: 
> > 1. as root run "chvt 2" in terminal.
> > 2. login as root
> > 3. run "echo mem > /sys/power/state"
> > 
> > See if it resumes immediately.    
> 
> First time I tried it the screen switch to the boot bios messages and returned
> about 1-2 seconds after that.
That's how it should work.

>                                            However trying it a second time and the echo
> never returned leaving the shell unresponsive.    
Try without virtio please.
Comment 12 Stefan Assmann 2010-05-14 05:24:35 EDT
I reinstalled the VM with virt-manager but w/o selecting OS Type: Linux and Version: RHEL6 to omit virt-io. This time when I clicked suspend in the VM it behaved as expected and the system resumed immediately after clicking suspend. So this problem seems indeed to be related to virt-io.

 5201 ?        Sl     0:55 /usr/libexec/qemu-kvm -S -M rhel6.0.0 -enable-kvm -m 512 -smp 1,sockets=1,cores=1,threads=1 -name RHEL6 -uuid 714740ea-87a9-7de2-1be5-101e73fc9193 -nodefaults -chardev socket,id=monitor,path=/var/lib/libvirt/qemu/RHEL6.monitor,server,nowait -mon chardev=monitor,mode=control -rtc base=utc -boot c -drive file=/extern/images/RHEL6.img,if=none,id=drive-ide0-0-0,boot=on,format=raw -device ide-drive,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0 -drive if=none,media=cdrom,id=drive-ide0-1-0,readonly=on -device ide-drive,bus=ide.1,unit=0,drive=drive-ide0-1-0,id=ide0-1-0 -netdev tap,fd=19,id=hostnet0 -device rtl8139,netdev=hostnet0,id=net0,mac=52:54:00:41:71:3d,bus=pci.0,addr=0x4 -chardev pty,id=serial0 -device isa-serial,chardev=serial0 -usb -vnc 127.0.0.1:1 -k de -vga cirrus -device AC97,id=sound0,bus=pci.0,addr=0x5 -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3
Comment 13 Gleb Natapov 2010-05-14 05:35:57 EDT
Thanks. Closing is as WONTFIX then. We already have RFE for PM support in virtio.
Comment 14 Stefan Assmann 2010-05-14 06:05:49 EDT
Gleb, could you point me to that RFE?
Comment 15 Gleb Natapov 2010-05-16 01:44:15 EDT
542378 is about virtio block. 582178 is about virtio-net (it is not RFE yet, but it will become one).

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