-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Closed
Description
ISSUE TYPE
- Bug Report
COMPONENT NAME
API
CLOUDSTACK VERSION
4.16
CONFIGURATION
- KVM
- Root disk on Local storage
- DataDisk allocated on any shared storage (tested on NFS, RBD)
OS / ENVIRONMENT
SUMMARY
When migrating a VM with root disk in local storage + datadisk (always shared) it fails.
There are two ways of performing such a migration via the migrateVirtualMachineWithVolume.
migrate virtualmachinewithvolume virtualmachineid=<VM_ID> hostid=<HOST_ID>migrate virtualmachinewithvolume virtualmachineid=<VM_ID> hostid=<HOST_ID> migrateto[0].volume=<VOLUME_ID> migrateto[0].pool=<POOL_ID>
In the first case, the execution flow has no mapped volumes; however, it assumes that all the volumes on the VM should be migrated and maps such migrations. Causing exception during migration as the data disk has the wrong map.
In the second scenario, CloudStack holds the provided map of volume -> storages but at the end, it turns out to try to migrate all the volumes ignoring the provided map.
STEPS TO REPRODUCE
Migrate a VM with at least 1 Datadisk and its Root disk allocated in local storage.
EXPECTED RESULTS
VM is live-migrated along with its Root disk to another host (& respective local storage pool) in the same cluster
ACTUAL RESULTS
Fails to migrate VM