Bug 716870

Summary: migration will hang when stop nfs service(guest 2th disk's image on nfs file)
Product: Red Hat Enterprise Linux 5 Reporter: FuXiangChun <xfu>
Component: kvmAssignee: Virtualization Maintenance <virt-maint>
Status: CLOSED NOTABUG QA Contact: Virtualization Bugs <virt-bugs>
Severity: medium Docs Contact:
Priority: medium    
Version: 5.7CC: bcao, juzhang, michen, mkenneth, virt-maint
Target Milestone: rc   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-06-29 06:32:16 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description FuXiangChun 2011-06-27 10:26:06 UTC
Description of problem:
start vm with 2 disk. 1st disk is block device and 2th disk's image is on nfs file, do live migration and cp files to 2th disk. migration will hang.

Version-Release number of selected component (if applicable):
# uname -r
2.6.18-269.el5
# rpm -qa|grep kvm
kvm-83-238.el5

How reproducible:
100%

Steps to Reproduce:
1. create a image on nfs file as 2th disk 
 #qemu-img create -f qcow2 /mnt/tt 40G

2.# /usr/libexec/qemu-kvm -no-hpet -usbdevice tablet -rtc-td-hack -name 61 -smp 2 -m 4G -uuid 9e6f04cf-2ad7-45aa-9333-2d2ee26570c6 -boot c -drive file=/dev/chayang/chayang1,if=virtio,cache=none,boot=on,format=qcow2,werror=stop -net nic,vlan=1,macaddr=52:54:00:94:a3:8b,model=virtio -net tap,vlan=1,script=/etc/qemu-ifup -notify all -balloon none -monitor stdio -vnc :1  -drive file=/mnt/tt,if=virtio,werror=stop,cache=none,format=qcow2,cache=none

3.# /usr/libexec/qemu-kvm -no-hpet -usbdevice tablet -rtc-td-hack -name 61 -smp 2 -m 4G -uuid 9e6f04cf-2ad7-45aa-9333-2d2ee26570c6 -boot c -drive file=/dev/chayang/chayang1,if=virtio,cache=none,boot=on,format=qcow2,werror=stop -net nic,vlan=1,macaddr=52:54:00:94:a3:8b,model=virtio -net tap,vlan=1,script=/etc/qemu-ifup -notify all -balloon none -monitor stdio -vnc :1  -drive file=/mnt/tt,if=virtio,werror=stop,cache=none,format=qcow2,cache=none -incoming tcp:0:5555

4. format 2th disk and mount it to /mnt in guest

5. cp file to /mnt/ in guest

6. do migrate 
  
Actual results:
migration hang

Expected results:
migrate successful

Additional info:

Comment 1 FuXiangChun 2011-06-29 06:32:16 UTC
as kvm is not full support hard mount nfs. if change hard mount nfs to soft mount nfs, kvm and guest will work well. so it isn't a bug. 

change mount ip:/xx /mnt to  mount -o soft,timeo=2,retrans=1 ip:/mnt /mnt