Skip to main content

virtual_machines

Creates, updates, deletes, gets or lists a virtual_machines resource.

Overview

Namevirtual_machines
TypeResource
Idazure.lab_services.virtual_machines

Fields

NameDatatypeDescription
claimed_by_user_idtextfield from the properties object
connection_profiletextfield from the properties object
labNametextfield from the properties object
provisioning_statetextfield from the properties object
resourceGroupNametextfield from the properties object
resource_operation_errortextfield from the properties object
statetextfield from the properties object
subscriptionIdtextfield from the properties object
system_datatextfield from the properties object
virtualMachineNametextfield from the properties object
vm_typetextfield from the properties object

Methods

NameAccessible byRequired ParamsDescription
getSELECTlabName, resourceGroupName, subscriptionId, virtualMachineNameReturns the properties for a lab virtual machine.
list_by_labSELECTlabName, resourceGroupName, subscriptionIdReturns a list of all virtual machines for a lab.
redeployEXEClabName, resourceGroupName, subscriptionId, virtualMachineNameAction to redeploy a lab virtual machine to a different compute node. For troubleshooting connectivity.
reimageEXEClabName, resourceGroupName, subscriptionId, virtualMachineNameRe-image a lab virtual machine. The virtual machine will be deleted and recreated using the latest published snapshot of the reference environment of the lab.
reset_passwordEXEClabName, resourceGroupName, subscriptionId, virtualMachineName, data__password, data__usernameResets a lab virtual machine password.
startEXEClabName, resourceGroupName, subscriptionId, virtualMachineNameAction to start a lab virtual machine.
stopEXEClabName, resourceGroupName, subscriptionId, virtualMachineNameAction to stop a lab virtual machine.

SELECT examples

Returns a list of all virtual machines for a lab.

SELECT
claimed_by_user_id,
connection_profile,
labName,
provisioning_state,
resourceGroupName,
resource_operation_error,
state,
subscriptionId,
system_data,
virtualMachineName,
vm_type
FROM azure.lab_services.vw_virtual_machines
WHERE labName = '{{ labName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}';