You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Fail to do a Live Migration with storage via migrateVirtualMachineWithVolume API. #4183
(KVM) If the VM’s storage has to be migrated along with the VM, from a mounted NFS storage pool to a cluster-wide mounted NFS storage pool, then the ‘migrateVirtualMachineWithVolume’ API has to be used. There is no UI integration for this feature.
But I still fails.
STEPS TO REPRODUCE
1.install the CloudStack Monkey setup password, apikey, secretkey, and do sync.
2.use the command it says
migrate virtualmachinewithvolume virtualmachineid=<virtual machine uuid> hostid=<destination host uuid> migrateto[i].volume=<virtual machine volume number i uuid> migrateto[i].pool=<destination storage pool uuid for volume number i>
I do a test to Migrate a running ubuntu VM from Host 1&Storage 1 to Host 2&Storage 2.
Here's my info:
My ubuntu VM UUID : 1adf846d-2410-421f-9232-7148b68fe7cf
My ubuntu VM Volume UUID: 79aeeed9-0e34-4415-ad68-a515477b96e4
My ubuntu VM Volume device ID: 0
@rhtyd @fuchanghao I have never tried such a migration.
I know that the command works fine when migrating from local storage on KVM host A to local storage on KVM host B. Example of the command to migrate from one host to another: migrate virtualmachinewithvolume virtualmachineid=<VM-uuid> hostid=<target-host-B-uuid>.
However, I did not test migrating among two KVM hosts and different NFS storages at the same time. I would need to set a test scenario to check this.
@fuchanghao could you please share the log on the management node related to the error stack?
@rhtyd @fuchanghao I have never tried such a migration.
I know that the command works fine when migrating from local storage on KVM host A to local storage on KVM host B. Example of the command to migrate from one host to another: migrate virtualmachinewithvolume virtualmachineid=<VM-uuid> hostid=<target-host-B-uuid>.
However, I did not test migrating among two KVM hosts and different NFS storages at the same time. I would need to set a test scenario to check this.
@fuchanghao could you please share the log on the management node related to the error stack?
I have tried oVirt in a simular way these days.
And oVirt can migrate storage with VM on.(At least works with 2 NFS) And I can migrate storage with Web-UI on oVirt.
To the best of my knowlegde, this has never worked with KVM in general, except in a 2 cases:
what @GabrielBrascher shared, and is a special case from local storage to local storage
from Ceph/NFS to SolidFire specifically
For both to happen, the qemu must support live storage migration, which means using Ubuntu hosts (they do support it), or CentOS 7 with qemu-kvm-ev packages from the oVirt repo (RedHat removed support for live storage migration after CentOS 6, so in CentOS 7 that doesn't work with default qemu-kvm, nor with the qemu-kvm-ev from the special SIG repo) - thank you redhat for revoking a feature for $$$ reasons.
Read my last comment - only CEPH/NFS --> SolidFire worked
localstorage: Also VM with ROOT volume only, can be migrated to another host (with local storage)
Other cases (NFS to NFS, or NFS to local, or NFS to Ceph etc, etc, etc) - were never implemented, but there is a framework for this in case someone has time/will/$$$ to do it.
@andrijapanicsb I had, but you were missing one case. Please check this PR: #2983 working under special circumstances for CentOS7 as explained in the PR description, it was originally working on CentOS 6
From the PR description:
To use this feature set the storage_motion_supported=1 in the hypervisor_capability table for KVM. This is done by default as the feature may not work in some environments, read below.
This feature of online storage+VM migration for KVM will only work with CentOS6 and possible Ubuntu as KVM hosts but not with CentOS7 due to:
Activity
yadvr commentedon Jun 28, 2020
@fuchanghao are the hosts within the same cluster and are both storages in zone-wide scope, or cluster-scope (but within same cluster then?)
fuchanghao commentedon Jun 29, 2020
Hosts & Storages all in the same cluster and same zone, both storages scope are "CLUSTER".
Host 1&Primary Storage 1 on machine 1 and Host 2&Primary Storage 2 on machine 2.
yadvr commentedon Jul 8, 2020
ping @GabrielBrascher @wido any thoughts?
GabrielBrascher commentedon Jul 13, 2020
@rhtyd @fuchanghao I have never tried such a migration.
I know that the command works fine when migrating from local storage on KVM host A to local storage on KVM host B. Example of the command to migrate from one host to another:
migrate virtualmachinewithvolume virtualmachineid=<VM-uuid> hostid=<target-host-B-uuid>.However, I did not test migrating among two KVM hosts and different NFS storages at the same time. I would need to set a test scenario to check this.
@fuchanghao could you please share the log on the management node related to the error stack?
fuchanghao commentedon Jul 13, 2020
I have tried oVirt in a simular way these days.
And oVirt can migrate storage with VM on.(At least works with 2 NFS) And I can migrate storage with Web-UI on oVirt.
yadvr commentedon Aug 5, 2020
With @Spaceman1984 cc @DaanHoogland @borisstoyanov - triaging error against 4.14.0.0 and Darrin will explore a fix. Thanks.
andrijapanicsb commentedon Aug 5, 2020
To the best of my knowlegde, this has never worked with KVM in general, except in a 2 cases:
For both to happen, the qemu must support live storage migration, which means using Ubuntu hosts (they do support it), or CentOS 7 with qemu-kvm-ev packages from the oVirt repo (RedHat removed support for live storage migration after CentOS 6, so in CentOS 7 that doesn't work with default qemu-kvm, nor with the qemu-kvm-ev from the special SIG repo) - thank you redhat for revoking a feature for $$$ reasons.
DaanHoogland commentedon Aug 5, 2020
ok on no objections I'll remove the 4.15 milestone on this (given that @Spaceman1984 is dealing with a better error reporting than NPE, in some cases)
nvazquez commentedon Aug 5, 2021
@fuchanghao can you post the error you get from the management server logs and/or the KVM agent?
andrijapanicsb commentedon Aug 5, 2021
Read my last comment - only CEPH/NFS --> SolidFire worked
localstorage: Also VM with ROOT volume only, can be migrated to another host (with local storage)
Other cases (NFS to NFS, or NFS to local, or NFS to Ceph etc, etc, etc) - were never implemented, but there is a framework for this in case someone has time/will/$$$ to do it.
nvazquez commentedon Aug 5, 2021
@andrijapanicsb I had, but you were missing one case. Please check this PR: #2983 working under special circumstances for CentOS7 as explained in the PR description, it was originally working on CentOS 6
From the PR description:
storage_motion_supported=1in the hypervisor_capability table for KVM. This is done by default as the feature may not work in some environments, read below.On CentOS7 the error we see is:
" error: unable to execute QEMU command 'migrate': this feature or command is not currently supported"(reference https://ask.openstack.org/en/question/94186/live-migration-unable-to-execute-qemu-command-migrate/). Reading through various lists looks like the migrate feature with qemu may be available with paid versions of RHEL-EV but not centos7 however this works with CentOS6.Fix for CentOS 7:
yum install qemu-kvm-common-ev-2.3.0-29.1.el7.x86_64 qemu-kvm-ev-2.3.0-29.1.el7.x86_64 qemu-img-ev-2.3.0-29.1.el7.x86_64andrijapanicsb commentedon Aug 5, 2021
um, apologies, was not aware of that!... ok, going back to cave now...
yadvr commentedon Aug 9, 2021
@GabrielBrascher does your PR/blocker fixes this issue?
yadvr commentedon Aug 9, 2021
Oh wait nevermind, is that the qemu-kvm vs qemu-kvm-ev limitation on El7?
nvazquez commentedon Aug 10, 2021
Yes @rhtyd - the workaround mentioned above was tested fine when the feature was introduced