2011/10/28 Eric Blake <eblake@redhat.com>
On 10/27/2011 09:37 PM, Luengffy XUE wrote:
command:

virsh migrate --live --copy-storage-all vm
qemu+ssh://destinationHost/system

error
: unexpected failure

PS  log file in the jpg

Your jpg takes up a lot of bandwidth; it would be more efficient if you copy and paste the text from your console, rather than a screenshot of the console.

 
I appologize for this. I ca paste the text version.
In the destinaiton host's   /var/log/libvirt/qemu/vm.log
It is described as:
 
2011-10-28 11:29:31.715: starting up
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 512 -smp 1,sockets=1,cores=1,threads=1 -name VCentOS -uuid f4dcf69e-5c23-a4bd-0262-0fee80b2bba6 -nodefconfig -nodefaults -chardev socket,id=charmonitor,path=/var/lib/libvirt/qemu/VCentOS.monitor,server,nowait -mon chardev=charmonitor,id=monitor,mode=readline -rtc base=utc -boot c -drive file=/var/lib/libvirt/images/CentOS.qcow2,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=19,id=hostnet0 -device rtl8139,netdev=hostnet0,id=net0,mac=52:54:00:f6:2b:3a,bus=pci.0,addr=0x3 -chardev pty,id=charserial0 -device isa-serial,chardev=charserial0,id=serial0 -usb -vnc 127.0.0.1:0 -vga cirrus -incoming tcp:0.0.0.0:49170 -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x4
char device redirected to /dev/pts/1
Receiving block device images
Completed 0 %
qemu: warning: error while loading state section id 2
load of migration failed
2011-10-28 11:29:32.401: shutting down
 
 
 
 
 
As to the actual error, I'm not sure if I can offer advice until I try to reproduce it, but I do know that --copy-storage-all hasn't received as much testing.  Make sure that an empty file exists on the destination prior to the migration attempt, in case the error is stemming from qemu on the destination unable to open the file with SELinux permissions in force.

 
I  have created the right image file on the destination host.I have already reardown the apparmor. I want to know how to shut down the selinux on the ubuntu server.
 
 
 
 
 
Also, what version of libvirt are you using?  Newer libvirt tries harder to avoid the lame error messages from qemu being unable to start a migration without giving any reasons why.

 
 
The version of libvit I am using is:
 
Compiled against library  :  libvir 0.8.8
Using library:      libvir  0.8.8
Using API :  QEMU 0.8.8
Runing hypervisor: QEMU 0.14.0
 
 
--
Eric Blake   eblake@redhat.com    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

 
Regards  
Leungffy