Bug 542378 - fix suspend to disk of virtio block
fix suspend to disk of virtio block
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: kernel (Show other bugs)
6.0
All Linux
high Severity high
: rc
: 6.2
Assigned To: Amit Shah
Virtualization Bugs
: Reopened
: 533342 582519 591585 (view as bug list)
Depends On: 516769 582519
Blocks: Rhel5KvmTier2 662543 693510 580954 720669 748534
  Show dependency treegraph
 
Reported: 2009-11-29 09:58 EST by Dor Laor
Modified: 2013-01-09 17:04 EST (History)
20 users (show)

See Also:
Fixed In Version: kernel-2.6.32-231.el6
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 516769
Environment:
Last Closed: 2012-06-20 03:32:33 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Comment 1 RHEL Product and Program Management 2009-11-29 10:15:18 EST
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 Dor Laor 2010-01-04 07:46:59 EST
*** Bug 533342 has been marked as a duplicate of this bug. ***
Comment 4 Eduardo Habkost 2010-01-20 06:52:59 EST
On RHEL-6, the KVM userspace package is named "qemu-kvm". Moving bug to the right component.
Comment 5 Dor Laor 2010-05-04 02:47:15 EDT
*** Bug 582519 has been marked as a duplicate of this bug. ***
Comment 6 Dor Laor 2010-05-04 02:50:37 EDT
Can QE try it on rhel6?
Comment 7 Gleb Natapov 2010-05-05 05:54:16 EDT
On resume new kernel boots and uses virtio-blk to load suspended OS image,
then control of virtio-blk device should be transfered from boot kernel
to resumed kernel. xen-blkfront.c for instance has function blkfront_resume() with comment:
/**
  * We are reconnecting to the backend, due to a suspend/resume, or a backend   
  * driver restart.  We tear down our blkif structure and recreate it, but
  * leave the device-layer structures intact so that this is transparent to the
  * rest of the kernel.
  */

I haven't seen such code in virtio-blk last time I looked.
Comment 8 chellwig@redhat.com 2010-05-07 07:58:57 EDT
Err. Just making sure I'm on the same page.  This is for doing suspend to disk of the guest, not the host?  In that case my previous comments don't apply and we'll have look at PM support in virtio_blk.
Comment 9 Gleb Natapov 2010-05-07 08:08:41 EDT
Correct. This is about suspending _guest_.
Comment 10 Gleb Natapov 2010-05-13 14:48:51 EDT
*** Bug 591585 has been marked as a duplicate of this bug. ***
Comment 17 Amit Shah 2011-05-30 06:49:53 EDT

*** This bug has been marked as a duplicate of bug 609286 ***
Comment 18 Amit Shah 2011-12-09 05:24:04 EST
Each virtio driver needs to be updated to handle PM, so re-opening this.
Comment 20 RHEL Product and Program Management 2011-12-12 23:41:53 EST
This request was evaluated by Red Hat Product Management for inclusion
in a Red Hat Enterprise Linux maintenance release. Product Management has 
requested further review of this request by Red Hat Engineering, for potential
inclusion in a Red Hat Enterprise Linux Update release for currently deployed 
products. This request is not yet committed for inclusion in an Update release.
Comment 21 Aristeu Rozanski 2012-02-15 14:55:43 EST
Patch(es) available on kernel-2.6.32-231.el6
Comment 24 Qunfang Zhang 2012-04-16 04:12:03 EDT
Verified on kernel-2.6.32-262.el6, and this bug does not exist.
Related packages:
qemu-kvm-0.12.1.2-2.275.el6.x86_64
seabios-0.6.1.2-18.el6.x86_64

Steps:
1. Boot guest with virtio serial device:
# /usr/libexec/qemu-kvm -M rhel6.3.0 -cpu Conroe -enable-kvm -m 2G -smp
2,sockets=1,cores=2,threads=1 -name rhel6.3 -uuid
4c84db67-faf8-4498-9829-19a3d6431d9d -rtc base=localtime,driftfix=slew -drive
file=/home/rhel6.3-64-new.qcow2,if=none,id=drive-virtio-disk0,format=qcow2,cache=none,werror=stop,rerror=stop,aio=native
-device
virtio-blk-pci,bus=pci.0,drive=drive-virtio-disk0,id=virtio-disk0,addr=0x5
-netdev tap,id=hostnet0,script=/etc/qemu-ifup -device
virtio-net-pci,netdev=hostnet0,id=net0,mac=00:1a:2a:42:10:66,bus=pci.0,addr=0x3
-usb -device usb-tablet,id=input0 -boot c -monitor stdio -drive
if=none,media=cdrom,id=drive-ide0-1-0,readonly=on,format=raw -device
ide-drive,bus=ide.1,unit=0,drive=drive-ide0-1-0,id=ide0-1-0 -vnc :10 -qmp
tcp:0:4444,server,nowait -bios /usr/share/seabios/bios-pm.bin -chardev
socket,path=/tmp/qzhang-test,server,nowait,id=isa1 -device
isa-serial,chardev=isa1,id=isa-serial1 -device
virtio-serial-pci,id=virtio-serial0,max_ports=31,vectors=4,bus=pci.0 -chardev
socket,id=channel0,path=/tmp/virtio-serial,server,nowait -device
virtserialport,chardev=channel0,name=org.linux-kvm.port.0,bus=virtio-serial0.0,id=port0
-device virtio-balloon-pci,bus=pci.0,id=balloon0

2. Suspend guest to disk 
#pm-hibernate

3. Resume guest by booting up with the same command line.

4. After resume, check if guest works well. For example, network ping available, no crash, hang happened, etc.

5. Repeat step 2~4 for several times.

Result: Guest works well to suspend to disk with virtio block device.

So, this issue is fixed.
Comment 26 errata-xmlrpc 2012-06-20 03:32:33 EDT
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/RHSA-2012-0862.html

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