Virtual Machine Templates - Update
Implements the VirtualMachineTemplate PATCH method.
Updates the VirtualMachineTemplate resource.
PATCH https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/virtualMachineTemplates/{virtualMachineTemplateName}?api-version=2025-03-13
URI Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
|
resource
|
path | True |
string minLength: 1maxLength: 90 |
The name of the resource group. The name is case insensitive. |
|
subscription
|
path | True |
string (uuid) |
The ID of the target subscription. The value must be an UUID. |
|
virtual
|
path | True |
string minLength: 1maxLength: 54 pattern: [a-zA-Z0-9-_\.] |
Name of the VirtualMachineTemplate. |
|
api-version
|
query | True |
string minLength: 1 |
The API version to use for this operation. |
Request Body
| Name | Type | Description |
|---|---|---|
| tags |
object |
Resource tags. |
Responses
| Name | Type | Description |
|---|---|---|
| 200 OK |
Azure operation completed successfully. |
|
| 202 Accepted |
Resource update request accepted. Headers
|
|
| Other Status Codes |
An unexpected error response. |
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
|
Virtual |
|
Virtual |
VirtualMachineTemplates_Update_MaximumSet
Sample request
PATCH https://management.azure.com/subscriptions/79332E5A-630B-480F-A266-A941C015AB19/resourceGroups/rgscvmm/providers/Microsoft.ScVmm/virtualMachineTemplates/g?api-version=2025-03-13
{
"tags": {
"key6634": "wwfhrg"
}
}
Sample response
{
"properties": {
"inventoryItemId": "qjrykoogccwlgkd",
"uuid": "12345678-1234-1234-1234-12345678abcd",
"vmmServerId": "/subscriptions/12345678-1234-1234-1234-12345678abc/resourceGroups/exampleResourceGroup/providers/Microsoft.ScVmm/vmmServers/vmmServerName",
"osType": "Windows",
"osName": "qcbolnbisklo",
"computerName": "asxghqngsojdsdptpirbz",
"memoryMB": 24,
"cpuCount": 23,
"limitCpuForMigration": "true",
"dynamicMemoryEnabled": "true",
"isCustomizable": "true",
"dynamicMemoryMaxMB": 21,
"dynamicMemoryMinMB": 21,
"isHighlyAvailable": "true",
"generation": 16,
"networkInterfaces": [
{
"name": "kvofzqulbjlbtt",
"displayName": "yoayfd",
"ipv4Addresses": [
"eeunirpkpqazzxhsqonkxcfuks"
],
"ipv6Addresses": [
"pk"
],
"macAddress": "oaeqqegt",
"virtualNetworkId": "/subscriptions/12345678-1234-1234-1234-12345678abc/resourceGroups/exampleResourceGroup/providers/Microsoft.ScVmm/virtualNetworks/virtualNetworkName",
"networkName": "lqbm",
"ipv4AddressType": "Dynamic",
"ipv6AddressType": "Dynamic",
"macAddressType": "Dynamic",
"nicId": "roxpsvlo"
}
],
"disks": [
{
"name": "fgnckfymwdsqnfxkdvexuaobe",
"displayName": "fgladknawlgjodo",
"diskId": "ltdrwcfjklpsimhzqyh",
"diskSizeGB": 30,
"maxDiskSizeGB": 18,
"bus": 8,
"lun": 10,
"busType": "zu",
"vhdType": "cnbeeeylrvopigdynvgpkfp",
"volumeType": "ckkymkuekzzqhexyjueruzlfemoeln",
"vhdFormatType": "vbcrrmhgahznifudvhxfagwoplcb",
"templateDiskId": "lcdwrokpyvekqccclf",
"storageQoSPolicy": {
"name": "ceiyfrflu",
"id": "o"
},
"createDiffDisk": "true"
}
],
"provisioningState": "Succeeded"
},
"extendedLocation": {
"type": "customLocation",
"name": "/subscriptions/12345678-1234-1234-1234-12345678abc/resourceGroups/exampleResourceGroup/providers/Microsoft.ExtendedLocation/customLocations/customLocationName"
},
"tags": {
"key9494": "kkbmfpwhmvlobm"
},
"location": "ayxsyduviotylbojh",
"id": "/subscriptions/12345678-1234-1234-1234-12345678abc/resourceGroups/exampleResourceGroup/providers/Microsoft.ScVmm/virtualMachineTemplates/virtualMachineTemplateName",
"name": "ioeuwaznkaayvhpqbnrwbr",
"type": "egfzqiscydkyddksvsjujdlee",
"systemData": {
"createdBy": "p",
"createdByType": "User",
"createdAt": "2024-01-29T22:28:00.094Z",
"lastModifiedBy": "goxcwpyyqlxndquly",
"lastModifiedByType": "User",
"lastModifiedAt": "2024-01-29T22:28:00.095Z"
}
}
location: https://contoso.com/operationstatus
VirtualMachineTemplates_Update_MinimumSet
Sample request
PATCH https://management.azure.com/subscriptions/79332E5A-630B-480F-A266-A941C015AB19/resourceGroups/rgscvmm/providers/Microsoft.ScVmm/virtualMachineTemplates/-?api-version=2025-03-13
{}
Sample response
{
"extendedLocation": {},
"location": "ayxsyduviotylbojh"
}
location: https://contoso.com/operationstatus
Definitions
| Name | Description |
|---|---|
|
Allocation |
Network address allocation method. |
|
created |
The type of identity that created the resource. |
|
Create |
Create diff disk. |
|
Dynamic |
Dynamic memory enabled. |
|
Error |
The resource management error additional info. |
|
Error |
The error detail. |
|
Error |
Error response |
|
Extended |
The extended location. |
|
Is |
Customizable. |
|
Is |
Highly available. |
|
Limit |
Limit CPU for migration. |
|
Network |
Network Interface model |
|
Os |
Virtual machine operating system type. |
|
Provisioning |
The provisioning state of the resource. |
|
Storage |
The StorageQoSPolicyDetails definition. |
|
system |
Metadata pertaining to creation and last modification of the resource. |
|
Virtual |
Virtual disk model |
|
Virtual |
The VirtualMachineTemplates resource definition. |
|
Virtual |
The type used for updating tags in VirtualMachineTemplate resources. |
AllocationMethod
Network address allocation method.
| Value | Description |
|---|---|
| Dynamic |
Dynamically allocated address. |
| Static |
Statically allocated address. |
createdByType
The type of identity that created the resource.
| Value | Description |
|---|---|
| User | |
| Application | |
| ManagedIdentity | |
| Key |
CreateDiffDisk
Create diff disk.
| Value | Description |
|---|---|
| true |
Enable create diff disk. |
| false |
Disable create diff disk. |
DynamicMemoryEnabled
Dynamic memory enabled.
| Value | Description |
|---|---|
| true |
Enable dynamic memory. |
| false |
Disable dynamic memory. |
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 extended location.
| Name | Type | Description |
|---|---|---|
| name |
string (arm-id) |
The extended location name. |
| type |
string |
The extended location type. |
IsCustomizable
Customizable.
| Value | Description |
|---|---|
| true |
Enable customizable. |
| false |
Disable customizable. |
IsHighlyAvailable
Highly available.
| Value | Description |
|---|---|
| true |
Enable highly available. |
| false |
Disable highly available. |
LimitCpuForMigration
Limit CPU for migration.
| Value | Description |
|---|---|
| true |
Enable limit CPU for migration. |
| false |
Disable limit CPU for migration. |
NetworkInterface
Network Interface model
| Name | Type | Description |
|---|---|---|
| displayName |
string |
Gets the display name of the network interface as shown in the vmmServer. This is the fallback label for a NIC when the name is not set. |
| ipv4AddressType |
Gets or sets the ipv4 address type. |
|
| ipv4Addresses |
string[] |
Gets the nic ipv4 addresses. |
| ipv6AddressType |
Gets or sets the ipv6 address type. |
|
| ipv6Addresses |
string[] |
Gets the nic ipv6 addresses. |
| macAddress |
string |
Gets or sets the nic MAC address. |
| macAddressType |
Gets or sets the mac address type. |
|
| name |
string |
Gets or sets the name of the network interface. |
| networkName |
string |
Gets the name of the virtual network in vmmServer that the nic is connected to. |
| nicId |
string |
Gets or sets the nic id. |
| virtualNetworkId |
string (arm-id) |
Gets or sets the ARM Id of the Microsoft.ScVmm/virtualNetwork resource to connect the nic. |
OsType
Virtual machine operating system type.
| Value | Description |
|---|---|
| Windows |
Windows operating system. |
| Linux |
Linux operating system. |
| Other |
Other operating system. |
ProvisioningState
The provisioning state of the resource.
| Value | Description |
|---|---|
| Succeeded |
Resource has been created. |
| Failed |
Resource creation failed. |
| Canceled |
Resource creation was canceled. |
| Provisioning |
The resource is provisioning. |
| Updating |
The resource is updating. |
| Deleting |
The resource is being deleted. |
| Accepted |
The resource has been accepted. |
| Created |
The resource was created. |
StorageQosPolicyDetails
The StorageQoSPolicyDetails definition.
| Name | Type | Description |
|---|---|---|
| id |
string |
The ID of the QoS policy. |
| name |
string |
The name of the policy. |
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. |
VirtualDisk
Virtual disk model
| Name | Type | Description |
|---|---|---|
| bus |
integer (int32) |
Gets or sets the disk bus. |
| busType |
string |
Gets or sets the disk bus type. |
| createDiffDisk |
Gets or sets a value indicating diff disk. |
|
| diskId |
string |
Gets or sets the disk id. |
| diskSizeGB |
integer (int32) |
Gets or sets the disk total size. |
| displayName |
string |
Gets the display name of the virtual disk as shown in the vmmServer. This is the fallback label for a disk when the name is not set. |
| lun |
integer (int32) |
Gets or sets the disk lun. |
| maxDiskSizeGB |
integer (int32) |
Gets the max disk size. |
| name |
string |
Gets or sets the name of the disk. |
| storageQoSPolicy |
The QoS policy for the disk. |
|
| templateDiskId |
string |
Gets or sets the disk id in the template. |
| vhdFormatType |
string |
Gets the disk vhd format type. |
| vhdType |
string |
Gets or sets the disk vhd type. |
| volumeType |
string |
Gets the disk volume type. |
VirtualMachineTemplate
The VirtualMachineTemplates resource definition.
| Name | Type | Description |
|---|---|---|
| extendedLocation |
The extended location. |
|
| id |
string (arm-id) |
Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" |
| location |
string |
The geo-location where the resource lives |
| name |
string |
The name of the resource |
| properties.computerName |
string |
Gets computer name. |
| properties.cpuCount |
integer (int32) |
Gets the desired number of vCPUs for the vm. |
| properties.disks |
Gets the disks of the template. |
|
| properties.dynamicMemoryEnabled |
Gets a value indicating whether to enable dynamic memory or not. |
|
| properties.dynamicMemoryMaxMB |
integer (int32) |
Gets the max dynamic memory for the vm. |
| properties.dynamicMemoryMinMB |
integer (int32) |
Gets the min dynamic memory for the vm. |
| properties.generation |
integer (int32) |
Gets the generation for the vm. |
| properties.inventoryItemId |
string |
Gets or sets the inventory Item ID for the resource. |
| properties.isCustomizable |
Gets a value indicating whether the vm template is customizable or not. |
|
| properties.isHighlyAvailable |
Gets highly available property. |
|
| properties.limitCpuForMigration |
Gets a value indicating whether to enable processor compatibility mode for live migration of VMs. |
|
| properties.memoryMB |
integer (int32) |
MemoryMB is the desired size of a virtual machine's memory, in MB. |
| properties.networkInterfaces |
Gets the network interfaces of the template. |
|
| properties.osName |
string |
Gets os name. |
| properties.osType |
Gets the type of the os. |
|
| properties.provisioningState |
Provisioning state of the resource. |
|
| properties.uuid |
string pattern: ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$ |
Unique ID of the virtual machine template. |
| properties.vmmServerId |
string (arm-id) |
ARM Id of the vmmServer resource in which this resource resides. |
| systemData |
Azure Resource Manager metadata containing createdBy and modifiedBy information. |
|
| tags |
object |
Resource tags. |
| type |
string |
The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" |
VirtualMachineTemplateTagsUpdate
The type used for updating tags in VirtualMachineTemplate resources.
| Name | Type | Description |
|---|---|---|
| tags |
object |
Resource tags. |