Bug 704441

Summary: Destination vm quits automatically while ping-pong migration hit ENOSPAC
Product: Red Hat Enterprise Linux 5 Reporter: Min Deng <mdeng>
Component: kvmAssignee: Juan Quintela <quintela>
Status: CLOSED DUPLICATE QA Contact: Virtualization Bugs <virt-bugs>
Severity: high Docs Contact:
Priority: medium    
Version: 5.7CC: bcao, gcosta, juzhang, michen, mkenneth, tburke, virt-maint
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-08-07 09:48:09 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 580948    

Description Min Deng 2011-05-13 07:07:20 UTC
Description of problem:
1.destination vm quits automatically while ping-pong migration hit ENOSPAC
2.have the two hosts connect to the same iscsi server
For example -
iscsiadm --mode discovery --type sendtargets --portal 10.66.11.239 --discover
iscsiadm --mode node --targetname AMD_migration --portal 10.66.11.239 --login

Version-Release number of selected component (if applicable):
kernel&kvm
2.6.18-260.el5
kvm-83-232.el5


How reproducible:
always

Steps to Reproduce:
1.please make sure block device has a very small initial size 
for example-
ACTIVE            '/dev/tt/deng1' [152.00 MB] inherit
2.qemu-img create -f qcow2 /dev/tt/deng1 20G

3.boot source(A) and destination(B) guest together before doing migration
  A's command,
  /usr/libexec/qemu-kvm -rtc-td-hack -usbdevice tablet -no-hpet -drive file=/dev/tt/deng1,if=virtio,boot=on,werror=stop,cache=none,format=qcow2,media=disk -smp 2 -m 2G -net nic,macaddr=00:12:24:58:a1:2f,model=virtio,vlan=0 -net tap,script=/etc/qemu-ifup,vlan=0 -uuid `uuidgen` -boot dc -balloon virtio -notify all -monitor stdio -vnc :3 -soundhw ac97 -drive file=/opt/en_windows_server_2008_r2_standard_enterprise_datacenter_and_web_with_sp1_x64_dvd_617601.iso,if=ide,cache=none,media=cdrom,format=raw -drive file=/opt/virtio-drivers-1.0.1-52454.vfd,if=floppy,cache=none,format=raw

  B's command
  /usr/libexec/qemu-kvm -rtc-td-hack -usbdevice tablet -no-hpet -drive file=/dev/tt/deng1,if=virtio,boot=on,werror=stop,cache=none,format=qcow2,media=disk -smp 2 -m 2G -net nic,macaddr=00:12:24:58:a1:2f,model=virtio,vlan=0 -net tap,script=/etc/qemu-ifup,vlan=0 -uuid `uuidgen` -boot dc -balloon virtio -notify all -monitor stdio -vnc :3 -soundhw ac97 -drive file=/opt/en_windows_server_2008_r2_standard_enterprise_datacenter_and_web_with_sp1_x64_dvd_617601.iso,if=ide,cache=none,media=cdrom,format=raw -drive file=/opt/virtio-drivers-1.0.1-52454.vfd,if=floppy,cache=none,format=raw -incoming tcp:0:1111

4.do ping-pong live migration and make sure hitting ENOSPAC every time,if you cannot reproduce the bz please try more than once.In order to make sure vm status is running before each migration,please also extend block device size if necessary.
 
  A side -
  (qemu) migrate -d tcp:10.66.9.103:1111# VM is stopped due to disk write error: virtio0: No space left on device

 (qemu) migration_notify_done
 
  B side -
  check the vm status,if the VM is paused,please increase the lvm size and then continue vm for the next migration

  
Actual results:
After src side finished the migration,dst side vm quitted automatically with the following message -
(qemu) # migration: migration process finished
raw_pread: read beyond end of file

Expected results:The whole migration process is smoothly and vm works correctly.

  
Additional info:
Host AMD
model name	: AMD Phenom(tm) 9600B Quad-Core Processor
stepping	: 3
cpu MHz		: 1200.000