Bug 699608

Summary: Migration will fail if do not open 40000-50000 ports manually on iptable
Product: Red Hat Enterprise Linux 6 Reporter: weizhang <weizhan>
Component: libvirtAssignee: Libvirt Maintainers <libvirt-maint>
Status: CLOSED NOTABUG QA Contact: Virtualization Bugs <virt-bugs>
Severity: high Docs Contact:
Priority: high    
Version: 6.1CC: ccui, clalance, dallan, dyuan, gren, llim, mzhan, yoyzhang
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-04-27 04:03:46 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 weizhang 2011-04-26 07:32:23 UTC
Description of problem:
When do migration, if I do not open 40000-50000 port on iptable, migration will fail with an error: operation failed: migration job: unexpectedly failed

Version-Release number of selected component (if applicable):
qemu-kvm-0.12.1.2-2.156.el6.x86_64
libvirt-0.8.7-17.el6.x86_64
kernel-2.6.32-130.el6.x86_64


How reproducible:
100%

Steps to Reproduce:
1. prepare 2 machines and make sure selinux is enforcing and itables is running
2. run # service libvirtd restart
on both sides
3. run # setsebool virt_use_nfs 1
on both sides 
4. run #mount 10.66.90.121:/vol/S3/libvirtauto /mnt/ 
on both sides
5. define and start a domain which using the img on /mnt
6. do migration with 
# virsh migrate --live domain_name qemu+ssh://{dest ip}/system
  
Actual results:
error: operation failed: migration job: unexpectedly failed

Expected results:
succeed with no error

Additional info:
if I add 1 rule on /etc/sysconfig/iptables with
"-A INPUT -p tcp -m multiport --dports 40000:50000 -j ACCEPT" and restart iptables and libvirtd, then do migration will succeed.

Comment 1 Chris Lalancette 2011-04-26 12:12:06 UTC
Hm, is there a specific question?  This is indeed the case, and is one of the downsides of the libvirt migration code.

The good news is that this limitation is removed when using tunneled migration, and tunneled migration has other benefits.  I think this should just be a release note.

Chris Lalancette

Comment 3 Dave Allan 2011-04-27 04:03:46 UTC
You must open the correct ports with iptables for non-tunneled migration to succeed.  There is a separate BZ open to provide a better error message in the case of migration failure, so I'm just closing this one as not a bug.