This resource type has migrated to the Microsoft.HybridCompute namespace. For the new resource type, see Microsoft.HybridCompute machines.
Bicep resource definition
The virtualmachines resource type can be deployed with operations that target:
For a list of changed properties in each API version, see change log.
To create a Microsoft.AzureStackHCI/virtualmachines resource, add the following Bicep to your template.
resource symbolicname 'Microsoft.AzureStackHCI/virtualmachines@2021-09-01-preview' = {
extendedLocation: {
name: 'string'
type: 'string'
}
identity: {
type: 'SystemAssigned'
}
location: 'string'
name: 'string'
properties: {
guestAgentProfile: {}
hardwareProfile: {
dynamicMemoryConfig: {
maximumMemoryGB: int
minimumMemoryGB: int
targetMemoryBuffer: int
}
memoryGB: int
processors: int
vmSize: 'string'
}
networkProfile: {
networkInterfaces: [
{
id: 'string'
}
]
}
osProfile: {
adminPassword: 'string'
adminUsername: 'string'
computerName: 'string'
linuxConfiguration: {
disablePasswordAuthentication: bool
provisionVMAgent: bool
ssh: {
publicKeys: [
{
keyData: 'string'
path: 'string'
}
]
}
}
osType: 'string'
windowsConfiguration: {
enableAutomaticUpdates: bool
provisionVMAgent: bool
ssh: {
publicKeys: [
{
keyData: 'string'
path: 'string'
}
]
}
timeZone: 'string'
}
}
resourceName: 'string'
securityProfile: {
enableTPM: bool
uefiSettings: {
secureBootEnabled: bool
}
}
storageProfile: {
dataDisks: [
{
name: 'string'
}
]
imageReference: {
name: 'string'
}
osDisk: {
id: 'string'
}
vmConfigContainerName: 'string'
}
}
tags: {
{customized property}: 'string'
}
}
Property Values
Microsoft.AzureStackHCI/virtualmachines
Name |
Description |
Value |
extendedLocation |
The extendedLocation of the resource. |
ExtendedLocation |
identity |
Identity for the resource. |
Identity |
location |
The geo-location where the resource lives |
string (required) |
name |
The resource name |
string
Constraints: Min length = 3 Max length = 64 (required) |
properties |
Properties of a virtual machine resource |
VirtualmachinesProperties |
tags |
Resource tags |
Dictionary of tag names and values. See Tags in templates |
ExtendedLocation
Name |
Description |
Value |
name |
The name of the extended location. |
string |
type |
The type of the extended location. |
'CustomLocation' |
GuestAgentProfile
Identity
Name |
Description |
Value |
type |
The identity type. |
'SystemAssigned' |
VirtualmachinesProperties
VirtualmachinesPropertiesHardwareProfile
VirtualmachinesPropertiesHardwareProfileDynamicMemoryConfig
Name |
Description |
Value |
maximumMemoryGB |
|
int |
minimumMemoryGB |
|
int |
targetMemoryBuffer |
|
int |
VirtualmachinesPropertiesNetworkProfile
VirtualmachinesPropertiesNetworkProfileNetworkInterfacesItem
Name |
Description |
Value |
id |
ID - Resource Id of the network interface |
string |
VirtualmachinesPropertiesOsProfile
Name |
Description |
Value |
adminPassword |
AdminPassword - admin password |
string
Constraints: Sensitive value. Pass in as a secure parameter. |
adminUsername |
AdminUsername - admin username |
string |
computerName |
ComputerName - name of the compute |
string |
linuxConfiguration |
LinuxConfiguration - linux specific configuration values for the virtual machine |
VirtualmachinesPropertiesOsProfileLinuxConfiguration |
osType |
OsType - string specifying whether the OS is Linux or Windows |
'Linux' 'Windows' |
windowsConfiguration |
Windows Configuration for the virtual machine |
VirtualmachinesPropertiesOsProfileWindowsConfiguration |
VirtualmachinesPropertiesOsProfileLinuxConfiguration
Name |
Description |
Value |
disablePasswordAuthentication |
DisablePasswordAuthentication - whether password authentication should be disabled |
bool |
provisionVMAgent |
Used to indicate whether Arc for Servers agent onboarding should be triggered during the virtual machine creation process. |
bool |
ssh |
SSH - contains settings related to ssh configuration |
VirtualmachinesPropertiesOsProfileLinuxConfigurationSsh |
VirtualmachinesPropertiesOsProfileLinuxConfigurationSsh
VirtualmachinesPropertiesOsProfileLinuxConfigurationSshPublicKeysItem
Name |
Description |
Value |
keyData |
KeyData - 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.
For creating ssh keys, see Create SSH keys on Linux and Mac for Li nux VMs in Azure. |
string
Constraints: Sensitive value. Pass in as a secure parameter. |
path |
Path - 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 |
string |
VirtualmachinesPropertiesOsProfileWindowsConfiguration
Name |
Description |
Value |
enableAutomaticUpdates |
Whether to EnableAutomaticUpdates on the machine |
bool |
provisionVMAgent |
Used to indicate whether Arc for Servers agent onboarding should be triggered during the virtual machine creation process. |
bool |
ssh |
SSH Configuration |
VirtualmachinesPropertiesOsProfileWindowsConfigurationSsh |
timeZone |
TimeZone for the virtual machine |
string |
VirtualmachinesPropertiesOsProfileWindowsConfigurationSsh
VirtualmachinesPropertiesOsProfileWindowsConfigurationSshPublicKeysItem
Name |
Description |
Value |
keyData |
KeyData - 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.
For creating ssh keys, see Create SSH keys on Linux and Mac for Li nux VMs in Azure. |
string
Constraints: Sensitive value. Pass in as a secure parameter. |
path |
Path - 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 |
string |
VirtualmachinesPropertiesSecurityProfile
VirtualmachinesPropertiesSecurityProfileUefiSettings
Name |
Description |
Value |
secureBootEnabled |
Specifies whether secure boot should be enabled on the virtual machine. |
bool |
VirtualmachinesPropertiesStorageProfile
VirtualmachinesPropertiesStorageProfileDataDisksItem
Name |
Description |
Value |
name |
|
string |
VirtualmachinesPropertiesStorageProfileImageReference
Name |
Description |
Value |
name |
Name - Name of the image |
string |
VirtualmachinesPropertiesStorageProfileOsDisk
Name |
Description |
Value |
id |
Specifies the virtual hard disk's ID |
string |
ARM template resource definition
The virtualmachines resource type can be deployed with operations that target:
For a list of changed properties in each API version, see change log.
To create a Microsoft.AzureStackHCI/virtualmachines resource, add the following JSON to your template.
{
"type": "Microsoft.AzureStackHCI/virtualmachines",
"apiVersion": "2021-09-01-preview",
"name": "string",
"extendedLocation": {
"name": "string",
"type": "string"
},
"identity": {
"type": "SystemAssigned"
},
"location": "string",
"properties": {
"guestAgentProfile": {
},
"hardwareProfile": {
"dynamicMemoryConfig": {
"maximumMemoryGB": "int",
"minimumMemoryGB": "int",
"targetMemoryBuffer": "int"
},
"memoryGB": "int",
"processors": "int",
"vmSize": "string"
},
"networkProfile": {
"networkInterfaces": [
{
"id": "string"
}
]
},
"osProfile": {
"adminPassword": "string",
"adminUsername": "string",
"computerName": "string",
"linuxConfiguration": {
"disablePasswordAuthentication": "bool",
"provisionVMAgent": "bool",
"ssh": {
"publicKeys": [
{
"keyData": "string",
"path": "string"
}
]
}
},
"osType": "string",
"windowsConfiguration": {
"enableAutomaticUpdates": "bool",
"provisionVMAgent": "bool",
"ssh": {
"publicKeys": [
{
"keyData": "string",
"path": "string"
}
]
},
"timeZone": "string"
}
},
"resourceName": "string",
"securityProfile": {
"enableTPM": "bool",
"uefiSettings": {
"secureBootEnabled": "bool"
}
},
"storageProfile": {
"dataDisks": [
{
"name": "string"
}
],
"imageReference": {
"name": "string"
},
"osDisk": {
"id": "string"
},
"vmConfigContainerName": "string"
}
},
"tags": {
"{customized property}": "string"
}
}
Property Values
Microsoft.AzureStackHCI/virtualmachines
Name |
Description |
Value |
apiVersion |
The api version |
'2021-09-01-preview' |
extendedLocation |
The extendedLocation of the resource. |
ExtendedLocation |
identity |
Identity for the resource. |
Identity |
location |
The geo-location where the resource lives |
string (required) |
name |
The resource name |
string
Constraints: Min length = 3 Max length = 64 (required) |
properties |
Properties of a virtual machine resource |
VirtualmachinesProperties |
tags |
Resource tags |
Dictionary of tag names and values. See Tags in templates |
type |
The resource type |
'Microsoft.AzureStackHCI/virtualmachines' |
ExtendedLocation
Name |
Description |
Value |
name |
The name of the extended location. |
string |
type |
The type of the extended location. |
'CustomLocation' |
GuestAgentProfile
Identity
Name |
Description |
Value |
type |
The identity type. |
'SystemAssigned' |
VirtualmachinesProperties
VirtualmachinesPropertiesHardwareProfile
VirtualmachinesPropertiesHardwareProfileDynamicMemoryConfig
Name |
Description |
Value |
maximumMemoryGB |
|
int |
minimumMemoryGB |
|
int |
targetMemoryBuffer |
|
int |
VirtualmachinesPropertiesNetworkProfile
VirtualmachinesPropertiesNetworkProfileNetworkInterfacesItem
Name |
Description |
Value |
id |
ID - Resource Id of the network interface |
string |
VirtualmachinesPropertiesOsProfile
Name |
Description |
Value |
adminPassword |
AdminPassword - admin password |
string
Constraints: Sensitive value. Pass in as a secure parameter. |
adminUsername |
AdminUsername - admin username |
string |
computerName |
ComputerName - name of the compute |
string |
linuxConfiguration |
LinuxConfiguration - linux specific configuration values for the virtual machine |
VirtualmachinesPropertiesOsProfileLinuxConfiguration |
osType |
OsType - string specifying whether the OS is Linux or Windows |
'Linux' 'Windows' |
windowsConfiguration |
Windows Configuration for the virtual machine |
VirtualmachinesPropertiesOsProfileWindowsConfiguration |
VirtualmachinesPropertiesOsProfileLinuxConfiguration
Name |
Description |
Value |
disablePasswordAuthentication |
DisablePasswordAuthentication - whether password authentication should be disabled |
bool |
provisionVMAgent |
Used to indicate whether Arc for Servers agent onboarding should be triggered during the virtual machine creation process. |
bool |
ssh |
SSH - contains settings related to ssh configuration |
VirtualmachinesPropertiesOsProfileLinuxConfigurationSsh |
VirtualmachinesPropertiesOsProfileLinuxConfigurationSsh
VirtualmachinesPropertiesOsProfileLinuxConfigurationSshPublicKeysItem
Name |
Description |
Value |
keyData |
KeyData - 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.
For creating ssh keys, see Create SSH keys on Linux and Mac for Li nux VMs in Azure. |
string
Constraints: Sensitive value. Pass in as a secure parameter. |
path |
Path - 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 |
string |
VirtualmachinesPropertiesOsProfileWindowsConfiguration
Name |
Description |
Value |
enableAutomaticUpdates |
Whether to EnableAutomaticUpdates on the machine |
bool |
provisionVMAgent |
Used to indicate whether Arc for Servers agent onboarding should be triggered during the virtual machine creation process. |
bool |
ssh |
SSH Configuration |
VirtualmachinesPropertiesOsProfileWindowsConfigurationSsh |
timeZone |
TimeZone for the virtual machine |
string |
VirtualmachinesPropertiesOsProfileWindowsConfigurationSsh
VirtualmachinesPropertiesOsProfileWindowsConfigurationSshPublicKeysItem
Name |
Description |
Value |
keyData |
KeyData - 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.
For creating ssh keys, see Create SSH keys on Linux and Mac for Li nux VMs in Azure. |
string
Constraints: Sensitive value. Pass in as a secure parameter. |
path |
Path - 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 |
string |
VirtualmachinesPropertiesSecurityProfile
VirtualmachinesPropertiesSecurityProfileUefiSettings
Name |
Description |
Value |
secureBootEnabled |
Specifies whether secure boot should be enabled on the virtual machine. |
bool |
VirtualmachinesPropertiesStorageProfile
VirtualmachinesPropertiesStorageProfileDataDisksItem
Name |
Description |
Value |
name |
|
string |
VirtualmachinesPropertiesStorageProfileImageReference
Name |
Description |
Value |
name |
Name - Name of the image |
string |
VirtualmachinesPropertiesStorageProfileOsDisk
Name |
Description |
Value |
id |
Specifies the virtual hard disk's ID |
string |
Usage Examples
The virtualmachines resource type can be deployed with operations that target:
For a list of changed properties in each API version, see change log.
To create a Microsoft.AzureStackHCI/virtualmachines resource, add the following Terraform to your template.
resource "azapi_resource" "symbolicname" {
type = "Microsoft.AzureStackHCI/virtualmachines@2021-09-01-preview"
name = "string"
parent_id = "string"
identity {
type = "string"
identity_ids = [
"string"
]
}
location = "string"
tags = {
{customized property} = "string"
}
body = {
extendedLocation = {
name = "string"
type = "string"
}
properties = {
guestAgentProfile = {
}
hardwareProfile = {
dynamicMemoryConfig = {
maximumMemoryGB = int
minimumMemoryGB = int
targetMemoryBuffer = int
}
memoryGB = int
processors = int
vmSize = "string"
}
networkProfile = {
networkInterfaces = [
{
id = "string"
}
]
}
osProfile = {
adminPassword = "string"
adminUsername = "string"
computerName = "string"
linuxConfiguration = {
disablePasswordAuthentication = bool
provisionVMAgent = bool
ssh = {
publicKeys = [
{
keyData = "string"
path = "string"
}
]
}
}
osType = "string"
windowsConfiguration = {
enableAutomaticUpdates = bool
provisionVMAgent = bool
ssh = {
publicKeys = [
{
keyData = "string"
path = "string"
}
]
}
timeZone = "string"
}
}
resourceName = "string"
securityProfile = {
enableTPM = bool
uefiSettings = {
secureBootEnabled = bool
}
}
storageProfile = {
dataDisks = [
{
name = "string"
}
]
imageReference = {
name = "string"
}
osDisk = {
id = "string"
}
vmConfigContainerName = "string"
}
}
}
}
Property Values
Microsoft.AzureStackHCI/virtualmachines
Name |
Description |
Value |
extendedLocation |
The extendedLocation of the resource. |
ExtendedLocation |
identity |
Identity for the resource. |
Identity |
location |
The geo-location where the resource lives |
string (required) |
name |
The resource name |
string
Constraints: Min length = 3 Max length = 64 (required) |
properties |
Properties of a virtual machine resource |
VirtualmachinesProperties |
tags |
Resource tags |
Dictionary of tag names and values. |
type |
The resource type |
"Microsoft.AzureStackHCI/virtualmachines@2021-09-01-preview" |
ExtendedLocation
Name |
Description |
Value |
name |
The name of the extended location. |
string |
type |
The type of the extended location. |
'CustomLocation' |
GuestAgentProfile
Identity
Name |
Description |
Value |
type |
The identity type. |
'SystemAssigned' |
VirtualmachinesProperties
VirtualmachinesPropertiesHardwareProfile
VirtualmachinesPropertiesHardwareProfileDynamicMemoryConfig
Name |
Description |
Value |
maximumMemoryGB |
|
int |
minimumMemoryGB |
|
int |
targetMemoryBuffer |
|
int |
VirtualmachinesPropertiesNetworkProfile
VirtualmachinesPropertiesNetworkProfileNetworkInterfacesItem
Name |
Description |
Value |
id |
ID - Resource Id of the network interface |
string |
VirtualmachinesPropertiesOsProfile
Name |
Description |
Value |
adminPassword |
AdminPassword - admin password |
string
Constraints: Sensitive value. Pass in as a secure parameter. |
adminUsername |
AdminUsername - admin username |
string |
computerName |
ComputerName - name of the compute |
string |
linuxConfiguration |
LinuxConfiguration - linux specific configuration values for the virtual machine |
VirtualmachinesPropertiesOsProfileLinuxConfiguration |
osType |
OsType - string specifying whether the OS is Linux or Windows |
'Linux' 'Windows' |
windowsConfiguration |
Windows Configuration for the virtual machine |
VirtualmachinesPropertiesOsProfileWindowsConfiguration |
VirtualmachinesPropertiesOsProfileLinuxConfiguration
Name |
Description |
Value |
disablePasswordAuthentication |
DisablePasswordAuthentication - whether password authentication should be disabled |
bool |
provisionVMAgent |
Used to indicate whether Arc for Servers agent onboarding should be triggered during the virtual machine creation process. |
bool |
ssh |
SSH - contains settings related to ssh configuration |
VirtualmachinesPropertiesOsProfileLinuxConfigurationSsh |
VirtualmachinesPropertiesOsProfileLinuxConfigurationSsh
VirtualmachinesPropertiesOsProfileLinuxConfigurationSshPublicKeysItem
Name |
Description |
Value |
keyData |
KeyData - 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.
For creating ssh keys, see Create SSH keys on Linux and Mac for Li nux VMs in Azure. |
string
Constraints: Sensitive value. Pass in as a secure parameter. |
path |
Path - 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 |
string |
VirtualmachinesPropertiesOsProfileWindowsConfiguration
Name |
Description |
Value |
enableAutomaticUpdates |
Whether to EnableAutomaticUpdates on the machine |
bool |
provisionVMAgent |
Used to indicate whether Arc for Servers agent onboarding should be triggered during the virtual machine creation process. |
bool |
ssh |
SSH Configuration |
VirtualmachinesPropertiesOsProfileWindowsConfigurationSsh |
timeZone |
TimeZone for the virtual machine |
string |
VirtualmachinesPropertiesOsProfileWindowsConfigurationSsh
VirtualmachinesPropertiesOsProfileWindowsConfigurationSshPublicKeysItem
Name |
Description |
Value |
keyData |
KeyData - 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.
For creating ssh keys, see Create SSH keys on Linux and Mac for Li nux VMs in Azure. |
string
Constraints: Sensitive value. Pass in as a secure parameter. |
path |
Path - 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 |
string |
VirtualmachinesPropertiesSecurityProfile
VirtualmachinesPropertiesSecurityProfileUefiSettings
Name |
Description |
Value |
secureBootEnabled |
Specifies whether secure boot should be enabled on the virtual machine. |
bool |
VirtualmachinesPropertiesStorageProfile
VirtualmachinesPropertiesStorageProfileDataDisksItem
Name |
Description |
Value |
name |
|
string |
VirtualmachinesPropertiesStorageProfileImageReference
Name |
Description |
Value |
name |
Name - Name of the image |
string |
VirtualmachinesPropertiesStorageProfileOsDisk
Name |
Description |
Value |
id |
Specifies the virtual hard disk's ID |
string |