Error: "The operation could not be performed because the argument is invalid. A specified parameter was not correct: relocateSpec.profile" while changing a Virtual Machine's hard disk Storage policy
search cancel

Error: "The operation could not be performed because the argument is invalid. A specified parameter was not correct: relocateSpec.profile" while changing a Virtual Machine's hard disk Storage policy

book

Article ID: 447423

calendar_today

Updated On:

Products

VMware Cloud Director

Issue/Introduction

  • When changing the storage policy on a VM hard disk from non-vSAN to vSAN-based, you encounter the following error:

    The operation could not be performed because the argument is invalid. A specified parameter was not correct: relocateSpec.profile

  • In /opt/vmware/vcloud-director/logs/vcloud-container-debug.log we can see the following error:

    ERROR    | storage-fabric-activity-pool-32658 | FutureUtil                     | VM relocation for VM [vcId=########-####-####-############, moref=vm-####] failed. | requestId
    =########-####-####-############,request=POST https://<VCD-fqdn>/api/vApp/vm-########-####-####-############/action/reconfigureVm,requestTime=#############,remoteAddress=<IP address>,userAgent=<agent> (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 ...,accept=application/*+xml;version 40.0.0-alpha vcd=########-####-####-############,task=########-####-####-############ activity=(com.vmware.vcloud.backendbase.management.system.TaskActivity,urn:uuid:########-####-####-############) activity=(com.vmware.ssdc.backend.services.impl.RelocateVmActivity,urn:uuid:########-####-####-############) activity=(com.vmware.vcloud.fabric.storage.storedVm.impl.RelocateStoredVmByStorageClassActivity,urn:uuid:########-####-####-############) activity=(com.vmware.vcloud.fabric.storage.storedVm.impl.RelocateStoredVmByDatastoreActivity,urn:uuid:########-####-####-############)
    com.vmware.ssdc.util.RelocateException: Unable to relocate VM.
            at com.vmware.vcloud.val.internal.impl.RelocateVmActivity$WaitForInventoryUpdatePhase.invoke(RelocateVmActivity.java:397)
    .
            at java.base/java.lang.Thread.run(Thread.java:829)
    Caused by: com.vmware.vcloud.val.exceptions.TaskManagerException: Task failed, vc-id={########-####-####-############}, task-moref={ManagedObjectReference: type = Task, value = task-#######, serverGuid =
     null}, error={A specified parameter was not correct: relocateSpec.profile}
            at com.vmware.vcloud.val.taskmanagement.AsynchronousTaskWaitActivity$InitialPhase.invoke(AsynchronousTaskWaitActivity.java:149)
            ... 7 more
    Caused by: com.vmware.ssdc.library.exceptions.VimInvalidArgumentException: The operation could not be performed because the argument is invalid. A specified parameter was not correct: relocateSpec.profile
     
            ... 7 more
    Caused by: (vmodl.fault.InvalidArgument) {
       faultCause = null,
       faultMessage = (vmodl.LocalizableMessage) [
          (vmodl.LocalizableMessage) {
             dynamicType = null,
             dynamicProperty = null,
             key = Only VM Home's profile is being changed but it's datastore or host is not being changed during relocate, so use reconfig instead,
             arg = null,
             message = Only VM Home's profile is being changed but it's datastore or host is not being changed during relocate, so use reconfig instead
          }
       ],
       invalidProperty = relocateSpec.profile
    }

Environment

VMware Cloud Director 10.6.1.2

Cause

This is a known issue in current VMware Cloud Director (VCD) releases.

Resolution

Workaround

Change the VM Storage Policy and storage policy on all attached hard disks to the vSAN based policy simultaneously. If required, revert the Home and respective hard disks back to the non-vSAN based policy.