[libvirt-users] Libvirt Live Migration

I'm trying to implement a virtualization API. I was testing migration with libvirt I got some problems. When I use the following command : *virsh migrate --live --persistent --copy-storage-all vm-clone1 qemu+ssh://server_ip/system* the migration works fine but in the destination host the migrated vm is paused and I can't unpause it and I need to reboot the vm to be able use it in the new host. When I try to unoause it Igot the following error message: << *Error unpausing domain: internal error: unable to execute QEMU command 'cont': Resetting the Virtual Machine is required *>> How can I solve this problem, or is there an other way to make a live migration with libvirt?? Thank you for you consideration. -- Best regards *Dhia Abbassi* Full Stack Engineer | Rosafi Holding <http://tn.linkedin.com/in/dhiaabbassi> <https://github.com/DhiaTN> <https://plus.google.com/u/0/+DhiaAbbassi> <https://twitter.com/DhiaTN>

[dropping libvir-list] On 20.11.2014 13:11, Dhia Abbassi wrote:
I'm trying to implement a virtualization API. I was testing migration with libvirt I got some problems.
When I use the following command :
*virsh migrate --live --persistent --copy-storage-all vm-clone1 qemu+ssh://server_ip/system* * * the migration works fine but in the destination host the migrated vm is paused and I can't unpause it and I need to reboot the vm to be able use it in the new host. When I try to unoause it Igot the following error message: << *Error unpausing domain: internal error: unable to execute QEMU command 'cont': Resetting the Virtual Machine is required *>>
How can I solve this problem, or is there an other way to make a live migration with libvirt??
Several things may be happening here, so I'll point just a few (unordered). 1) is there some storage shared between the two hosts? If so, is it accessible from the destination? 2) When doing storage migration, you still need to pre-create the files on destination yourself. Do they have the correct size? 3) The error message seems like a qemu bug to me. Have you tried it with recent qemu? Michal

Thanks for your answer, 1) In this case i'm not using shared storage, the migration is happening between two non-shared storage with full disk copy 2) I already created the file with same size, and the vm works properly after a restart, my problem that it remains paused and I can't resume it until it's rebooted. 3) I'm using qemu-kvm 1.0 On 24 November 2014 at 10:22, Michal Privoznik <mprivozn@redhat.com> wrote:
[dropping libvir-list]
On 20.11.2014 13:11, Dhia Abbassi wrote:
I'm trying to implement a virtualization API. I was testing migration with libvirt I got some problems.
When I use the following command :
*virsh migrate --live --persistent --copy-storage-all vm-clone1 qemu+ssh://server_ip/system* * * the migration works fine but in the destination host the migrated vm is paused and I can't unpause it and I need to reboot the vm to be able use it in the new host. When I try to unoause it Igot the following error message: << *Error unpausing domain: internal error: unable to execute QEMU command 'cont': Resetting the Virtual Machine is required *>>
How can I solve this problem, or is there an other way to make a live migration with libvirt??
Several things may be happening here, so I'll point just a few (unordered).
1) is there some storage shared between the two hosts? If so, is it accessible from the destination?
2) When doing storage migration, you still need to pre-create the files on destination yourself. Do they have the correct size?
3) The error message seems like a qemu bug to me. Have you tried it with recent qemu?
Michal

On 24.11.2014 11:23, Dhia Abbassi wrote:
Thanks for your answer,
1) In this case i'm not using shared storage, the migration is happening between two non-shared storage with full disk copy 2) I already created the file with same size, and the vm works properly after a restart, my problem that it remains paused and I can't resume it until it's rebooted. 3) I'm using qemu-kvm 1.0
This may be the root of problem. That's nearly 3 years old qemu. Michal

I will try a newer version. On 24 November 2014 at 11:30, Michal Privoznik <mprivozn@redhat.com> wrote:
On 24.11.2014 11:23, Dhia Abbassi wrote:
Thanks for your answer,
1) In this case i'm not using shared storage, the migration is happening between two non-shared storage with full disk copy 2) I already created the file with same size, and the vm works properly after a restart, my problem that it remains paused and I can't resume it until it's rebooted. 3) I'm using qemu-kvm 1.0
This may be the root of problem. That's nearly 3 years old qemu.
Michal

