vcenter vm hardware memory: update

Updates the memory-related settings of a virtual machine.


HTTP request

PATCH https://{server}/rest/vcenter/vm/{vm}/hardware/memory

Path Parameters

Name Type Description
vm string Virtual machine identifier.

Request Body Structure:

<?xml version="1.0" ?>
<ns0:Update-Input xmlns:ns0="" xmlns:xsi="">

Request Body Parameters:

Name Type Description
bold = required
spec update_spec Specification for updating the memory-related settings of the virtual machine.
spec.size_MiB long New memory size in mebibytes.

The supported range of memory sizes is constrained by the configured guest operating system and virtual hardware version of the virtual machine.

If the virtual machine is running, this value may only be changed if is true, and the new memory size must satisfy the constraints specified by and

Optional. If unset, the value is unchanged.

spec.hot_add_enabled boolean Flag indicating whether adding memory while the virtual machine is running should be enabled.

Some guest operating systems may consume more resources or perform less efficiently when they run on hardware that supports adding memory while the machine is running.

This field may only be modified if the virtual machine is not powered on.

Optional. If unset, the value is unchanged.


HTTP Status Code: 200



HTTP Status Code Type Description
500 error if the system reports an error while responding to the request.
404 not_found if the virtual machine is not found.
400 invalid_argument if one of the provided settings is not permitted; for example, specifying a negative value for size_MiB.
400 not_allowed_in_current_state if hot_add_enabled is specified and the virtual machine is not powered off.
400 resource_busy if the virtual machine is busy performing another operation.
400 resource_inaccessible if the virtual machine's configuration state cannot be accessed.
503 service_unavailable if the system is unable to communicate with a service to complete the request.
401 unauthenticated if the user can not be authenticated.
403 unauthorized if the user doesn't have the required privileges.