You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/operator-nexus/howto-use-vm-console-service.md
+16-14Lines changed: 16 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,17 +1,17 @@
1
1
---
2
2
title: "Azure Operator Nexus: VM Console Service"
3
-
description: Learn how to use the VM Console service.
3
+
description: Learn how to use the VM Console service to remotely access Nexus Virtual Machine through ssh from your environment.
4
4
author: sshiba
5
5
ms.author: sidneyshiba
6
6
ms.service: azure-operator-nexus
7
7
ms.topic: how-to
8
-
ms.date: 10/11/2023
8
+
ms.date: 10/25/2024
9
9
ms.custom: template-how-to, devx-track-azurecli
10
10
---
11
11
12
12
# Introduction to the Virtual Machine console service
13
13
14
-
The Virtual Machine (VM) console service provides managed access to a VM hosted in an Operator Nexus Instance. It relies on the Azure Private Link Service (PLS) to establish a private network connection between the user's network and the Azure Operator Nexus Cluster Manager's private network.
14
+
The Virtual Machine (VM) console service provides managed access to a VM hosted in an Operator Nexus Instance. It uses Azure Private Link Service (PLS) to provide network connectivity on Azure private network. The VM Console service is a secure and private way to access a VM without exposing it to the public internet.
15
15
16
16
:::image type="content" source="media/vm-console-service.png" alt-text="Diagram of VM Console service." lightbox="media/vm-console-service.png":::
17
17
@@ -23,7 +23,7 @@ This guide helps you to:
23
23
24
24
1. Establish a secure private network connectivity between your network and the Cluster Manager's private network.
25
25
1. Create a Console resource in your workload/tenant resource group using the `az networkcloud virtualmachine console` CLI command.
26
-
1.Initiate an SSH session to connect to the Virtual Machine's Console.
26
+
1.Start an SSH session to connect to the Virtual Machine's Console.
27
27
28
28
> [!NOTE]
29
29
> In order to avoid passing the `--subscription` parameter to each Azure CLI command, execute the following command:
@@ -44,15 +44,17 @@ To help set up the environment for access to Virtual Machines, define these envi
44
44
> These environment variable values do not reflect a real deployment and users MUST change them to match their environments.
45
45
>
46
46
> It should be noted that the first set of variables in the section below are for the **Cluster Manager** not the Cluster.
47
+
> The CM_EXTENDED_LOCATION value can be found with the command `az networkcloud virtualmachine show --name <virtual machine name> --resource-group <virtual machine's resource group> --query "consoleExtendedLocation" | jq -r '.consoleExtendedLocation.name'`.
47
48
48
49
```bash
49
50
# CM_HOSTED_RESOURCES_RESOURCE_GROUP: Cluster Manager resource group name
# CONSOLE_PUBLIC_KEY: Public Key matching Private Key to be used when establish `ssh` session, e.g., `ssh -i $HOME/.ssh/id-rsa`
57
59
export CONSOLE_PUBLIC_KEY="xxxx-xxxx-xxxxxx-xxxx"
58
60
# CONSOLE_EXPIRATION_TIME: Expiration date and time (RFC3339 format) for any `ssh` session with a virtual machine.
@@ -74,13 +76,13 @@ To help set up the environment for access to Virtual Machines, define these envi
74
76
75
77
## Creating Console Resource
76
78
77
-
The Console resource provides the information about the VM such as VM name, public SSH key, expiration date for the SSH session, etc.
79
+
The Console resource provides the information about the Nexus VM. It provides the VM name, public SSH key, expiration date for the SSH session, and so on.
78
80
79
81
This section provides step-by-step guide to help you to create a Console resource using Azure CLI commands.
80
82
81
83
:::image type="content" source="media/vm-console-resource.png" alt-text="Diagram of VM Console Resource." lightbox="media/vm-console-resource.png":::
82
84
83
-
1.In order to create a ***Console*** resource in the Cluster Manager, you will need to collect some information, e.g., resource group (CM_HOSTED_RESOURCES_RESOURCE_GROUP) and custom location (CM_EXTENDED_LOCATION). You have to provide the resource group but you can retrieve the custom location if you have access rights to excute the commands listed below.
85
+
1.To create a ***Console*** resource in the Cluster Manager, you'll need to collect some information, for example, resource group (CM_HOSTED_RESOURCES_RESOURCE_GROUP) and custom location (CM_EXTENDED_LOCATION). You have to provide the resource group but you can retrieve the custom location if you have access rights to excute the following commands:
84
86
85
87
```bash
86
88
export cluster_manager_resource_id=$(az resource list -g ${CM_HOSTED_RESOURCES_RESOURCE_GROUP} --query "[?type=='Microsoft.NetworkCloud/clusterManagers'].id" --output tsv)
@@ -99,7 +101,7 @@ This section provides step-by-step guide to help you to create a Console resourc
99
101
[--expiration "${CONSOLE_EXPIRATION_TIME}"]
100
102
```
101
103
102
-
If you omit the `--expiration` parameter, the expiration will be defaulted to one day after the creation of the Console resource. Also note that the `expiration` date &time format **must**comply with RFC3339 otherwise the creation of the Console resource fails.
104
+
If you omit the `--expiration` parameter, the expiration will be defaulted to one day after the creation of the Console resource. Also note that the `expiration` date &time format **must**follow RFC3339 (e.g., 2024-10-04T14:48:00Z) otherwise the creation of the Console resource fails.
103
105
104
106
> [!NOTE]
105
107
> For a complete synopsis for this command, invoke `az networkcloud console create --help`.
@@ -127,7 +129,7 @@ This section provides step-by-step guide to help you to create a Console resourc
127
129
128
130
## Establishing Private Network Connectivity
129
131
130
-
In order to establish a secure session with a Virtual Machine, you need to establish private network connectivity between your network and the Cluster Manager's private network.
132
+
To establish a secure session with a Virtual Machine, you need to establish private network connectivity between your network and the Cluster Manager's private network.
131
133
132
134
This private network relies on the Azure Private Link Endpoint (PLE) and the Azure Private Link Service (PLS).
133
135
@@ -167,7 +169,7 @@ This section provides a step-by-step guide to help you to establish a private ne
167
169
168
170
At this point, you have the `virtual_machine_access_id` and the `sshmux_ple_ip`. This input is the info needed for establishing a session with the VM.
169
171
170
-
The VM Console service is a `ssh` server that "relays" the session to the designated VM. The `sshmux_ple_ip` indirectly references the VM Console service and the `virtual_machine_access_id` the identifier for the VM.
172
+
The VM Console service is a `ssh` server that "relays" the session to a Nexus VM. The `sshmux_ple_ip` indirectly references the VM Console service and the `virtual_machine_access_id` the identifier for the VM.
171
173
172
174
> [!IMPORTANT]
173
175
> The VM Console service listens to port `2222`, therefore you **must** specify this port number in the `ssh` command.
@@ -185,7 +187,7 @@ The VM Console service was designed to allow **only** one session per Virtual Ma
185
187
186
188
## Updating Console Resource
187
189
188
-
You can disable the session to a given VM by updating the expiration date/time and/or updating the public SSH key used when creating the session with a VM.
190
+
You can disable the session to a VM by updating the expiration date/time and the public SSH key used when creating the session with a VM.
189
191
190
192
```bash
191
193
az networkcloud virtualmachine console update \
@@ -196,14 +198,14 @@ az networkcloud virtualmachine console update \
196
198
[--expiration "${CONSOLE_EXPIRATION_TIME}"]
197
199
```
198
200
199
-
If you want to disable access to a VM, you need to update the Console resource with the parameter `enabled False`. This update closes any existing session and restricts any subsequent sessions.
201
+
If you want to disable access to a VM, you need to update the Console resource with the parameter `enabled False`. This update closes any existing session and restricts any later sessions.
200
202
201
203
> [!NOTE]
202
204
> Before creating a session to a VM, the corresponding Console resource **must** be set to `--enabled True`.
203
205
204
206
When a Console `--expiration`time expires, it closes any session corresponding the Console resource. You'll need to update the expiration time with a future value so that you can establish a new session.
205
207
206
-
When you update the Console's public SSH key, the VM Console service closes any active session referenced by the Console resource. You have to provide a matching private SSH key matching the new public key when you establish a new session.
208
+
When you update the Console's public SSH key, the VM Console service closes all active sessions. You present a new private SSH key to create a new session.
0 commit comments