Virtual Machine Scale Set VMs - Get Instance View
Gets the status of a virtual machine from a VM scale set.
GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualMachines/{instanceId}/instanceView?api-version=2024-07-01
URI Parameters
Name | In | Required | Type | Description |
---|---|---|---|---|
instance
|
path | True |
string |
The instance ID of the virtual machine. |
resource
|
path | True |
string |
The name of the resource group. |
subscription
|
path | True |
string |
Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. |
vm
|
path | True |
string |
The name of the VM scale set. |
api-version
|
query | True |
string |
Client Api Version. |
Responses
Name | Type | Description |
---|---|---|
200 OK |
OK |
|
Other Status Codes |
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
Get instance view of a virtual machine from a VM scale set placed on a dedicated host group through automatic placement.
Sample request
Sample response
{
"platformUpdateDomain": 0,
"platformFaultDomain": 0,
"rdpThumbPrint": null,
"vmAgent": {
"vmAgentVersion": "Unknown",
"statuses": [
{
"code": "ProvisioningState/Unavailable",
"level": "Warning",
"displayStatus": "Not Ready",
"message": "VM status blob is found but not yet populated.",
"time": "2024-07-01T05:00:32+00:00"
}
],
"extensionHandlers": null
},
"disks": [
{
"name": "myOSDisk",
"encryptionSettings": null,
"statuses": [
{
"code": "ProvisioningState/succeeded",
"level": "Info",
"displayStatus": "Provisioning succeeded",
"message": null,
"time": "2024-07-01T04:58:58.0882815+00:00"
}
]
}
],
"extensions": null,
"assignedHost": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/hostGroups/myHostGroup/hosts/myHost",
"bootDiagnostics": null,
"statuses": [
{
"code": "ProvisioningState/succeeded",
"level": "Info",
"displayStatus": "Provisioning succeeded",
"message": null,
"time": "2020-06-05T04:59:58.1852966+00:00"
},
{
"code": "PowerState/running",
"level": "Info",
"displayStatus": "VM running",
"message": null,
"time": null
}
]
}
Definitions
Name | Description |
---|---|
Api |
Api error. |
Api |
Api error base. |
Boot |
Boot Diagnostics is a debugging feature which allows you to view Console Output and Screenshot to diagnose VM status. You can easily view the output of your console log. Azure also enables you to see a screenshot of the VM from the hypervisor. |
Cloud |
An error response from the Compute service. |
Disk |
Specifies the encryption settings for the OS Disk. |
Disk |
The disks information. |
Hyper |
The hypervisor generation of the Virtual Machine [V1, V2] |
Inner |
Inner error details. |
Instance |
Instance view status. |
Key |
Specifies the location of the key encryption key in Key Vault. |
Key |
Specifies the location of the disk encryption key, which is a Key Vault Secret. |
Maintenance |
The Last Maintenance Operation Result Code. |
Maintenance |
The Maintenance Operation status on the virtual machine. |
Status |
The level code. |
Sub |
The relative URL of the Key Vault containing the secret. |
Virtual |
The VM Agent running on the virtual machine. |
Virtual |
The virtual machine extension handler instance view. |
Virtual |
The extensions information. |
Virtual |
The health status for the VM. |
Virtual |
The instance view of a virtual machine scale set VM. |
ApiError
Api error.
Name | Type | Description |
---|---|---|
code |
string |
The error code. |
details |
The Api error details |
|
innererror |
The Api inner error |
|
message |
string |
The error message. |
target |
string |
The target of the particular error. |
ApiErrorBase
Api error base.
Name | Type | Description |
---|---|---|
code |
string |
The error code. |
message |
string |
The error message. |
target |
string |
The target of the particular error. |
BootDiagnosticsInstanceView
Boot Diagnostics is a debugging feature which allows you to view Console Output and Screenshot to diagnose VM status. You can easily view the output of your console log. Azure also enables you to see a screenshot of the VM from the hypervisor.
Name | Type | Description |
---|---|---|
consoleScreenshotBlobUri |
string |
The console screenshot blob URI. Note: This will not be set if boot diagnostics is currently enabled with managed storage. |
serialConsoleLogBlobUri |
string |
The serial console log blob Uri. Note: This will not be set if boot diagnostics is currently enabled with managed storage. |
status |
The boot diagnostics status information for the VM. Note: It will be set only if there are errors encountered in enabling boot diagnostics. |
CloudError
An error response from the Compute service.
Name | Type | Description |
---|---|---|
error |
Api error. |
DiskEncryptionSettings
Specifies the encryption settings for the OS Disk.
Minimum api-version: 2015-06-15
Name | Type | Description |
---|---|---|
diskEncryptionKey |
Specifies the location of the disk encryption key, which is a Key Vault Secret. |
|
enabled |
boolean |
Specifies whether disk encryption should be enabled on the virtual machine. |
keyEncryptionKey |
Specifies the location of the key encryption key in Key Vault. |
DiskInstanceView
The disks information.
Name | Type | Description |
---|---|---|
encryptionSettings |
Specifies the encryption settings for the OS Disk. |
|
name |
string |
The disk name. |
statuses |
The resource status information. |
HyperVGeneration
The hypervisor generation of the Virtual Machine [V1, V2]
Name | Type | Description |
---|---|---|
V1 |
string |
|
V2 |
string |
InnerError
Inner error details.
Name | Type | Description |
---|---|---|
errordetail |
string |
The internal error message or exception dump. |
exceptiontype |
string |
The exception type. |
InstanceViewStatus
Instance view status.
Name | Type | Description |
---|---|---|
code |
string |
The status code. |
displayStatus |
string |
The short localizable label for the status. |
level |
The level code. |
|
message |
string |
The detailed status message, including for alerts and error messages. |
time |
string |
The time of the status. |
KeyVaultKeyReference
Specifies the location of the key encryption key in Key Vault.
Name | Type | Description |
---|---|---|
keyUrl |
string |
The URL referencing a key encryption key in Key Vault. |
sourceVault |
The relative URL of the Key Vault containing the key. |
KeyVaultSecretReference
Specifies the location of the disk encryption key, which is a Key Vault Secret.
Name | Type | Description |
---|---|---|
secretUrl |
string |
The URL referencing a secret in a Key Vault. |
sourceVault |
The relative URL of the Key Vault containing the secret. |
MaintenanceOperationResultCodeTypes
The Last Maintenance Operation Result Code.
Name | Type | Description |
---|---|---|
MaintenanceAborted |
string |
|
MaintenanceCompleted |
string |
|
None |
string |
|
RetryLater |
string |
MaintenanceRedeployStatus
The Maintenance Operation status on the virtual machine.
Name | Type | Description |
---|---|---|
isCustomerInitiatedMaintenanceAllowed |
boolean |
True, if customer is allowed to perform Maintenance. |
lastOperationMessage |
string |
Message returned for the last Maintenance Operation. |
lastOperationResultCode |
The Last Maintenance Operation Result Code. |
|
maintenanceWindowEndTime |
string |
End Time for the Maintenance Window. |
maintenanceWindowStartTime |
string |
Start Time for the Maintenance Window. |
preMaintenanceWindowEndTime |
string |
End Time for the Pre Maintenance Window. |
preMaintenanceWindowStartTime |
string |
Start Time for the Pre Maintenance Window. |
StatusLevelTypes
The level code.
Name | Type | Description |
---|---|---|
Error |
string |
|
Info |
string |
|
Warning |
string |
SubResource
The relative URL of the Key Vault containing the secret.
Name | Type | Description |
---|---|---|
id |
string |
Resource Id |
VirtualMachineAgentInstanceView
The VM Agent running on the virtual machine.
Name | Type | Description |
---|---|---|
extensionHandlers |
The virtual machine extension handler instance view. |
|
statuses |
The resource status information. |
|
vmAgentVersion |
string |
The VM Agent full version. |
VirtualMachineExtensionHandlerInstanceView
The virtual machine extension handler instance view.
Name | Type | Description |
---|---|---|
status |
The extension handler status. |
|
type |
string |
Specifies the type of the extension; an example is "CustomScriptExtension". |
typeHandlerVersion |
string |
Specifies the version of the script handler. |
VirtualMachineExtensionInstanceView
The extensions information.
Name | Type | Description |
---|---|---|
name |
string |
The virtual machine extension name. |
statuses |
The resource status information. |
|
substatuses |
The resource status information. |
|
type |
string |
Specifies the type of the extension; an example is "CustomScriptExtension". |
typeHandlerVersion |
string |
Specifies the version of the script handler. |
VirtualMachineHealthStatus
The health status for the VM.
Name | Type | Description |
---|---|---|
status |
The health status information for the VM. |
VirtualMachineScaleSetVMInstanceView
The instance view of a virtual machine scale set VM.
Name | Type | Description |
---|---|---|
assignedHost |
string |
Resource id of the dedicated host, on which the virtual machine is allocated through automatic placement, when the virtual machine is associated with a dedicated host group that has automatic placement enabled. Minimum api-version: 2020-06-01. |
bootDiagnostics |
Boot Diagnostics is a debugging feature which allows you to view Console Output and Screenshot to diagnose VM status. You can easily view the output of your console log. Azure also enables you to see a screenshot of the VM from the hypervisor. |
|
computerName |
string |
Specifies the host OS name of the virtual machine. |
disks |
The disks information. |
|
extensions |
The extensions information. |
|
hyperVGeneration |
The hypervisor generation of the Virtual Machine [V1, V2] |
|
maintenanceRedeployStatus |
The Maintenance Operation status on the virtual machine. |
|
osName |
string |
The Operating System running on the hybrid machine. |
osVersion |
string |
The version of Operating System running on the hybrid machine. |
placementGroupId |
string |
The placement group in which the VM is running. If the VM is deallocated it will not have a placementGroupId. |
platformFaultDomain |
integer |
The Fault Domain count. |
platformUpdateDomain |
integer |
The Update Domain count. |
rdpThumbPrint |
string |
The Remote desktop certificate thumbprint. |
statuses |
The resource status information. |
|
vmAgent |
The VM Agent running on the virtual machine. |
|
vmHealth |
The health status for the VM. |