Retrieve or Modify the CPU Configuration of a Virtual Machine
The CPU configuration of a virtual machine is represented by an Item in its VirtualHardwareSection element.
Prerequisites
This operation requires the rights included in the predefined vApp Author role or an equivalent set of rights.Verify that you are logged in to the vCloud Air Compute Service as an End User.
Procedure
Results
The modified section replaces the contents of the original section. For some section types, modifications take effect immediately. For others, modifications take effect only after a power or deployment state change.
Example: Modify the CPU Configuration of a Virtual Machine
<Item xmlns="http://schemas.dmtf.org/ovf/envelope/1" xmlns:vcloud="http://www.vmware.com/vcloud/v1.5" xmlns:rasd="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_ResourceAllocationSettingData" xmlns:vmw="http://www.vmware.com/schema/ovf" vcloud:type="application/vnd.vmware.vcloud.rasdItem+xml"> <rasd:AllocationUnits>hertz * 10^6</rasd:AllocationUnits> <rasd:Description>Number of Virtual CPUs</rasd:Description> <rasd:ElementName>1 virtual CPU(s)</rasd:ElementName> <rasd:InstanceID>4</rasd:InstanceID> <rasd:Reservation>0</rasd:Reservation> <rasd:ResourceType>3</rasd:ResourceType> <rasd:VirtualQuantity>1</rasd:VirtualQuantity> <rasd:Weight>0</rasd:Weight> <vmw:CoresPerSocket ovf:required="false">1</vmw:CoresPerSocket> </Item>
This request modifies the CPU
section to add a second CPU to the
Vm by
changing the
rasd:VirtualQuantity
value of the
Item
to
2
. It also raises the value of
CoresPerSocket to 2.
PUT https://vcloud.example.com/api/vApp/vm-4/virtualHardwareSection/cpu Content-type: application/vnd.vmware.vcloud.rasdItem+xml ... <?xml version="1.0" encoding="UTF-8"?> <Item xmlns="http://schemas.dmtf.org/ovf/envelope/1" xmlns:vcloud="http://www.vmware.com/vcloud/v1.5" xmlns:rasd="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_ResourceAllocationSettingData" vcloud:type="application/vnd.vmware.vcloud.rasdItem+xml"> <rasd:AllocationUnits>hertz * 10^6</rasd:AllocationUnits> <rasd:Description>Number of Virtual CPUs</rasd:Description> <rasd:ElementName>2 virtual CPU(s)</rasd:ElementName> <rasd:InstanceID>4</rasd:InstanceID> <rasd:Reservation>0</rasd:Reservation> <rasd:ResourceType>3</rasd:ResourceType> <rasd:VirtualQuantity>2</rasd:VirtualQuantity> <rasd:Weight>0</rasd:Weight> <vmw:CoresPerSocket ovf:required="false">2</vmw:CoresPerSocket> </Item>
202 Accepted Content-Type: application/vnd.vmware.vcloud.task+xml ... <Task ... operation="Updating Virtual Application Linux FTP server (7)" ...> ... </Task>