I tired to install newer version of qemu-kvm (2.1.0-2.9-x86_64) through rpms but the following rpms are not all available - qemu-2.1.0-2.9-x86_64.rpm - qemu-kvm-2.1.0-2.9-x86_64.rpm - qemu-common-2.1.0-2.9-x86_64.rpm - qemu-kvm-tools-2.1.0-2.9-x86_64.rpm - qemu-debuginfo-2.1.0-2.9-x86_64.rpm - qemu-system-x86-2.1.0-2.9-x86_64.rpm - qemu-guest-agent-2.1.0-2.9-x86_64.rpm - qemu-user-2.1.0-2.9-x86_64.rpm - qemu-img-2.1.0-2.9-x86_64.rpm So I changed from Centos 6.6 to Ubuntu 14.04 because the environment setup is much easier, some bugs had been fixed but the migration did not work at all and I got this error message "*error: internal error: unable to execute QEMU command 'drive-mirror*'*: Failed to connect to socket: Invalid argument*" I thought it's security issue so I disabled the SELINUX and I make some firwall configuration but the problem persist: << * sudo iptables -A INPUT -p tcp -m multiport --ports 16509 -m comment --comment "libvirt" -j ACCEPT* * sudo iptables -A INPUT -p tcp -m multiport --ports 49152:49216 -m comment --comment "migration" -j ACCEPT*
Have you any idea what is the reason behind this problem??
On 24 November 2014 at 11:32, Dhia Abbassi <dhia.absi@gmail.com> wrote:
I will try a newer version.
On 24 November 2014 at 11:30, Michal Privoznik <mprivozn@redhat.com> wrote:
On 24.11.2014 11:23, Dhia Abbassi wrote:
Thanks for your answer,
1) In this case i'm not using shared storage, the migration is happening between two non-shared storage with full disk copy 2) I already created the file with same size, and the vm works properly after a restart, my problem that it remains paused and I can't resume it until it's rebooted. 3) I'm using qemu-kvm 1.0
This may be the root of problem. That's nearly 3 years old qemu.
Michal

I installed CentOS 7 which supported by default a newer version of qemu-kvm (qemu-kvm-1.5.3-60.el7.x86_64.rpm) but this time I got new error: << error: internal error: unable to execute QEMU command 'migrate': this feature or command is not currently supported >> but it's kind of wired because qemu-kvm-1.0 supported already live migration, so a newer version should also support it. How can you explain this? What could be the source of error? On 1 December 2014 at 14:34, Dhia Abbassi <dhia.absi@gmail.com> wrote:
I tired to install newer version of qemu-kvm (2.1.0-2.9-x86_64) through rpms but the following rpms are not all available
- qemu-2.1.0-2.9-x86_64.rpm - qemu-kvm-2.1.0-2.9-x86_64.rpm - qemu-common-2.1.0-2.9-x86_64.rpm - qemu-kvm-tools-2.1.0-2.9-x86_64.rpm - qemu-debuginfo-2.1.0-2.9-x86_64.rpm - qemu-system-x86-2.1.0-2.9-x86_64.rpm - qemu-guest-agent-2.1.0-2.9-x86_64.rpm - qemu-user-2.1.0-2.9-x86_64.rpm - qemu-img-2.1.0-2.9-x86_64.rpm
So I changed from Centos 6.6 to Ubuntu 14.04 because the environment setup is much easier, some bugs had been fixed but the migration did not work at all and I got this error message "*error: internal error: unable to execute QEMU command 'drive-mirror*'*: Failed to connect to socket: Invalid argument*" I thought it's security issue so I disabled the SELINUX and I make some firwall configuration but the problem persist: <<
* sudo iptables -A INPUT -p tcp -m multiport --ports 16509 -m comment --comment "libvirt" -j ACCEPT* * sudo iptables -A INPUT -p tcp -m multiport --ports 49152:49216 -m comment --comment "migration" -j ACCEPT*
Have you any idea what is the reason behind this problem??
On 24 November 2014 at 11:32, Dhia Abbassi <dhia.absi@gmail.com> wrote:
I will try a newer version.
On 24 November 2014 at 11:30, Michal Privoznik <mprivozn@redhat.com> wrote:
On 24.11.2014 11:23, Dhia Abbassi wrote:
Thanks for your answer,
1) In this case i'm not using shared storage, the migration is happening between two non-shared storage with full disk copy 2) I already created the file with same size, and the vm works properly after a restart, my problem that it remains paused and I can't resume it until it's rebooted. 3) I'm using qemu-kvm 1.0
This may be the root of problem. That's nearly 3 years old qemu.
Michal

On 12/04/2014 10:12 AM, Dhia Abbassi wrote:
I installed CentOS 7 which supported by default a newer version of qemu-kvm (qemu-kvm-1.5.3-60.el7.x86_64.rpm) but this time I got new error: << error: internal error: unable to execute QEMU command 'migrate': this feature or command is not currently supported >>
but it's kind of wired because qemu-kvm-1.0 supported already live migration, so a newer version should also support it.
How can you explain this? What could be the source of error?
You probably want to use qemu-kvm-rhev instead of qemu-kvm. Quoting Paolo Bonzini's earlier mail (https://lists.gnu.org/archive/html/qemu-devel/2014-11/msg03379.html): Luckily, since you are using CentOS you do not really care about official Red Hat RPMs, and you can get the packages here: http://resources.ovirt.org/pub/ovirt-3.5/rpm/el7Server/ This yum repository file will help: [qemu-kvm-rhev] name=oVirt rebuilds of qemu-kvm-rhev baseurl=http://resources.ovirt.org/pub/ovirt-3.5/rpm/el7Server/ mirrorlist=http://resources.ovirt.org/pub/yum-repo/mirrorlist-ovirt-3.5-el7Server enabled=1 skip_if_unavailable=1 gpgcheck=0 Drop it in /etc/yum.repos.d/qemu-kvm-rhev.repo and install qemu-kvm-rhev with yum. All features will be available. It would be simpler to have a CentOS SIG build this, but it hasn't happened yet. -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
participants (3)
-
Dhia Abbassi
-
Eric Blake
-
Michal Privoznik