Share via


Virtual Machine Instances - Get

Gets a virtual machine instance

GET https://management.azure.com/{resourceUri}/providers/Microsoft.AzureStackHCI/virtualMachineInstances/default?api-version=2024-01-01

URI Parameters

Name In Required Type Description
resourceUri
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.

Responses

Name Type Description
200 OK

VirtualMachineInstance

OK

Other Status Codes

ErrorResponse

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

GetVirtualMachineInstance

Sample request

GET 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

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/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.ExtendedLocation/customLocations/dogfood-location",
    "type": "CustomLocation"
  },
  "properties": {
    "provisioningState": "Accepted",
    "storageProfile": {
      "imageReference": {
        "id": "/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.AzureStackHCI/galleryImages/test-gallery-image"
      },
      "vmConfigStoragePathId": "/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.AzureStackHCI/storageContainers/test-container"
    },
    "hardwareProfile": {
      "vmSize": "Default"
    },
    "osProfile": {
      "computerName": "luamaster",
      "adminUsername": "localadmin"
    },
    "networkProfile": {
      "networkInterfaces": [
        {
          "id": "test-nic"
        }
      ]
    }
  }
}

Definitions

Name Description
createdByType

The type of identity that created the resource.

DataDisks

adds data disks to the virtual machine instance

DynamicMemoryConfig
ErrorAdditionalInfo

The resource management error additional info.

ErrorDetail

The error detail.

ErrorResponse

Error response

ExtendedLocation

The complex type of the extended location.

ExtendedLocationTypes

The type of the extended location.

GuestAgentInstallStatus

Defines the status of a guest agent installation.

HardwareProfile

HardwareProfile - Specifies the hardware settings for the virtual machine instance.

HttpProxyConfiguration

HTTP Proxy configuration for the VM.

Identity

Identity for the resource.

ImageReference

Which Image to use for the virtual machine instance

InstanceViewStatus

Instance view status.

LinuxConfiguration

LinuxConfiguration - linux specific configuration values for the virtual machine instance

NetworkInterfaces

NetworkInterfaces - list of network interfaces to be attached to the virtual machine instance

NetworkProfile

NetworkProfile - describes the network configuration 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.

OsDisk

VHD to attach as OS disk

OsProfile

OsProfile - describes the configuration of the operating system and sets login data

PowerStateEnum

The power state of the virtual machine instance

ProvisioningStateEnum

Provisioning state of the virtual machine instance.

ProvisioningStatus
ResourceIdentityType

The identity type.

SecurityProfile

SecurityProfile - Specifies the security settings for the virtual machine instance.

SecurityTypes

Specifies the SecurityType of the virtual machine. EnableTPM and SecureBootEnabled must be set to true for SecurityType to function.

SshConfiguration

SSH configuration for Linux based VMs running on Azure

SshPublicKey

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]

StatusLevelTypes

The level code.

StatusTypes

The installation status of the hybrid machine agent installation.

StorageProfile

StorageProfile - contains information about the disks and storage information for the virtual machine instance

systemData

Metadata pertaining to creation and last modification of the resource.

UefiSettings
VirtualMachineConfigAgentInstanceView

The instance view of the VM Config Agent running on the virtual machine.

VirtualMachineInstance

The virtual machine instance resource definition.

VirtualMachineInstanceView

The instance view of a virtual machine.

VmSizeEnum
WindowsConfiguration

Windows Configuration for the virtual machine instance

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

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 complex type of the extended location.

Name Type Description
name

string

The name of the extended location.

type

ExtendedLocationTypes

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

ErrorDetail[]

Details about the error state.

lastStatusChange

string (date-time)

The time of the last status change.

status

StatusTypes

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

DynamicMemoryConfig

memoryMB

integer (int64)

RAM in MB for the virtual machine instance

processors

integer (int32)

number of processors for the virtual machine instance

vmSize

VmSizeEnum

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

ResourceIdentityType

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

StatusLevelTypes

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

LinuxConfiguration - linux specific configuration values for the virtual machine instance

Name Type Default value Description
disablePasswordAuthentication

boolean

DisablePasswordAuthentication - whether password authentication should be disabled

provisionVMAgent

boolean

True

Used to indicate whether Arc for Servers agent onboarding should be triggered during the virtual machine instance creation process.

provisionVMConfigAgent

boolean

True

Used to indicate whether the VM Config Agent should be installed during the virtual machine creation process.

ssh

SshConfiguration

Specifies the ssh key configuration for a Linux OS.

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[]

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

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.

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

LinuxConfiguration - linux specific configuration values for the virtual machine instance

windowsConfiguration

WindowsConfiguration

Windows Configuration for the virtual machine instance

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

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

SecurityTypes

Specifies the SecurityType of the virtual machine. EnableTPM and SecureBootEnabled must be set to true for SecurityType to function.

uefiSettings

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

SshPublicKey[]

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.

For creating ssh keys, see [Create SSH keys on Linux and Mac for Linux VMs in Azure]https://docs.microsoft.com/azure/virtual-machines/linux/create-ssh-keys-detailed).

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

DataDisks[]

adds data disks to the virtual machine instance

imageReference

ImageReference

Which Image to use for the virtual machine instance

osDisk

OsDisk

VHD to attach as OS disk

vmConfigStoragePathId

string (arm-id)

Id of the storage container that hosts the VM configuration file

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

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

createdByType

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

InstanceViewStatus[]

The resource status information.

vmConfigAgentVersion

string

The VM Config Agent full version.

VirtualMachineInstance

The virtual machine instance resource definition.

Name Type Description
extendedLocation

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

Identity for the resource.

name

string

The name of the resource

properties.guestAgentInstallStatus

GuestAgentInstallStatus

Guest agent install status.

properties.hardwareProfile

HardwareProfile

HardwareProfile - Specifies the hardware settings for the virtual machine instance.

properties.httpProxyConfig

HttpProxyConfiguration

HTTP Proxy configuration for the VM.

properties.instanceView

VirtualMachineInstanceView

The virtual machine instance view.

properties.networkProfile

NetworkProfile

NetworkProfile - describes the network configuration the virtual machine instance

properties.osProfile

OsProfile

OsProfile - describes the configuration of the operating system and sets login data

properties.provisioningState

ProvisioningStateEnum

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

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

PowerStateEnum

The power state of the virtual machine instance

properties.status.provisioningStatus

ProvisioningStatus

properties.storageProfile

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

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"

VirtualMachineInstanceView

The instance view of a virtual machine.

Name Type Description
vmAgent

VirtualMachineConfigAgentInstanceView

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

Windows Configuration for the virtual machine instance

Name Type Default value Description
enableAutomaticUpdates

boolean

Whether to EnableAutomaticUpdates on the machine

provisionVMAgent

boolean

True

Used to indicate whether Arc for Servers agent onboarding should be triggered during the virtual machine instance creation process.

provisionVMConfigAgent

boolean

True

Used to indicate whether the VM Config Agent should be installed during the virtual machine creation process.

ssh

SshConfiguration

Specifies the ssh key configuration for Windows OS.

timeZone

string

TimeZone for the virtual machine instance