Unable to move a Virtual Machine in Cloud Director - A specified parameter was not correct: relocateSpec.profile
search cancel

Unable to move a Virtual Machine in Cloud Director - A specified parameter was not correct: relocateSpec.profile

book

Article ID: 370136

calendar_today

Updated On:

Products

VMware Cloud Director

Issue/Introduction

Moving a Virtual Machine(VM) from NSX-V to NSX-T backed Organization Virtual Data Center (OrgVDC) fails with an Internal Server Error - A specified parameter was not correct: relocateSpec.profile.

Error such as following can be noticed in VMware Cloud Director (VCD) vcloud-container-debug.log-

| ERROR    | Backend-activity-pool-### | MoveVAppActivity               | [Activity Execution] Linking VMs to generated vApp failed - Handle: urn:uuid:<handle uuid>, Current Phase: MoveVAppActivity$UndeployOriginalVAppPhase | requestId=<request id>,request=POST https://example.com/api/vdc/<org vdc id>/action/moveVApp,requestTime=<time>,remoteAddress=#.#.#.#:###,userAgent=python-requests/2.26.0,accept=application/*;version 37.1 vcd=<vcd id>,task=<task id> activity=(com.vmware.vcloud.backendbase.management.system.TaskActivity,urn:uuid:<task id>) activity=(com.vmware.vcloud.vdc.impl.MoveVAppActivity,urn:uuid:<activity id>)
java.util.concurrent.ExecutionException: com.vmware.vcloud.vdc.impl.LinkVMsToTargetVAppActivity$LinkVMsToVAppException: VM <vm name> (<vm id>) failed to update and has been rolled back. null Task failed, vc-id={<vc id>}, task-moref={ManagedObjectReference: type = Task, value = task-###, serverGuid = null}, error={A specified parameter was not correct: relocateSpec.profile}
        at com.vmware.vcloud.activity.toolkit.AbstractToolkitActivity$BasePhase.finish(AbstractToolkitActivity.java:196)
        at com.vmware.vcloud.vdc.impl.LinkVMsToTargetVAppActivity$CleanupAutoManagedVAppsPhase.invoke(LinkVMsToTargetVAppActivity.java:756)

Caused by: com.vmware.vcloud.vdc.impl.LinkVMsToTargetVAppActivity$LinkVMsToVAppException: VM <vm name> (<vm id>) failed to update and has been rolled back. null Task failed, vc-id={<vc id>}, task-moref={ManagedObjectReference: type = Task, value = task-###, serverGuid = null}, error={A specified parameter was not correct: relocateSpec.profile}

Environment

VMware Cloud Director
VMware vCenter 

Cause

This Issue happens when the VM Home Policy or the Hard Disk Policy on the concerned VM is set to either None or Datastore Default in vCenter and does not match the Storage Policy set on the VM in VCD.

Resolution

To resolve the Issue change the VM Home/Hard Disk Policy in vCenter to match the Storage Policy from the VCD side.

Go to VM in vCenter > Configure > Policies > Set the VM Home /Hard Disk Policy to match the VCD Storage Policy on the VM.

Additional Information