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-07-01-preview' = {
extendedLocation: {
name: 'string'
type: 'string'
}
location: 'string'
name: 'string'
properties: {
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
ssh: {
publicKeys: [
{
keyData: 'string'
path: 'string'
}
]
}
}
osType: 'string'
windowsConfiguration: {
enableAutomaticUpdates: bool
ssh: {
publicKeys: [
{
keyData: 'string'
path: 'string'
}
]
}
timeZone: 'string'
}
}
resourceName: 'string'
securityProfile: {
enableTPM: bool
}
storageProfile: {
dataDisks: [
{
name: 'string'
}
]
imageReference: {
name: 'string'
}
}
}
tags: {
{customized property}: 'string'
}
}
Property Values
Microsoft.AzureStackHCI/virtualmachines
Name |
Description |
Value |
extendedLocation |
The extendedLocation of the resource. |
ExtendedLocation |
location |
The geo-location where the resource lives |
string (required) |
name |
The resource name |
string
Constraints: Min length = 3 Max length = 64 (required) |
properties |
VirtualMachineSpec defines the desired state of VirtualMachine |
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' |
VirtualmachinesProperties
VirtualmachinesPropertiesHardwareProfile
VirtualmachinesPropertiesHardwareProfileDynamicMemoryConfig
Name |
Description |
Value |
maximumMemoryGB |
|
int |
minimumMemoryGB |
|
int |
targetMemoryBuffer |
|
int |
VirtualmachinesPropertiesNetworkProfile
VirtualmachinesPropertiesNetworkProfileNetworkInterfacesItem
Name |
Description |
Value |
id |
Name 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
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
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
Name |
Description |
Value |
enableTPM |
|
bool |
VirtualmachinesPropertiesStorageProfile
VirtualmachinesPropertiesStorageProfileDataDisksItem
Name |
Description |
Value |
name |
|
string |
VirtualmachinesPropertiesStorageProfileImageReference
Name |
Description |
Value |
name |
Name - Name of the image |
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-07-01-preview",
"name": "string",
"extendedLocation": {
"name": "string",
"type": "string"
},
"location": "string",
"properties": {
"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",
"ssh": {
"publicKeys": [
{
"keyData": "string",
"path": "string"
}
]
}
},
"osType": "string",
"windowsConfiguration": {
"enableAutomaticUpdates": "bool",
"ssh": {
"publicKeys": [
{
"keyData": "string",
"path": "string"
}
]
},
"timeZone": "string"
}
},
"resourceName": "string",
"securityProfile": {
"enableTPM": "bool"
},
"storageProfile": {
"dataDisks": [
{
"name": "string"
}
],
"imageReference": {
"name": "string"
}
}
},
"tags": {
"{customized property}": "string"
}
}
Property Values
Microsoft.AzureStackHCI/virtualmachines
Name |
Description |
Value |
apiVersion |
The api version |
'2021-07-01-preview' |
extendedLocation |
The extendedLocation of the resource. |
ExtendedLocation |
location |
The geo-location where the resource lives |
string (required) |
name |
The resource name |
string
Constraints: Min length = 3 Max length = 64 (required) |
properties |
VirtualMachineSpec defines the desired state of VirtualMachine |
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' |
VirtualmachinesProperties
VirtualmachinesPropertiesHardwareProfile
VirtualmachinesPropertiesHardwareProfileDynamicMemoryConfig
Name |
Description |
Value |
maximumMemoryGB |
|
int |
minimumMemoryGB |
|
int |
targetMemoryBuffer |
|
int |
VirtualmachinesPropertiesNetworkProfile
VirtualmachinesPropertiesNetworkProfileNetworkInterfacesItem
Name |
Description |
Value |
id |
Name 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
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
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
Name |
Description |
Value |
enableTPM |
|
bool |
VirtualmachinesPropertiesStorageProfile
VirtualmachinesPropertiesStorageProfileDataDisksItem
Name |
Description |
Value |
name |
|
string |
VirtualmachinesPropertiesStorageProfileImageReference
Name |
Description |
Value |
name |
Name - Name of the image |
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-07-01-preview"
name = "string"
parent_id = "string"
location = "string"
tags = {
{customized property} = "string"
}
body = {
extendedLocation = {
name = "string"
type = "string"
}
properties = {
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
ssh = {
publicKeys = [
{
keyData = "string"
path = "string"
}
]
}
}
osType = "string"
windowsConfiguration = {
enableAutomaticUpdates = bool
ssh = {
publicKeys = [
{
keyData = "string"
path = "string"
}
]
}
timeZone = "string"
}
}
resourceName = "string"
securityProfile = {
enableTPM = bool
}
storageProfile = {
dataDisks = [
{
name = "string"
}
]
imageReference = {
name = "string"
}
}
}
}
}
Property Values
Microsoft.AzureStackHCI/virtualmachines
Name |
Description |
Value |
extendedLocation |
The extendedLocation of the resource. |
ExtendedLocation |
location |
The geo-location where the resource lives |
string (required) |
name |
The resource name |
string
Constraints: Min length = 3 Max length = 64 (required) |
properties |
VirtualMachineSpec defines the desired state of VirtualMachine |
VirtualmachinesProperties |
tags |
Resource tags |
Dictionary of tag names and values. |
type |
The resource type |
"Microsoft.AzureStackHCI/virtualmachines@2021-07-01-preview" |
ExtendedLocation
Name |
Description |
Value |
name |
The name of the extended location. |
string |
type |
The type of the extended location. |
'CustomLocation' |
VirtualmachinesProperties
VirtualmachinesPropertiesHardwareProfile
VirtualmachinesPropertiesHardwareProfileDynamicMemoryConfig
Name |
Description |
Value |
maximumMemoryGB |
|
int |
minimumMemoryGB |
|
int |
targetMemoryBuffer |
|
int |
VirtualmachinesPropertiesNetworkProfile
VirtualmachinesPropertiesNetworkProfileNetworkInterfacesItem
Name |
Description |
Value |
id |
Name 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
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
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
Name |
Description |
Value |
enableTPM |
|
bool |
VirtualmachinesPropertiesStorageProfile
VirtualmachinesPropertiesStorageProfileDataDisksItem
Name |
Description |
Value |
name |
|
string |
VirtualmachinesPropertiesStorageProfileImageReference
Name |
Description |
Value |
name |
Name - Name of the image |
string |