1
1
---
2
2
title : " Azure Operator Nexus: VM Console Service"
3
3
description : Learn how to use the VM Console service.
4
- author : sshiba
5
- ms.author : sidneyshiba
6
- ms.service : azure
4
+ author : eak13
5
+ ms.author : ekarandjeff
6
+ ms.service : azure-operator-nexus
7
7
ms.topic : how-to
8
- ms.date : 06/16 /2023
8
+ ms.date : 08/04 /2023
9
9
ms.custom : template-how-to, devx-track-azurecli
10
10
---
11
11
@@ -38,19 +38,20 @@ This guide helps you to:
38
38
39
39
## Setting variables
40
40
41
- To help set up the environment for access to Virtual Machines, define these environment variables that are used throughout this guide.
41
+ To help set up the environment for access to Virtual Machines, define these environment variables used by the various commands throughout this guide.
42
42
43
43
> [!NOTE]
44
44
> These environment variable values do not reflect a real deployment and users MUST change them to match their environments.
45
+ >
46
+ > It should be noted that the first set of variables in the section below are for the **Cluster Manager** not the Cluster.
45
47
46
48
```bash
47
49
# Cluster Manager environment variables
48
- export CM_CLUSTER_NAME="contorso-cluster-manager-1234"
49
- export CM_MANAGED_RESOURCE_GROUP="contorso-cluster-manager-1234-rg"
50
- export CM_EXTENDED_LOCATION="/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterManagerExtendedLocationName"
51
- export CM_HOSTED_RESOURCES_RESOURCE_GROUP="my-contorso-console-rg"
50
+ export CLUSTER_MANAGER_NAME="contorso-cluster-manager-1234"
51
+ export CLUSTER_MANAGER_RG="contorso-cluster-manager-1234-rg"
52
+ export CLUSTER_MANAGER_EXTENDED_LOC="/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterManagerExtendedLocationName"
52
53
53
- # Your Console resource enviroment variables
54
+ # Your Console resource environment variables
54
55
export VIRTUAL_MACHINE_NAME="my-undercloud-vm"
55
56
export VM_RESOURCE_GROUP="my-vm-rg"
56
57
export CONSOLE_PUBLIC_KEY="xxxx-xxxx-xxxxxx-xxxx"
@@ -59,7 +60,6 @@ To help set up the environment for access to Virtual Machines, define these envi
59
60
# your environment variables
60
61
export PRIVATE_ENDPOINT_RG="my-work-env-rg"
61
62
export PRIVATE_ENDPOINT_NAME="my-work-env-ple"
62
- export PRIVATE_ENDPOINT_REGION="eastus"
63
63
export PRIVATE_ENDPOINT_VNET="my-work-env-ple-vnet"
64
64
export PRIVATE_ENDPOINT_SUBNET="my-work-env-ple-subnet"
65
65
export PRIVATE_ENDPOINT_CONNECTION_NAME="my-contorse-ple-pls-connection"
@@ -81,7 +81,7 @@ This section provides a step-by-step guide to help you to establish a private ne
81
81
82
82
``` bash
83
83
# retrieve the infrastructure resource group of the AKS cluster
84
- export pls_resource_group=$( az aks show --name ${CM_CLUSTER_NAME } -g ${CM_MANAGED_RESOURCE_GROUP } --query " nodeResourceGroup" -o tsv)
84
+ export pls_resource_group=$( az aks show --name ${CLUSTER_MANAGER_NAME } -g ${CLUSTER_MANAGER_RG } --query " nodeResourceGroup" -o tsv)
85
85
86
86
# retrieve the Private Link Service resource id
87
87
export pls_resourceid=$( az network private-link-service show \
@@ -107,9 +107,9 @@ This section provides a step-by-step guide to help you to establish a private ne
107
107
1 . Retrieve the private IP address allocated to the PLE, which you need when establishing a session.
108
108
109
109
``` bash
110
- ple_interface_id=$( az network private-endpoint list --resource-group ${PRIVATE_ENDPOINT_NAME} -rg --query " [0].networkInterfaces[0].id" -o tsv)
110
+ export ple_interface_id=$( az network private-endpoint list --resource-group ${PRIVATE_ENDPOINT_RG} --query " [0].networkInterfaces[0].id" -o tsv)
111
111
112
- sshmux_ple_ip=$( az network nic show --ids $ple_interface_id --query ' ipConfigurations[0].privateIPAddress' -o tsv)
112
+ export sshmux_ple_ip=$( az network nic show --ids $ple_interface_id --query ' ipConfigurations[0].privateIPAddress' -o tsv)
113
113
114
114
echo " sshmux_ple_ip: ${sshmux_ple_ip} "
115
115
```
@@ -122,15 +122,15 @@ This section provides step-by-step guide to help you to create a Console resourc
122
122
123
123
:::image type="content" source="media/vm-console-resource.png" alt-text="Diagram of VM Console Resource." lightbox="media/vm-console-resource.png":::
124
124
125
- 1 . Before you can establish a session with a VM, a Console resource must be created for that VM.
125
+ 1 . Before you can establish a session with a VM, create the Console resource for that VM.
126
126
127
127
``` bash
128
128
az networkcloud virtualmachine console create \
129
129
--virtual-machine-name " ${VIRTUAL_MACHINE_NAME} " \
130
130
--resource-group " ${VM_RESOURCE_GROUP} " \
131
- --extended-location name=" ${CM_EXTENDED_LOCATION } " type=" CustomLocation" \
131
+ --extended-location name=" ${CLUSTER_MANAGER_EXTENDED_LOC } " type=" CustomLocation" \
132
132
--enabled True \
133
- --key-data " ${CONSOLE_PUBLIC_KEY} " \
133
+ --ssh-public-key key-data " ${CONSOLE_PUBLIC_KEY} " \
134
134
[--expiration " ${CONSOLE_EXPIRATION_TIME} " ]
135
135
```
136
136
0 commit comments