Virtual Machine Instances - Update
The operation to update a virtual machine instance.
PATCH https://management.azure.com/{resourceUri}/providers/Microsoft.AzureStackHCI/virtualMachineInstances/default?api-version=2024-01-01
URI Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
|
resource
|
path | True |
string |
The fully qualified Azure Resource manager identifier of the Hybrid Compute machine resource to be extended. |
|
api-version
|
query | True |
string minLength: 1 |
The API version to use for this operation. |
Request Body
| Name | Type | Description |
|---|---|---|
| identity |
Identity for the resource. |
|
| properties |
Defines the resource properties for the update. |
Responses
| Name | Type | Description |
|---|---|---|
| 200 OK |
OK |
|
| 202 Accepted |
Accepted Headers Location: string |
|
| Other Status Codes |
Error response describing why the operation failed. |
Security
azure_auth
Azure Active Directory OAuth2 Flow
Type:
oauth2
Flow:
implicit
Authorization URL:
https://login.microsoftonline.com/common/oauth2/authorize
Scopes
| Name | Description |
|---|---|
| user_impersonation | impersonate your user account |
Examples
UpdateVirtualMachine
Sample request
PATCH https://management.azure.com/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/Microsoft.HybridCompute/machines/DemoVM/providers/Microsoft.AzureStackHCI/virtualMachineInstances/default?api-version=2024-01-01
{
"properties": {
"storageProfile": {
"dataDisks": [
{
"id": "/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.AzureStackHCI/virtualHardDisks/test-vhd"
}
]
}
}
}
Sample response
{
"id": "/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/Microsoft.HybridCompute/machines/DemoVM/providers/Microsoft.AzureStackHCI/virtualMachineInstances/default",
"name": "default",
"type": "Microsoft.AzureStackHCI/virtualMachineInstances",
"extendedLocation": {
"name": "/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.ExtendedLocation/customLocations/dogfood-location",
"type": "CustomLocation"
},
"properties": {
"provisioningState": "Accepted",
"storageProfile": {
"imageReference": {
"id": "/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.AzureStackHCI/galleryImages/test-gallery-image"
},
"dataDisks": [
{
"id": "/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.AzureStackHCI/virtualHardDisks/test-vhd"
}
]
},
"hardwareProfile": {
"vmSize": "Default"
},
"osProfile": {
"computerName": "luamaster",
"adminUsername": "localadmin"
},
"networkProfile": {
"networkInterfaces": [
{
"id": "test-nic"
}
]
}
}
}
azure-asyncoperation: http://azure.async.operation/status
Definitions
| Name | Description |
|---|---|
|
created |
The type of identity that created the resource. |
|
Data |
adds data disks to the virtual machine instance |
|
Dynamic |
|
|
Error |
The resource management error additional info. |
|
Error |
The error detail. |
|
Error |
Error response |
|
Extended |
The complex type of the extended location. |
|
Extended |
The type of the extended location. |
|
Guest |
Defines the status of a guest agent installation. |
|
Hardware |
HardwareProfile - Specifies the hardware settings for the virtual machine instance. |
|
Hardware |
HardwareProfile - Specifies the hardware settings for the virtual machine instance. |
|
Http |
HTTP Proxy configuration for the VM. |
| Identity |
Identity for the resource. |
|
Image |
Which Image to use for the virtual machine instance |
|
Instance |
Instance view status. |
|
Linux |
|
|
Network |
NetworkInterfaces - list of network interfaces to be attached to the virtual machine instance |
|
Network |
NetworkProfile - describes the network configuration the virtual machine instance |
|
Network |
NetworkProfile - describes the network update configuration the virtual machine instance |
|
Operating |
This property allows you to specify the type of the OS that is included in the disk if creating a VM from user-image or a specialized VHD. Possible values are: Windows, Linux. |
|
Os |
VHD to attach as OS disk |
|
Os |
OsProfile - describes the configuration of the operating system and sets login data |
|
Os |
OsProfile - describes the update configuration of the operating system |
|
Power |
The power state of the virtual machine instance |
|
Provisioning |
Provisioning state of the virtual machine instance. |
|
Provisioning |
|
|
Resource |
The identity type. |
|
Security |
SecurityProfile - Specifies the security settings for the virtual machine instance. |
|
Security |
Specifies the SecurityType of the virtual machine. EnableTPM and SecureBootEnabled must be set to true for SecurityType to function. |
|
Ssh |
SSH configuration for Linux based VMs running on Azure |
|
Ssh |
Contains information about SSH certificate public key and the path on the Linux VM where the public key is placed. |
| Status |
The status of the operation performed on the virtual machine instance [Succeeded, Failed, InProgress] |
|
Status |
The level code. |
|
Status |
The installation status of the hybrid machine agent installation. |
|
Storage |
StorageProfile - contains information about the disks and storage information for the virtual machine instance |
|
Storage |
|
|
system |
Metadata pertaining to creation and last modification of the resource. |
|
Uefi |
|
|
Virtual |
The instance view of the VM Config Agent running on the virtual machine. |
|
Virtual |
The virtual machine instance resource definition. |
|
Virtual |
Defines the resource properties for the update. |
|
Virtual |
The virtual machine instance resource patch definition. |
|
Virtual |
The instance view of a virtual machine. |
|
Vm |
|
|
Windows |
createdByType
The type of identity that created the resource.
| Value | Description |
|---|---|
| User | |
| Application | |
| ManagedIdentity | |
| Key |
DataDisks
adds data disks to the virtual machine instance
| Name | Type | Description |
|---|---|---|
| id |
string |
Resource ID of the data disk |
DynamicMemoryConfig
| Name | Type | Description |
|---|---|---|
| maximumMemoryMB |
integer (int64) |
|
| minimumMemoryMB |
integer (int64) |
|
| targetMemoryBuffer |
integer (int32) |
Defines the amount of extra memory that should be reserved for a virtual machine instance at runtime, as a percentage of the total memory that the virtual machine instance is thought to need. This only applies to virtual systems with dynamic memory enabled. This property can be in the range of 5 to 2000. |
ErrorAdditionalInfo
The resource management error additional info.
| Name | Type | Description |
|---|---|---|
| info |
object |
The additional info. |
| type |
string |
The additional info type. |
ErrorDetail
The error detail.
| Name | Type | Description |
|---|---|---|
| additionalInfo |
The error additional info. |
|
| code |
string |
The error code. |
| details |
The error details. |
|
| message |
string |
The error message. |
| target |
string |
The error target. |
ErrorResponse
Error response
| Name | Type | Description |
|---|---|---|
| error |
The error object. |
ExtendedLocation
The complex type of the extended location.
| Name | Type | Description |
|---|---|---|
| name |
string |
The name of the extended location. |
| type |
The type of the extended location. |
ExtendedLocationTypes
The type of the extended location.
| Value | Description |
|---|---|
| CustomLocation |
GuestAgentInstallStatus
Defines the status of a guest agent installation.
| Name | Type | Description |
|---|---|---|
| agentVersion |
string |
The hybrid machine agent full version. |
| errorDetails |
Details about the error state. |
|
| lastStatusChange |
string (date-time) |
The time of the last status change. |
| status |
The installation status of the hybrid machine agent installation. |
|
| vmUuid |
string |
Specifies the VM's unique SMBIOS ID. |
HardwareProfile
HardwareProfile - Specifies the hardware settings for the virtual machine instance.
| Name | Type | Default value | Description |
|---|---|---|---|
| dynamicMemoryConfig | |||
| memoryMB |
integer (int64) |
RAM in MB for the virtual machine instance |
|
| processors |
integer (int32) |
number of processors for the virtual machine instance |
|
| vmSize | Default |
HardwareProfileUpdate
HardwareProfile - Specifies the hardware settings for the virtual machine instance.
| Name | Type | Default value | Description |
|---|---|---|---|
| memoryMB |
integer (int64) |
RAM in MB for the virtual machine instance |
|
| processors |
integer (int32) |
number of processors for the virtual machine instance |
|
| vmSize | Default |
HttpProxyConfiguration
HTTP Proxy configuration for the VM.
| Name | Type | Description |
|---|---|---|
| httpProxy |
string |
The HTTP proxy server endpoint to use. |
| httpsProxy |
string |
The HTTPS proxy server endpoint to use. |
| noProxy |
string[] |
The endpoints that should not go through proxy. |
| trustedCa |
string |
Alternative CA cert to use for connecting to proxy servers. |
Identity
Identity for the resource.
| Name | Type | Description |
|---|---|---|
| principalId |
string |
The principal ID of resource identity. |
| tenantId |
string |
The tenant ID of resource. |
| type |
The identity type. |
ImageReference
Which Image to use for the virtual machine instance
| Name | Type | Description |
|---|---|---|
| id |
string |
Resource ID of the image |
InstanceViewStatus
Instance view status.
| Name | Type | Description |
|---|---|---|
| code |
string |
The status code. |
| displayStatus |
string |
The short localizable label for the status. |
| level |
The level code. |
|
| message |
string |
The detailed status message, including for alerts and error messages. |
| time |
string (date-time) |
The time of the status. |
LinuxConfiguration
| Name | Type | Description |
|---|---|---|
| provisionVMAgent |
boolean |
Used to indicate whether Arc for Servers agent onboarding should be triggered during the virtual machine instance creation process. |
| provisionVMConfigAgent |
boolean |
Used to indicate whether the VM Config Agent should be installed during the virtual machine creation process. |
NetworkInterfaces
NetworkInterfaces - list of network interfaces to be attached to the virtual machine instance
| Name | Type | Description |
|---|---|---|
| id |
string |
ID - Resource Id of the network interface |
NetworkProfile
NetworkProfile - describes the network configuration the virtual machine instance
| Name | Type | Description |
|---|---|---|
| networkInterfaces |
NetworkInterfaces - list of network interfaces to be attached to the virtual machine instance |
NetworkProfileUpdate
NetworkProfile - describes the network update configuration the virtual machine instance
| Name | Type | Description |
|---|---|---|
| networkInterfaces |
NetworkInterfaces - list of network interfaces to be attached to the virtual machine instance |
OperatingSystemTypes
This property allows you to specify the type of the OS that is included in the disk if creating a VM from user-image or a specialized VHD. Possible values are: Windows, Linux.
| Value | Description |
|---|---|
| Linux | |
| Windows |
OsDisk
VHD to attach as OS disk
| Name | Type | Description |
|---|---|---|
| id |
string |
Resource ID of the OS disk |
| osType |
This property allows you to specify the type of the OS that is included in the disk if creating a VM from user-image or a specialized VHD. Possible values are: Windows, Linux. |
OsProfile
OsProfile - describes the configuration of the operating system and sets login data
| Name | Type | Description |
|---|---|---|
| adminPassword |
string |
AdminPassword - admin password |
| adminUsername |
string |
AdminUsername - admin username |
| computerName |
string |
ComputerName - name of the compute |
| linuxConfiguration |
LinuxConfiguration - linux specific configuration values for the virtual machine instance |
|
| windowsConfiguration |
Windows Configuration for the virtual machine instance |
OsProfileUpdate
OsProfile - describes the update configuration of the operating system
| Name | Type | Description |
|---|---|---|
| computerName |
string |
ComputerName - name of the computer |
| linuxConfiguration | ||
| windowsConfiguration |
PowerStateEnum
The power state of the virtual machine instance
| Value | Description |
|---|---|
| Deallocated | |
| Deallocating | |
| Running | |
| Starting | |
| Stopped | |
| Stopping | |
| Unknown |
ProvisioningStateEnum
Provisioning state of the virtual machine instance.
| Value | Description |
|---|---|
| Succeeded | |
| Failed | |
| InProgress | |
| Accepted | |
| Deleting | |
| Canceled |
ProvisioningStatus
| Name | Type | Description |
|---|---|---|
| operationId |
string |
The ID of the operation performed on the virtual machine instance |
| status |
The status of the operation performed on the virtual machine instance [Succeeded, Failed, InProgress] |
ResourceIdentityType
The identity type.
| Value | Description |
|---|---|
| SystemAssigned |
SecurityProfile
SecurityProfile - Specifies the security settings for the virtual machine instance.
| Name | Type | Default value | Description |
|---|---|---|---|
| enableTPM |
boolean |
False | |
| securityType |
Specifies the SecurityType of the virtual machine. EnableTPM and SecureBootEnabled must be set to true for SecurityType to function. |
||
| uefiSettings |
SecurityTypes
Specifies the SecurityType of the virtual machine. EnableTPM and SecureBootEnabled must be set to true for SecurityType to function.
| Value | Description |
|---|---|
| TrustedLaunch | |
| ConfidentialVM |
SshConfiguration
SSH configuration for Linux based VMs running on Azure
| Name | Type | Description |
|---|---|---|
| publicKeys |
The list of SSH public keys used to authenticate with linux based VMs. |
SshPublicKey
Contains information about SSH certificate public key and the path on the Linux VM where the public key is placed.
| Name | Type | Description |
|---|---|---|
| keyData |
string |
SSH public key certificate used to authenticate with the VM through ssh. The key needs to be at least 2048-bit and in ssh-rsa format. |
| path |
string |
Specifies the full path on the created VM where ssh public key is stored. If the file already exists, the specified key is appended to the file. Example: /home/user/.ssh/authorized_keys |
Status
The status of the operation performed on the virtual machine instance [Succeeded, Failed, InProgress]
| Value | Description |
|---|---|
| Succeeded | |
| Failed | |
| InProgress |
StatusLevelTypes
The level code.
| Value | Description |
|---|---|
| Info | |
| Warning | |
| Error |
StatusTypes
The installation status of the hybrid machine agent installation.
| Value | Description |
|---|---|
| Succeeded | |
| InProgress | |
| Failed |
StorageProfile
StorageProfile - contains information about the disks and storage information for the virtual machine instance
| Name | Type | Description |
|---|---|---|
| dataDisks |
adds data disks to the virtual machine instance |
|
| imageReference |
Which Image to use for the virtual machine instance |
|
| osDisk |
VHD to attach as OS disk |
|
| vmConfigStoragePathId |
string (arm-id) |
Id of the storage container that hosts the VM configuration file |
StorageProfileUpdate
| Name | Type | Description |
|---|---|---|
| dataDisks |
adds data disks to the virtual machine instance for the update call |
systemData
Metadata pertaining to creation and last modification of the resource.
| Name | Type | Description |
|---|---|---|
| createdAt |
string (date-time) |
The timestamp of resource creation (UTC). |
| createdBy |
string |
The identity that created the resource. |
| createdByType |
The type of identity that created the resource. |
|
| lastModifiedAt |
string (date-time) |
The timestamp of resource last modification (UTC) |
| lastModifiedBy |
string |
The identity that last modified the resource. |
| lastModifiedByType |
The type of identity that last modified the resource. |
UefiSettings
| Name | Type | Default value | Description |
|---|---|---|---|
| secureBootEnabled |
boolean |
False |
Specifies whether secure boot should be enabled on the virtual machine instance. |
VirtualMachineConfigAgentInstanceView
The instance view of the VM Config Agent running on the virtual machine.
| Name | Type | Description |
|---|---|---|
| statuses |
The resource status information. |
|
| vmConfigAgentVersion |
string |
The VM Config Agent full version. |
VirtualMachineInstance
The virtual machine instance resource definition.
| Name | Type | Description |
|---|---|---|
| extendedLocation |
The extendedLocation of the resource. |
|
| id |
string |
Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} |
| identity |
Identity for the resource. |
|
| name |
string |
The name of the resource |
| properties.guestAgentInstallStatus |
Guest agent install status. |
|
| properties.hardwareProfile |
HardwareProfile - Specifies the hardware settings for the virtual machine instance. |
|
| properties.httpProxyConfig |
HTTP Proxy configuration for the VM. |
|
| properties.instanceView |
The virtual machine instance view. |
|
| properties.networkProfile |
NetworkProfile - describes the network configuration the virtual machine instance |
|
| properties.osProfile |
OsProfile - describes the configuration of the operating system and sets login data |
|
| properties.provisioningState |
Provisioning state of the virtual machine instance. |
|
| properties.resourceUid |
string |
Unique identifier defined by ARC to identify the guest of the VM. |
| properties.securityProfile |
SecurityProfile - Specifies the security settings for the virtual machine instance. |
|
| properties.status.errorCode |
string |
VirtualMachine provisioning error code |
| properties.status.errorMessage |
string |
Descriptive error message |
| properties.status.powerState |
The power state of the virtual machine instance |
|
| properties.status.provisioningStatus | ||
| properties.storageProfile |
StorageProfile - contains information about the disks and storage information for the virtual machine instance |
|
| properties.vmId |
string |
Unique identifier for the vm resource. |
| systemData |
Azure Resource Manager metadata containing createdBy and modifiedBy information. |
|
| type |
string |
The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" |
VirtualMachineInstanceUpdateProperties
Defines the resource properties for the update.
| Name | Type | Description |
|---|---|---|
| hardwareProfile |
HardwareProfile - Specifies the hardware settings for the virtual machine instance. |
|
| networkProfile |
NetworkProfile - describes the network update configuration the virtual machine instance |
|
| osProfile |
OsProfile - describes the update configuration of the operating system |
|
| storageProfile |
VirtualMachineInstanceUpdateRequest
The virtual machine instance resource patch definition.
| Name | Type | Description |
|---|---|---|
| identity |
Identity for the resource. |
|
| properties |
Defines the resource properties for the update. |
VirtualMachineInstanceView
The instance view of a virtual machine.
| Name | Type | Description |
|---|---|---|
| vmAgent |
The VM Config Agent running on the virtual machine. |
VmSizeEnum
| Value | Description |
|---|---|
| Default | |
| Standard_A2_v2 | |
| Standard_A4_v2 | |
| Standard_D2s_v3 | |
| Standard_D4s_v3 | |
| Standard_D8s_v3 | |
| Standard_D16s_v3 | |
| Standard_D32s_v3 | |
| Standard_DS2_v2 | |
| Standard_DS3_v2 | |
| Standard_DS4_v2 | |
| Standard_DS5_v2 | |
| Standard_DS13_v2 | |
| Standard_K8S_v1 | |
| Standard_K8S2_v1 | |
| Standard_K8S3_v1 | |
| Standard_K8S4_v1 | |
| Standard_NK6 | |
| Standard_NK12 | |
| Standard_NV6 | |
| Standard_NV12 | |
| Standard_K8S5_v1 | |
| Custom |
WindowsConfiguration
| Name | Type | Description |
|---|---|---|
| provisionVMAgent |
boolean |
Used to indicate whether Arc for Servers agent onboarding should be triggered during the virtual machine instance creation process. |
| provisionVMConfigAgent |
boolean |
Used to indicate whether the VM Config Agent should be installed during the virtual machine creation process. |