---
title: "Updates a virtual machine."
method: PATCH
path: "/{resourceUri}/providers/Microsoft.ConnectedVMwarevSphere/virtualMachineInstances/default"
tags: ["VirtualMachineInstances"]
---

# Updates a virtual machine.

`PATCH /{resourceUri}/providers/Microsoft.ConnectedVMwarevSphere/virtualMachineInstances/default`

The operation to update a virtual machine instance.

## Path parameters

- `resourceUri` string, required

## Query parameters

- `api-version` string, required

## Request body

- VirtualMachineInstanceUpdate — Defines the virtualMachineInstanceUpdate.
  - `properties` VirtualMachineInstanceUpdateProperties — Describes the properties of a Virtual Machine.
    - `hardwareProfile` HardwareProfile — Specifies the hardware settings for the virtual machine.
      - `memorySizeMB` integer — Gets or sets memory size in MBs for the vm.
      - `numCPUs` integer — Gets or sets the number of vCPUs for the vm.
      - `numCoresPerSocket` integer — Gets or sets the number of cores per socket for the vm. Defaults to 1 if unspecified.
      - `cpuHotAddEnabled` boolean — Gets or sets a value indicating whether virtual processors can be added while this virtual machine is running.
      - `cpuHotRemoveEnabled` boolean — Gets or sets a value indicating whether virtual processors can be removed while this virtual machine is running.
      - `memoryHotAddEnabled` boolean — Gets or sets a value indicating whether memory can be added while this virtual machine is running.
    - `storageProfile` StorageProfileUpdate — Specifies the storage settings for the virtual machine disks.
      - `disks` VirtualDiskUpdate[] — Gets or sets the list of virtual disks associated with the virtual machine.
        - `name` string — Gets or sets the name of the virtual disk.
        - `diskSizeGB` integer — Gets or sets the disk total size.
        - `deviceKey` integer — Gets or sets the device key value.
        - `diskMode` 'persistent' | 'independent_persistent' | 'independent_nonpersistent' — Defines the different types of disk modes.
        - `controllerKey` integer — Gets or sets the controller id.
        - `unitNumber` integer — Gets or sets the unit number of the disk on the controller.
        - `deviceName` string — Gets or sets the device name.
        - `diskType` 'flat' | 'pmem' | 'rawphysical' | 'rawvirtual' | 'sparse' | 'sesparse' | 'unknown' — Defines the different types of disks.
    - `networkProfile` NetworkProfileUpdate — Specifies the network interfaces of the virtual machine.
      - `networkInterfaces` NetworkInterfaceUpdate[] — Gets or sets the list of network interfaces associated with the virtual machine.
        - `name` string — Gets or sets the name of the network interface.
        - `networkId` string — Gets or sets the ARM Id of the network resource to connect the virtual machine.
        - `nicType` 'vmxnet3' | 'vmxnet2' | 'vmxnet' | 'e1000' | 'e1000e' | 'pcnet32' — NIC type
        - `powerOnBoot` 'enabled' | 'disabled' — Defines the options for power on boot.
        - `deviceKey` integer — Gets or sets the device key value.

## Response `200`

Arm resource update successful.

- VirtualMachineInstance — unresolved $ref

## Other responses

- `202` — Accepted
- `default` — Error response describing why the operation failed.

## Changes

- **2026-07-13** (2020-10-01-preview) `9a5918d99140` — 1 info
  - endpoint added
- **2021-10-01** (2020-10-01-preview) `3bc66cfa77bc` — 1 breaking
  - api path removed without deprecation

[Change history](https://skmtc.dev/azure/apis/connectedvmware-microsoft-connectedvmwarevsphere/changes/:resourceUri/providers/Microsoft.ConnectedVMwarevSphere/virtualMachineInstances/default/patch.md)

---

[API](https://skmtc.dev/azure/apis/connectedvmware-microsoft-connectedvmwarevsphere.md) · [All operations](https://skmtc.dev/azure/apis/connectedvmware-microsoft-connectedvmwarevsphere/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/azure/connectedvmware-microsoft-connectedvmwarevsphere/revisions/81d67c5b52dd/schema)
