Symptoms:
- When attempting a failover, the vApp is created in Cloud Director but the import of the recovered virtual machine fails with the error:
The recovered VM could not be imported into vCloud Director. Apply a suitable storage profile to the replication and try again.
- The Reserve all guest memory(All locked) setting is enabled on one or more virtual machines in the item being failed over.
- In the /opt/vmware/h4/cloud/log/cloud.log file on the Cloud Replication Management Appliance, you see entries similar to:
2020-11-03 13:43:59.450 ERROR - [UI-####-####-####] [task-poller-4] com.vmware.h4.cloud.job.VmFailoverJob : com.vmware.ssdc.library.exceptions.VimInvalidArgumentException: The operation could not be performed because the argument is invalid. A specified parameter was not correct: spec.memoryAllocation.reservation
vCenter Server task (moref: task-####) failed in vCenter Server 'vCenter_Server_FQDN' (#####-####-#####).
2020-11-03 13:43:59.450 ERROR - [UI-####-####-####] [task-poller-4] com.vmware.h4.cloud.job.VmFailoverJob : [ UI-####-####-#### ] The operation could not be performed because the argument is invalid. A specified parameter was not correct: spec.memoryAllocation.reservation
2020-11-03 13:43:59.450 ERROR - [UI-####-####-####] [task-poller-4] com.vmware.h4.cloud.job.VmFailoverJob : Unable to import the recovered VC VM into a new vCD vApp
com.vmware.vcloud.client.exception.VcloudException: HTTP Response code: 500
...
- In the /opt/vmware/vcloud-director/logs/vcloud-container-debug.log file on the Cloud Director cell, you see entries similar to:
2020-11-03 10:43:21,895 | ERROR | vim-proxy-activity-pool-526 | ReconfigureVmActivity | [Activity Execution] Uncaught Exception during Activity execution. Recent phase: com.vmware.vcloud.val.internal.impl.ReconfigureVmActivity$ReconfigureVmInVcPhase@5d0eaac1 - Handle: urn:uuid:####-####-####, Current Phase: ReconfigureVmActivity$ReconfigureVmInVcPhase | requestId=UI-####-####-####,request=POST https://myserver.mydomain.internal/api/admin/extension/vimServer/####-####-####/importVmAsVApp,requestTime=1604410984820,remoteAddress=X.X.X.X:XXXX,userAgent=Apache-HttpClient/4.5.10 (Java/11.0.6),accept=application/*+xml;version 29.0 vcd=####-####-####,task=####-####-#### activity=(com.vmware.vcloud.backendbase.management.system.TaskActivity,urn:uuid:####-####-####) activity=(com.vmware.vcloud.vdc.impl.ImportSingletonVAppActivity,urn:uuid:####-####-####) activity=(com.vmware.vcloud.val.internal.impl.ReconfigureVmActivity,urn:uuid:####-####-####)
java.util.concurrent.ExecutionException: com.vmware.ssdc.library.exceptions.VimInvalidArgumentException: The operation could not be performed because the argument is invalid. A specified parameter was not correct: spec.memoryAllocation.reservation
vCenter Server task (moref: task-#####) failed in vCenter Server 'vCenter_Server_FQDN' (####-####-####).
at com.vmware.vcloud.activity.executors.ActivityRunner.run(ActivityRunner.java:136)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
...
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: spec.memoryAllocation.reservation
vCenter Server task (moref: task-#####) failed in vCenter Server 'vCenter_Server_FQDN' (####-####-####).
at com.vmware.ssdc.library.vim.LmVim.Convert(LmVim.java:261)
at com.vmware.ssdc.library.vim.LmVim.Convert(LmVim.java:497)
at com.vmware.vcloud.val.taskmanagement.TaskWaiterInvRecord.CheckForError(TaskWaiterInvRecord.java:176)
...
Caused by: (vmodl.fault.InvalidArgument) {
faultCause = null,
faultMessage = null,
invalidProperty = spec.memoryAllocation.reservation
}
...
- In the /var/log/vmware/vpxd/vpxd.log file on the vCenter Server, the memory reservation spec is set to zero and invalid:
2020-10-26T18:10:01.253Z info vpxd[12347] [Originator@6876 sub=provisioning opID=vcd-UI-####-####-####-####-####-####;activity=urn:uuid:####-####-####] Invalid memory reservation spec 0 while locked
2020-10-26T18:10:01.253Z info vpxd[12347] [Originator@6876 sub=vpxLro opID=vcd-UI-####-####-####-####-####-####;activity=urn:uuid:####-####-####] [VpxLRO] -- FINISH task-####
2020-10-26T18:10:01.253Z info vpxd[12347] [Originator@6876 sub=Default opID=vcd-UI-####-####-####;activity=urn:uuid:####-####-####] [VpxLRO] -- ERROR task-##### -- vm-#### -- vim.VirtualMachine.reconfigure: vmodl.fault.InvalidArgument:
--> Result:
--> (vmodl.fault.InvalidArgument) {
--> faultCause = (vmodl.MethodFault) null,
--> faultMessage = <unset>,
--> invalidProperty = "spec.memoryAllocation.reservation"
--> msg = ""
--> }
--> Args:
...
--> memoryAllocation = (vim.ResourceAllocationInfo) {
--> reservation = 0,
--> expandableReservation = false,
--> limit = 16384,
--> shares = (vim.SharesInfo) {
--> shares = 0,
--> level = "normal"
--> },
--> overheadLimit = <unset>
--> },
...
Note: The preceding log excerpts are only examples. Date, time, and environmental variables may vary depending on your environment.