Symptoms:
- When attempting a failover, the vApp is created in Cloud Director but hte 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-b81d92b3-4119-4496-a0f9-2396e4a1ae6e-ef] [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-539308) failed in vCenter Server 'vCenter_Prod' (44d9cec6-19ed-40a7-b23e-5d497948d050).
2020-11-03 13:43:59.450 ERROR - [UI-b81d92b3-4119-4496-a0f9-2396e4a1ae6e-ef] [task-poller-4] com.vmware.h4.cloud.job.VmFailoverJob : [ UI-b81d92b3-4119-4496-a0f9-2396e4a1ae6e-ef-2ed7da53-afe6-41d2-89be-e8b6561c6207 ] 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-b81d92b3-4119-4496-a0f9-2396e4a1ae6e-ef] [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:f7bb7aa1-a33a-4f0f-b48d-7aa5910aee07, Current Phase: ReconfigureVmActivity$ReconfigureVmInVcPhase | requestId=UI-b81d92b3-4119-4496-a0f9-2396e4a1ae6e-ef-bb4d4361-243c-48af-95d6-50369381b9e7,request=POST https://myserver.mydomain.internal/api/admin/extension/vimServer/44d9cec6-19ed-40a7-b23e-5d497948d050/importVmAsVApp,requestTime=1604410984820,remoteAddress=10.17.55.25:26088,userAgent=Apache-HttpClient/4.5.10 (Java/11.0.6),accept=application/*+xml;version 29.0 vcd=b74da0b0-0538-409a-898a-2c29d3d8f611,task=bac7a718-3f93-4f50-a425-d43c373674c1 activity=(com.vmware.vcloud.backendbase.management.system.TaskActivity,urn:uuid:bac7a718-3f93-4f50-a425-d43c373674c1) activity=(com.vmware.vcloud.vdc.impl.ImportSingletonVAppActivity,urn:uuid:65bc5749-2a09-4a27-bdd5-50a2bfb36dcc) activity=(com.vmware.vcloud.val.internal.impl.ReconfigureVmActivity,urn:uuid:f7bb7aa1-a33a-4f0f-b48d-7aa5910aee07)
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-539300) failed in vCenter Server 'vCenter_Prod' (44d9cec6-19ed-40a7-b23e-5d497948d050).
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-539300) failed in vCenter Server 'vCenter_Prod' (44d9cec6-19ed-40a7-b23e-5d497948d050).
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-7e80e103-1eb2-4cd9-ad45-7c89c3ad5f33-VN-24644fcb-fe77-4c6a-bc61-c5957ef8d7fe;activity=urn:uuid:5353631a-a8b3-4927-a942-195f5ff31d53-6f] Invalid memory reservation spec 0 while locked
2020-10-26T18:10:01.253Z info vpxd[12347] [Originator@6876 sub=vpxLro opID=vcd-UI-7e80e103-1eb2-4cd9-ad45-7c89c3ad5f33-VN-24644fcb-fe77-4c6a-bc61-c5957ef8d7fe;activity=urn:uuid:5353631a-a8b3-4927-a942-195f5ff31d53-6f] [VpxLRO] -- FINISH task-522948
2020-10-26T18:10:01.253Z info vpxd[12347] [Originator@6876 sub=Default opID=vcd-UI-7e80e103-1eb2-4cd9-ad45-7c89c3ad5f33-VN-24644fcb-fe77-4c6a-bc61-c5957ef8d7fe;activity=urn:uuid:5353631a-a8b3-4927-a942-195f5ff31d53-6f] [VpxLRO] -- ERROR task-522948 -- vm-3475 -- 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.