<div class="vbclean_msgtext" id="post_message_10776461">Hi everyone:<br>
<br>
I am new here <img src="http://ubuntuforums.org/images/smilies/icon_biggrin.gif" alt="" title="Very Happy" class="inlineimg" border="0"><br>
<br>
I am using kvm and libvirt on my Dell server. Now i am trying to migrate
 one virtual machine from a physical server to another. However, I 
failed everytime. <br>
<br>
In virsh on physicalServer1, I typed:<blockquote> virsh #  migrate virtualmachine1 qemu+ssh://username@physicalServer2/system<br>
error: operation failed: migration to 'tcp: physicalServer2:49163' failed: migration failed<br>
</blockquote>Then I searched FAQ part on <a href="http://libvirt.org">libvirt.org</a> <a href="http://wiki.libvirt.org/page/FAQ" target="_blank">http://wiki.libvirt.org/page/FAQ</a><br>
it says:<blockquote><b> error: operation failed: migration to '...' failed: migration failed </b><br>
<br>
 This is an error often encountered when trying to migrate with  QEMU/KVM. <font color="Red">This typically happens with plain migration, when the source  VM cannot connect to the destination host</font>. You will want to make sure  your hosts are properly configured for migration (see the migration  section of this FAQ) <br>

<br>
<br>
<br>
</blockquote>I managed to ssh physicalServer2 in virtualmachine1 shell. So the above red part did not explain my failure. <br>
<br>
I also open ports on physicalServer2, iptables -L shows following information:<blockquote>Chain INPUT (policy ACCEPT)<br>
target     prot opt source               destination         <br>
ACCEPT     udp  --  anywhere             anywhere            udp dpt:domain <br>
ACCEPT     tcp  --  anywhere             anywhere            tcp dpt:domain <br>
 ACCEPT     udp  --  anywhere             anywhere            udp dpt:bootps <br>
ACCEPT     tcp  --  anywhere             anywhere            tcp dpt:bootps <br>
ACCEPT     udp  --  anywhere             anywhere            udp dpt:domain <br>
 ACCEPT     tcp  --  anywhere             anywhere            tcp dpt:domain <br>
ACCEPT     udp  --  anywhere             anywhere            udp dpt:bootps <br>
ACCEPT     tcp  --  anywhere             anywhere            tcp dpt:bootps <br>
 <font color="Red">ACCEPT     tcp  --  anywhere             anywhere            state NEW tcp dpts:49152:49215</font> <br>
<br>
<br>
Chain FORWARD (policy ACCEPT)<br>
target     prot opt source               destination         <br>
 ACCEPT     all  --  anywhere             <a href="http://192.168.122.0/24" target="_blank">192.168.122.0/24</a>    state RELATED,ESTABLISHED <br>
ACCEPT     all  --  <a href="http://192.168.122.0/24" target="_blank">192.168.122.0/24</a>     anywhere            <br>
 ACCEPT     all  --  anywhere             anywhere            <br>
REJECT     all  --  anywhere             anywhere            reject-with icmp-port-unreachable <br>
REJECT     all  --  anywhere             anywhere            reject-with icmp-port-unreachable <br>
 ACCEPT     all  --  anywhere             <a href="http://192.168.122.0/24" target="_blank">192.168.122.0/24</a>    state RELATED,ESTABLISHED <br>
ACCEPT     all  --  <a href="http://192.168.122.0/24" target="_blank">192.168.122.0/24</a>     anywhere            <br>
 ACCEPT     all  --  anywhere             anywhere            <br>
REJECT     all  --  anywhere             anywhere            reject-with icmp-port-unreachable <br>
REJECT     all  --  anywhere             anywhere            reject-with icmp-port-unreachable <br>
 <br>
<br>
Chain OUTPUT (policy ACCEPT)<br>
target     prot opt source               destination <br>
<br>
<br>
</blockquote>The /var/log/libvirt/qemu/virtualmachine1.log on physicalServer2:<blockquote>2011-05-06 13:37:30.708: starting up<br>
LC_ALL=C 
PATH=/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/sbin:/sbin:/bin  
QEMU_AUDIO_DRV=none /usr/bin/kvm -S -M pc-0.14 -enable-kvm -m 2048 -smp 
 1,sockets=1,cores=1,threads=1 -name openjudge-test -uuid  
a8c704bc-a4f9-90db-3e57-40e60b00aac1 -nodefconfig -nodefaults -chardev 
socket,id=charmonitor,path=/var/lib/libvirt/qemu/virtualmachine1.monitor,server,nowait
 -mon chardev=charmonitor,id=monitor,mode=readline -rtc base=utc -boot c
 -drive 
file=/media/nfs/virtualmachine1.img,if=none,id=drive-ide0-0-0,format=raw
 -device ide-drive,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0 
-drive if=none,media=cdrom,id=drive-ide0-1-0,readonly=on,format=raw 
-device ide-drive,bus=ide.1,unit=0,drive=drive-ide0-1-0,id=ide0-1-0 
-netdev tap,fd=20,id=hostnet0 -device 
rtl8139,netdev=hostnet0,id=net0,mac=00:16:36:8a:22  
:a0,bus=pci.0,addr=0x3 -chardev pty,id=charserial0 -device 
isa-serial,chardev=charserial0,id=serial0 -usb -vnc <a href="http://127.0.0.1:2/" target="_blank">127.0.0.1:2</a> -vga cirrus -incoming tcp:<a href="http://0.0.0.0:49163/" target="_blank">0.0.0.0:49163</a> -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x4<br>

 char device redirected to /dev/pts/0<br>
2011-05-06 13:37:30.915: shutting down<br>
<br>
<br>
</blockquote>The /var/log/libvirt/qemu/virtualmachine1.log on physicalServer1 is empty.<br>
<br>
Both physical servers are using Ubuntu 11.04. The libvirt and kvm used are installed by apt-get. The libvirt version is 0.8.8.<br>
<br>
Is there anyone can help me? Thanks for help!<img src="http://ubuntuforums.org/images/smilies/icon_razz.gif" alt="" title="Capital Razz" class="inlineimg" border="0"><img src="http://ubuntuforums.org/images/smilies/icon_razz.gif" alt="" title="Capital Razz" class="inlineimg" border="0"><img src="http://ubuntuforums.org/images/smilies/icon_razz.gif" alt="" title="Capital Razz" class="inlineimg" border="0"></div>
<br clear="all"><br>-- <br>Best wishes,<div>-Panda</div><br>