Bug 682151 - guest can not reboot after hot remove in used virtio block device
guest can not reboot after hot remove in used virtio block device
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: kernel (Show other bugs)
Unspecified Unspecified
medium Severity medium
: rc
: ---
Assigned To: Red Hat Kernel Manager
Virtualization Bugs
Depends On:
Blocks: Rhel5KvmTier2
  Show dependency treegraph
Reported: 2011-03-04 05:21 EST by Shirley Zhou
Modified: 2015-03-04 19:52 EST (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2011-06-10 00:30:27 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Shirley Zhou 2011-03-04 05:21:05 EST
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-

How reproducible:

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 07:10:32 EDT
tested on

host info:
# uname -r
#rpm -qa|grep kvm

guest info:
# uname -r

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

guest can be reboot.

Based on above ,this bug can not be reproduced.
Comment 2 juzhang 2011-06-10 00:30:27 EDT
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.