Hi, /var/log/libvirt/qemu/lol.log didn't look very informative about the migration error, so I edited /etc/libvirt/libvirtd.conf and add the log lines.<br><br>Before trying to migrate the VM, I remembered that the /etc/hosts was configured, but iptables was probably running, because I rebooted these machines like 10 times since yesterday. So I stoped both iptables services, tryed to migrate the VM using virt-manager and (OMG what a <b>beaultiful</b> moment!!!) and it migrated in like 1 second!!!!!11!1!eleven!!!!! (no OS running, just the VM powered on, probably 0MB of RAM being used).<br>


<br>I started iptables in source machine, and migration worked again. When I started iptables in destination computer, migration failed like I was used to see. Opening libvirtd.log and looking for "migrat", i found this: <br>

<br>Ocurrences to "migrat" in libvirtd.log: <br><br><blockquote style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;" class="gmail_quote">11:23:22.912: error : qemuDomainMigrateSetMaxDowntime:11781 : invalid argument in qemuDomainMigrateSetMaxDowntime: unsupported flags (0xbc614e)<br>

11:23:22.917: error : qemuDomainMigrateSetMaxDowntime:11781 : invalid argument in qemuDomainMigrateSetMaxDowntime: unsupported flags (0xbc614e)<br>11:23:23.049: debug : qemuMonitorGetBalloonInfo:1001 : mon=0x7f266c000ef0<br>

11:23:23.049: debug : qemuMonitorCommandWithHandler:231 : Send command 'info balloon' for write with FD -1<br>11:23:23.050: debug : qemuMonitorCommandWithHandler:236 : Receive command reply ret=0 errno=0 21 bytes 'balloon: actual=300<br>

<br>11:23:24.513: debug : qemuMonitorMigrateToHost:1312 : mon=0x7f266c000ef0 hostname=cluster.pisolar port=49160 flags=1<br>11:23:24.513: debug : qemuMonitorCommandWithHandler:231 : Send command 'migrate  -d"tcp:cluster.pisolar:49160"' for write with FD -1<br>

11:23:24.514: debug : qemuMonitorCommandWithHandler:236 : Receive command reply ret=0 errno=0 0 bytes '(null)'<br>11:23:24.514: debug : qemuMonitorGetMigrationStatus:1283 : mon=0x7f266c000ef0<br>11:23:24.514: debug : qemuMonitorCommandWithHandler:231 : Send command 'info migrate' for write with FD -1<br>

11:23:24.515: debug : qemuMonitorCommandWithHandler:236 : Receive command reply ret=0 errno=0 26 bytes 'Migration status: failed<br><br>11:23:24.515: error : qemuDomainWaitForMigrationComplete:5119 : operation failed: Migration unexpectedly failed<br>

11:23:25.028: debug : qemuMonitorGetBalloonInfo:1001 : mon=0x7f266c000ef0<br>11:23:25.028: debug : qemuMonitorCommandWithHandler:231 : Send command 'info balloon' for write with FD -1<br>11:23:25.028: debug : qemuMonitorCommandWithHandler:236 : Receive command reply ret=0 errno=0 21 bytes 'balloon: actual=300<br>

</blockquote><br><br>qemu/lol.log, the log file for the machine, only has lines with the VM configuration wrote, I think a new line like this is written into this file everytime I run the VM. An example line: <br><br><blockquote style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;" class="gmail_quote">

LC_ALL=C PATH=/sbin:/usr/sbin:/bin:/usr/bin QEMU_AUDIO_DRV=none /usr/bin/qemu-kvm -S -M pc-0.13 -enable-kvm -m 300 -smp 1,sockets=1,cores=1,threads=1 -name lol -uuid eb66789f-20d6-d1c2-f9dc-6a33c62e10a8 -nodefconfig -nodefaults -chardev socket,id=monitor,path=/var/lib/libvirt/qemu/lol.monitor,server,nowait -mon chardev=monitor,mode=readline -rtc base=utc -boot c -drive file=/media/nfs067/lol.img,if=none,id=drive-ide0-0-0,boot=on,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 -device rtl8139,vlan=0,id=net0,mac=52:54:00:5e:36:b0,bus=pci.0,addr=0x3 -net tap,fd=37,vlan=0,name=hostnet0 -chardev pty,id=serial0 -device isa-serial,chardev=serial0 -usb -vnc <a href="http://127.0.0.1:0">127.0.0.1:0</a> -vga cirrus -device AC97,id=sound0,bus=pci.0,addr=0x4 -incoming exec:cat -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x5 <br>

char device redirected to /dev/pts/1<br></blockquote><br>I opened tcp port 49160 in destination machine, tried to migrate the VM, and the log pointed a problem with port 49161. So I opened it and tryed again, and log said I had some problem with 49162. So I opened 49160:49168 tcp ports, and migration worked with both iptables services running. Cool! <br>

<br>Does anyone knows the exact number of necessary ports? <br><br><br>I'm going to try to migrate real VMs now, form different folders, and with virsh too. 'Will try virsh migrate --live --p2p --tunnelled lol qemu+ssh://root@cluster.pisolar/system too, of course.<br>

<br>Thank you all guys very much, and again sorry if my english isn't easy and clear to understand. =D<br><br><br><br><br><br><div class="gmail_quote">On Thu, Feb 3, 2011 at 9:25 AM, Justin Clift <span dir="ltr"><<a href="mailto:jclift@redhat.com" target="_blank">jclift@redhat.com</a>></span> wrote:<br>


<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">On 03/02/2011, at 10:48 PM, Bruno Lamps wrote:<br>
<snip><br>
<div>> Trying to use virsh, I get this answer:<br>
><br>
> [root@fedorao ~]# virsh migrate --live lol qemu+ssh://<a href="http://192.168.1.4/system" target="_blank">192.168.1.4/system</a><br>
> <a href="mailto:root@192.168.1.4" target="_blank">root@192.168.1.4</a>'s password:<br>
> erro:operation failed: Migration unexpectedly failed<br>
<br>
</div>Hmmm, just in the category of "see what happens", give this a go and see<br>
if it makes any difference at all (prob not):<br>
<br>
  $ virsh migrate --live --p2p --tunnelled lol qemu+ssh://root@cluster.pisolar/system<br>
<br>
<br>
</blockquote></div><br>