Environment:
- Prism Central with v4.2 API (pc.7.5.1.4 specifically), against AHV AOS 7.5.0.6 cluster
- Using official Nutanix JavaScript SDKs:
- @nutanix-api/vmm-js-client ^4.2.0
- @nutanix-api/clustermgmt-js-client ^4.2.0
- Node.js v14+
Problem:
When attempting to update VM resources (CPU sockets, memory) or boot configuration using the v4.2 updateVmById API endpoint, the operation consistently fails with:
Failed to perform the operation on the VM with UUID 'xxx', due to an invalid argument with key 'createTime' and value 'EMPTY'. Code: VMM-30102
What We're Attempting:
// Fetch current VM state
const vmResponse = await vmApi.getVmById(vmUuid);
const vmData = vmResponse.data.data;
const eTag = vmData.$reserved?.ETag;
// Modify resource allocation
vmData.numSockets = 2;
vmData.memorySizeBytes = 2 * 1024 * 1024 * 1024;
// Send update with If-Match header
await vmApi.updateVmById(vmUuid, vmData, { 'If-Match': eTag });
What We've Tried (None Work):
1. Removing timestamp fields at top level:
- Deleted createTime, lastUpdateTime, updateTime, tenantId
- Still fails with same error
2. Removing all read-only fields at top level:
- Deleted extId, all timestamps, $reserved, $unknownFields, generationUuid, biosUuid, powerState, links, metadata
- Still fails
3. Removing runtime network information:
- Deleted learnedIpAddresses from all NICs
- Still fails
4. Recursive cleanup of ALL nested objects:
- Implemented recursive function to remove all read-only fields at every level (disks, nics, cdRoms, bootConfig, etc.)
- Still fails
5. Following Nutanix support guidance:
- Support suggested sending "the whole modified VM object without stripping fields"
- This also fails with the same error
Evidence This is an API Bug:
When performing the same operations through the Prism Central web UI, we observed that:
- The browser does NOT use PUT requests to /api/vmm/v4.2/ahv/config/vms/{vmId}
- This suggests the UI uses a different (working) endpoint that is not exposed in the v4.2 SDK
- Or the updateVmById endpoint has a fundamental bug with request validation
Additional Context:
The error message indicates the API sees createTime as 'EMPTY' even when:
- The field doesn't exist in our request payload (deleted)
- The field exists in our request with a valid timestamp value
- The field is recursively removed from all nested objects
This suggests the API may be:
1. Reconstructing or validating fields internally in a broken way
2. Looking for the field in unexpected locations
3. Using a different serialization path than what GET returns
Question:
Has anyone successfully used the v4.2 updateVmById endpoint to modify VM resources? If so, what payload structure works?
Is there an alternative endpoint we should be using for VM resource modifications that the browser UI is using?
Any guidance would be greatly appreciated as we've exhausted all documented approaches and support suggestions.

