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
Commit 89dbd1e
Browse filesBrowse the repository at this point in the historyBrowse files
CLOUDSTACK-8318. Storage vMotion support for VMFS.
MigrateVMWithVolumes-
1. If ESXi host version is below 5.1, ensure destination datastore(s) is mounted on the source host, then migrate the storage and then finally migrate the VM.
If destination storage(s) is not mounted on the source host,
- In case of NFS storage mount the storage(s).
- In case of VMFS storage fail the request for migration.
2. If EXi host version is 5.1 or above, simultaneously migrate the VM and its storage to the destination host and storage(s) respectively for both NFS and VMFS storage.
(cherry picked from commit adc836c)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
// If datastore is VMFS and target datastore is not mounted or accessible to source host then fail migration.
3106
+
if (filerTo.getType().equals(StoragePoolType.VMFS)) {
3107
+
if (morDsAtSource == null) {
3108
+
s_logger.warn("If host version is below 5.1, then target VMFS datastore(s) need to manually mounted on source host for a successful live storage migration.");
3109
+
thrownewException("Target VMFS datastore: " + tgtDsPath + " is not mounted on source host: " + _hostName);
s_logger.warn("If host version is below 5.1, then target VMFS datastore(s) need to accessible to source host for a successful live storage migration.");
3115
+
thrownewException("Target VMFS datastore: " + tgtDsPath + " is not accessible on source host: " + _hostName);
s_logger.warn("VM disk consolidation failed after storage migration. Yet proceeding with VM migration.");
3146
-
} else {
3147
-
s_logger.debug("Successfully consolidated disks of VM " + vmName + ".");
3148
-
}
3183
+
// In case of a linked clone VM, if VM's disks are not consolidated, further VM operations such as volume snapshot, VM snapshot etc. will result in DB inconsistencies.
3184
+
if (!vmMo.consolidateVmDisks()) {
3185
+
s_logger.warn("VM disk consolidation failed after storage migration. Yet proceeding with VM migration.");
3186
+
} else {
3187
+
s_logger.debug("Successfully consolidated disks of VM " + vmName + ".");
3149
3188
}
3150
3189
3151
3190
// Update and return volume path for every disk because that could have changed after migration
0 commit comments