Disk-only migration may fail when VM namespace folder (VMHome) and disks are already located across multiple datastores
search cancel

Disk-only migration may fail when VM namespace folder (VMHome) and disks are already located across multiple datastores

book

Article ID: 317718

calendar_today

Updated On:

Products

VMware vCenter Server

Issue/Introduction

This KB addresses issue of Disk-only migration that may fail when the VM namespace folder (VMHome) and disks are stored across multiple datastores.

Symptoms:
This issue was reproducible  in vCenter 7.0.2.1 and previous releases with the following steps:
1. Created VM with 3 disks on vSAN datastore with user created vSAN policy - policy1
2. Migrated disk1 to NFS datastore with datastore default policy - PASS
3. Migrated disk2 to NFS datastore with datastore default policy - FAILED
 
While the above example use these storage types, this issue is not vSAN nor NFS specific, this issue has also been observed on other datastore types (e.g. VMFS).
 

Cause

When disks and VM namespace folder (VMHome) are placed in different datastores, fetchComplianceResult/fetchRollUpComplianceResult might not return compliance data due to an known issue. Since profile set in relocateSpec is based on fetchComplianceResult result, relocateSpec is constructed with incorrect profile set to perform migration, due to which, disk only migration fails with "A specified parameter was not correct: relocateSpec.profile" error message.
 
Also note that if no ComplianceResult is returned, you might see unexpected policy for VM/disks in UI.

Resolution

The issue is resolved in vCenter Server 7.0 Update 3d (build number 19480866)

Workaround:
Scenario:
  • A VM has the following objects: VMHome, disk1, disk2, disk3
  • VMHome, disk2, disk3 are associated with vSAN Policy1 and reside on vsanDatastore
  • Disk1 has already been migrated to a NFS datastore with datastore default policy
When trying to migrate disk2 to the NFS datastore with datastore default policy - this may fail.
              
To work around this issue, follow these steps while migrating disk2 to the NFS datastore:
  1. Ensure that the VM configuration folder (VMHome) is pointing to the appropriate vSAN policy (Policy1) and not the default datastore policy of NFS under "VM Storage Policy" for all disks.
  2. If the VM configuration folder policy has changed to the default policy after the successful migration of disk1, change it back to the vSAN policy (Policy1) before continuing.
  3. Configure Per Disk settings for disk2:
    • Select disk2 and configure its storage and policy like before (NFS datastore with datastore default policy).
  4. Change the VM Storage Policy for VMHome (Configuration file):
    • Select VMHome -> Configure -> Select Policy1 (i.e., desired vSAN policy for VMHome) as VM Storage Policy (Do not change datastore) -> Confirm.
  5. Continue with the migration of disk2 to the NFS datastore.


Additional Information

Impact/Risks:
Disk-only migration may fail when VM namespace folder (VMHome) and disks are stored across multiple datastores.

Due to the nature of internal code, this issue may not be consistently reproducible.