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=2024-06-01

URI Parameters

Name In Required Type Description
resourceGroupName
path True

string

The name of the resource group. The name is case insensitive.

subscriptionId
path True

string

uuid

The ID of the target subscription. The value must be an UUID.

virtualMachineTemplateName
path True

string

Name of the VirtualMachineTemplate.

Regex pattern: [a-zA-Z0-9-_\.]

api-version
query True

string

The API version to use for this operation.

Request Body

Name Type Description
tags

object

Resource tags.

Responses

Name Type Description
200 OK

VirtualMachineTemplate

Azure operation completed successfully.

202 Accepted

Resource update request accepted.

Headers

  • Location: string
  • Retry-After: integer
Other Status Codes

ErrorResponse

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

VirtualMachineTemplates_Update_MaximumSet
VirtualMachineTemplates_Update_MinimumSet

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=2024-06-01

{
  "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=2024-06-01

{}

Sample response

{
  "extendedLocation": {},
  "location": "ayxsyduviotylbojh"
}
location: https://contoso.com/operationstatus

Definitions

Name Description
AllocationMethod

Network address allocation method.

createdByType

The type of identity that created the resource.

CreateDiffDisk

Create diff disk.

DynamicMemoryEnabled

Dynamic memory enabled.

ErrorAdditionalInfo

The resource management error additional info.

ErrorDetail

The error detail.

ErrorResponse

Error response

ExtendedLocation

The extended location.

IsCustomizable

Customizable.

IsHighlyAvailable

Highly available.

LimitCpuForMigration

Limit CPU for migration.

NetworkInterface

Network Interface model

OsType

Virtual machine operating system type.

ProvisioningState

The provisioning state of the resource.

StorageQosPolicyDetails

The StorageQoSPolicyDetails definition.

systemData

Metadata pertaining to creation and last modification of the resource.

VirtualDisk

Virtual disk model

VirtualMachineTemplate

The VirtualMachineTemplates resource definition.

VirtualMachineTemplateTagsUpdate

The type used for updating tags in VirtualMachineTemplate resources.

AllocationMethod

Network address allocation method.

Name Type Description
Dynamic

string

Dynamically allocated address.

Static

string

Statically allocated address.

createdByType

The type of identity that created the resource.

Name Type Description
Application

string

Key

string

ManagedIdentity

string

User

string

CreateDiffDisk

Create diff disk.

Name Type Description
false

string

Disable create diff disk.

true

string

Enable create diff disk.

DynamicMemoryEnabled

Dynamic memory enabled.

Name Type Description
false

string

Disable dynamic memory.

true

string

Enable 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

ErrorAdditionalInfo[]

The error additional info.

code

string

The error code.

details

ErrorDetail[]

The error details.

message

string

The error message.

target

string

The error target.

ErrorResponse

Error response

Name Type Description
error

ErrorDetail

The error object.

ExtendedLocation

The extended location.

Name Type Description
name

string

The extended location name.

type

string

The extended location type.

IsCustomizable

Customizable.

Name Type Description
false

string

Disable customizable.

true

string

Enable customizable.

IsHighlyAvailable

Highly available.

Name Type Description
false

string

Disable highly available.

true

string

Enable highly available.

LimitCpuForMigration

Limit CPU for migration.

Name Type Description
false

string

Disable limit CPU for migration.

true

string

Enable 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

AllocationMethod

Gets or sets the ipv4 address type.

ipv4Addresses

string[]

Gets the nic ipv4 addresses.

ipv6AddressType

AllocationMethod

Gets or sets the ipv6 address type.

ipv6Addresses

string[]

Gets the nic ipv6 addresses.

macAddress

string

Gets or sets the nic MAC address.

macAddressType

AllocationMethod

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

Gets or sets the ARM Id of the Microsoft.ScVmm/virtualNetwork resource to connect the nic.

OsType

Virtual machine operating system type.

Name Type Description
Linux

string

Linux operating system.

Other

string

Other operating system.

Windows

string

Windows operating system.

ProvisioningState

The provisioning state of the resource.

Name Type Description
Accepted

string

The resource has been accepted.

Canceled

string

Resource creation was canceled.

Created

string

The resource was created.

Deleting

string

The resource is being deleted.

Failed

string

Resource creation failed.

Provisioning

string

The resource is provisioning.

Succeeded

string

Resource has been created.

Updating

string

The resource is updating.

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

The timestamp of resource creation (UTC).

createdBy

string

The identity that created the resource.

createdByType

createdByType

The type of identity that created the resource.

lastModifiedAt

string

The timestamp of resource last modification (UTC)

lastModifiedBy

string

The identity that last modified the resource.

lastModifiedByType

createdByType

The type of identity that last modified the resource.

VirtualDisk

Virtual disk model

Name Type Description
bus

integer

Gets or sets the disk bus.

busType

string

Gets or sets the disk bus type.

createDiffDisk

CreateDiffDisk

Gets or sets a value indicating diff disk.

diskId

string

Gets or sets the disk id.

diskSizeGB

integer

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

Gets or sets the disk lun.

maxDiskSizeGB

integer

Gets the max disk size.

name

string

Gets or sets the name of the disk.

storageQoSPolicy

StorageQosPolicyDetails

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

ExtendedLocation

The extended location.

id

string

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

Gets the desired number of vCPUs for the vm.

properties.disks

VirtualDisk[]

Gets the disks of the template.

properties.dynamicMemoryEnabled

DynamicMemoryEnabled

Gets a value indicating whether to enable dynamic memory or not.

properties.dynamicMemoryMaxMB

integer

Gets the max dynamic memory for the vm.

properties.dynamicMemoryMinMB

integer

Gets the min dynamic memory for the vm.

properties.generation

integer

Gets the generation for the vm.

properties.inventoryItemId

string

Gets or sets the inventory Item ID for the resource.

properties.isCustomizable

IsCustomizable

Gets a value indicating whether the vm template is customizable or not.

properties.isHighlyAvailable

IsHighlyAvailable

Gets highly available property.

properties.limitCpuForMigration

LimitCpuForMigration

Gets a value indicating whether to enable processor compatibility mode for live migration of VMs.

properties.memoryMB

integer

MemoryMB is the desired size of a virtual machine's memory, in MB.

properties.networkInterfaces

NetworkInterface[]

Gets the network interfaces of the template.

properties.osName

string

Gets os name.

properties.osType

OsType

Gets the type of the os.

properties.provisioningState

ProvisioningState

Provisioning state of the resource.

properties.uuid

string

Unique ID of the virtual machine template.

properties.vmmServerId

string

ARM Id of the vmmServer resource in which this resource resides.

systemData

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.