Bug 682151 - guest can not reboot after hot remove in used virtio block device
Summary: guest can not reboot after hot remove in used virtio block device
Keywords:
Status: CLOSED WORKSFORME
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: kernel
Version: 5.7
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: rc
: ---
Assignee: Red Hat Kernel Manager
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks: Rhel5KvmTier2
TreeView+ depends on / blocked
 
Reported: 2011-03-04 10:21 UTC by Shirley Zhou
Modified: 2015-03-05 00:52 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-06-10 04:30:27 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Shirley Zhou 2011-03-04 10:21:05 UTC
Description of problem:
dd file to attached virtio disk, and hot remove this virtio disk, because this disk is in use, so it can not be removed. After that, guest can not be reboot in guest.

Version-Release number of selected component (if applicable):
guest kernel:kernel-2.6.18-238.5.1.el5
host qemu:qemu-kvm-0.12.1.2-2.113.el6_0.8.x86_64

How reproducible:
100%

Steps to Reproduce:
1.start qemu rhel5.6.z guest, one boot disk, one virtio data disk
2.login guest, make partition and make file sytem on this data disk, and mount this disk to /mnt
3. dd big file to /mnt
#dd if=/dev/urandom of=/mnt/test bs=1M count=2048 conv=fsync
4. before dd finish, hot remove this disk via qemu monitor
#(qemu) device_del $device_id
5. excute reboot command in guest
  
Actual results:
after step5, reboot message broadcast, but guest keep running, not restart.

Expected results:
guest can be reboot ok

Additional info:

Tried on RHEL6.1 guest, can be reboot ok after step 5.

Comment 1 FuXiangChun 2011-06-09 11:10:32 UTC
tested on

host info:
# uname -r
2.6.32-156.el6.x86_64
#rpm -qa|grep kvm
qemu-kvm-0.12.1.2-2.164.el6.x86_64

guest info:
# uname -r
2.6.18-267.el5

steps to test:

1./usr/libexec/qemu-kvm -m 4G -smp 2 -usbdevice tablet -drive file=rhel5.7-64,if=none,id=drive-virtio0,werror=stop,rerror=stop,cache=none -boot c -device virtio-blk-pci,drive=drive-virtio0,id=virtio-blk-pci0 -drive file=/root/2.qcow2,if=none,id=drive-virtio0-1,format=qcow2,cache=none -device virtio-blk-pci,drive=drive-virtio0-1,id=virtio-blk-pci0-1 -netdev tap,id=hostnet0,script=/etc/qemu-ifup -device virtio-net-pci,netdev=hostnet0,mac=02:00:ff:3F:2f:1f,bus=pci.0 -uuid `uuidgen` -name rhel57 -cdrom /dev/sr0 -monitor stdio -vnc :1

2. format a new disk and mount it in guest 
mkfs -t ext3 /dev/vdb in guest
mount /dev/vdb /mnt/

3.dd if=/dev/urandom of=/mnt/test bs=1M count=2048 conv=fsync
4.(qemu) device_del virtio-blk-pci0-1

5. reboot guest in guest

result:
guest can be reboot.

Based on above ,this bug can not be reproduced.

Comment 2 juzhang 2011-06-10 04:30:27 UTC
According to comment1, close this issue as worksforeme,if anybody hit this issue again,please re-open it.


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