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-baremetal-run-data-extract.md
+97-26Lines changed: 97 additions & 26 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,19 +1,19 @@
1
1
---
2
2
title: Troubleshoot bare metal machine issues using the `az networkcloud baremetalmachine run-data-extract` command for Azure Operator Nexus
3
3
description: Step by step guide on using the `az networkcloud baremetalmachine run-data-extract` to extract data from a bare metal machine for troubleshooting and diagnostic purposes.
4
-
author: DanCrank
5
-
ms.author: danielcrank
4
+
author: eak13
5
+
ms.author: ekarandjeff
6
6
ms.service: azure-operator-nexus
7
7
ms.topic: how-to
8
-
ms.date: 10/11/2024
8
+
ms.date: 10/16/2024
9
9
ms.custom: template-how-to, devx-track-azurecli
10
10
---
11
11
12
12
# Troubleshoot bare metal machine issues using the `az networkcloud baremetalmachine run-data-extract` command
13
13
14
14
There might be situations where a user needs to investigate and resolve issues with an on-premises bare metal machine. Azure Operator Nexus provides a prescribed set of data extract commands via `az networkcloud baremetalmachine run-data-extract`. These commands enable users to get diagnostic data from a bare metal machine.
15
15
16
-
The command produces an output file containing the results of the data extract. Users should configure the Cluster resource with a storage account and identity that has access to the storage account to receive the output. There's a deprecated method of sending data to the Cluster Manager storage account if a storage account hasn't been provided on the Cluster. The Cluster Manager's storage account will be disabled in a future release as using a separate storage account is more secure.
16
+
The command produces an output file containing the results of the data extract. By default, the data is sent to the Cluster Manager storage account. There's also a preview method where users can configure the Cluster resource with a storage account and identity that has access to the storage account to receive the output.
17
17
18
18
## Prerequisites
19
19
@@ -22,17 +22,51 @@ The command produces an output file containing the results of the data extract.
22
22
- The syntax for these commands is based on the 0.3.0+ version of the `az networkcloud` CLI.
23
23
- Get the Cluster Managed Resource group name (cluster_MRG) that you created for Cluster resource.
24
24
25
-
## Create and configure storage resources (customer-managed storage)
25
+
## Verify access to the Cluster Manager storage account
26
+
27
+
> [!NOTE]
28
+
> The Cluster Manager storage account output method will be deprecated in the future once Cluster on-boarding to Trusted Services is complete and the user managed storage option is fully supported.
29
+
30
+
If using the Cluster Manager storage method, verify you have access to the Cluster Manager's storage account:
31
+
32
+
1. From Azure portal, navigate to Cluster Manager's Storage account.
33
+
1. In the Storage account details, select **Storage browser** from the navigation menu on the left side.
34
+
1. In the Storage browser details, select on **Blob containers**.
35
+
1. If you encounter a `403 This request is not authorized to perform this operation.` while accessing the storage account, storage account’s firewall settings need to be updated to include the public IP address.
36
+
1. Request access by creating a support ticket via Portal on the Cluster Manager resource. Provide the public IP address that requires access.
37
+
38
+
## **PREVIEW:** Send command output to a user specified storage account
39
+
40
+
> [!IMPORTANT]
41
+
> Please note that this method of specifying a user storage account for command output is in preview. **This method should only be used with user storage accounts that do not have firewall enabled.** If your environment requires the storage account firewall be enabled, use the existing Cluster Manager output method.
42
+
43
+
### Create and configure storage resources
26
44
27
45
1. Create a storage account, or identify an existing storage account that you want to use. See [Create an Azure storage account](/azure/storage/common/storage-account-create?tabs=azure-portal).
28
-
2. In the storage account, create a blob storage container. See [Create a container](/azure/storage/blobs/storage-quickstart-blobs-portal#create-a-container).
29
-
3. Assign the "Storage Blob Data Contributor" role to users and managed identities which need access to the run-data-extract output. See [Assign an Azure role for access to blob data](/azure/storage/blobs/assign-azure-role-data-access?tabs=portal). The role must also be assigned to either a user-assigned managed identity or the cluster's own system-assigned managed identity. For more information on managed identities, see [Managed identities for Azure resources](/entra/identity/managed-identities-azure-resources/overview).
46
+
1. Create a blob storage container in the storage account. See [Create a container](/azure/storage/blobs/storage-quickstart-blobs-portal#create-a-container).
47
+
1. Assign the "Storage Blob Data Contributor" role to users and managed identities which need access to the run-data-extract output.
48
+
1. See [Assign an Azure role for access to blob data](/azure/storage/blobs/assign-azure-role-data-access?tabs=portal). The role must also be assigned to either a user-assigned managed identity or the cluster's own system-assigned managed identity.
49
+
1. For more information on managed identities, see [Managed identities for Azure resources](/entra/identity/managed-identities-azure-resources/overview).
50
+
1. If using the Cluster's system assigned identity, the system assigned identity needs to be added to the cluster before it can be granted access.
51
+
1. When assigning a role to the cluster's system-assigned identity, make sure you select the resource with the type "Cluster (Operator Nexus)."
30
52
31
-
When assigning a role to the cluster's system-assigned identity, make sure you select the resource with the type "Cluster (Operator Nexus)."
53
+
### Configure the cluster to use a user-assigned managed identity for storage access
32
54
33
-
## Configure the cluster to use a user-assigned managed identityfor storage access
55
+
Use this command to create a cluster with a user managed storage account and user-assigned identity. Note this example is an abbreviated command that just highlights the fields pertinent for adding the user managed storage. It isn't the full cluster create command.
34
56
35
-
Use this command to configure the cluster for a user-assigned identity:
57
+
```azurecli-interactive
58
+
az networkcloud cluster create --name "<cluster-name>" \
Use this command to configure an existing cluster for a user provided storage account and user-assigned identity. The update command can also be used to change the storage account location and identity if needed.
36
70
37
71
```azurecli-interactive
38
72
az networkcloud cluster update --name "<cluster-name>" \
The identity resource ID can be found by clicking "JSON view" on the identity resource; the ID is at the top of the panel that appears. The container URL can be found on the Settings -> Properties tab of the container resource.
81
+
### Configure the cluster to use a system-assigned managed identity for storage access
48
82
49
-
## Configure the cluster to use a system-assigned managed identityfor storage access
83
+
Use this command to create a cluster with a user managed storage account and system assigned identity. Note this example is an abbreviated command that just highlights the fields pertinent for adding the user managed storage. It isn't the full cluster create command.
50
84
51
-
Use this command to configure the cluster to use its own system-assigned identity:
85
+
```azurecli-interactive
86
+
az networkcloud cluster create --name "<cluster-name>" \
Use this command to configure an existing cluster for a user provided storage account and to use its own system-assigned identity. The update command can also be used to change the storage account location.
52
97
53
98
```azurecli-interactive
54
99
az networkcloud cluster update --name "<cluster-name>" \
To change the cluster from a user-assigned identity to a system-assigned identity, the CommandOutputSettings must first be cleared using the command in the next section, then set using this command.
63
108
64
-
## Clear the cluster's CommandOutputSettings
109
+
###Clear the cluster's CommandOutputSettings
65
110
66
111
The CommandOutputSettings can be cleared, directing run-data-extract output back to the cluster manager's storage. However, it isn't recommended since it's less secure, and the option will be removed in a future release.
### View the principal ID for the managed identity
79
124
80
-
If using the deprecated Cluster Manager storage method, verify you have access to the Cluster Manager's storage account
125
+
The identity resource ID can be found by selecting "JSON view" on the identity resource; the ID is at the top of the panel that appears. The container URL can be found on the Settings -> Properties tab of the container resource.
81
126
82
-
1. From Azure portal, navigate to Cluster Manager's Storage account.
83
-
1. In the Storage account details, select **Storage browser** from the navigation menu on the left side.
84
-
1. In the Storage browser details, select on **Blob containers**.
85
-
1. If you encounter a `403 This request is not authorized to perform this operation.` while accessing the storage account, storage account’s firewall settings need to be updated to include the public IP address.
86
-
1. Request access by creating a support ticket via Portal on the Cluster Manager resource. Provide the public IP address that requires access.
127
+
The CLI can also be used to view the identity and the associated principal ID data within the cluster.
128
+
129
+
Example:
130
+
131
+
```console
132
+
az networkcloud cluster show --ids /subscriptions/<Subscription ID>/resourceGroups/<Cluster Resource Group Name>/providers/Microsoft.NetworkCloud/clusters/<Cluster Name>
@@ -136,7 +207,7 @@ In the response, the operation performs asynchronously and returns an HTTP statu
136
207
137
208
### Hardware Support Data Collection
138
209
139
-
This example executes the `hardware-support-data-collection` command and get `SysInfo` and `TTYLog` logs from the Dell Server. The script executes a `racadm supportassist collect` command on the designated baremetal machine. The resulting tar.gz file contains the zipped extract command file outputs in `hardware-support-data-<timestamp>.zip`.
210
+
This example executes the `hardware-support-data-collection` command and get `SysInfo` and `TTYLog` logs from the Dell Server. The script executes a `racadm supportassist collect` command on the designated bare metal machine. The resulting tar.gz file contains the zipped extract command file outputs in `hardware-support-data-<timestamp>.zip`.
140
211
141
212
```azurecli
142
213
az networkcloud baremetalmachine run-data-extract --name "bareMetalMachineName" \
The CVE data is refreshed per container image every 24 hours or when there's a change to the Kubernetes resource referencing the image.
593
664
594
-
## Viewing the Output
665
+
## Viewing the output
595
666
596
-
The command provides another command (if using customer provided storage) or a link (if using cluster manager storage) to download the full output. The tar.gz file also contains the zipped extract command file outputs. Download the output file from the storage blob to a local directory by specifying the directory path in the optional argument `--output-directory`.
667
+
The command provides a link (if using cluster manager storage) or another command (if using user provided storage) to download the full output. The tar.gz file also contains the zipped extract command file outputs. Download the output file from the storage blob to a local directory by specifying the directory path in the optional argument `--output-directory`.
597
668
598
669
> [!WARNING]
599
670
> Using the `--output-directory` argument will overwrite any files in the local directory that have the same name as the new files being created.
600
671
601
672
> [!NOTE]
602
-
> Storage Account could be locked resulting in `403 This request is not authorized to perform this operation.` due to networking or firewall restrictions. Refer to the [customer-managed storage](#create-and-configure-storage-resources-customer-managed-storage) or [cluster manager storage](#verify-storage-account-access-cluster-manager-storage) sections for procedures to verify access.
673
+
> Storage Account could be locked resulting in `403 This request is not authorized to perform this operation.` due to networking or firewall restrictions. Refer to the [cluster manager storage](#verify-access-to-the-cluster-manager-storage-account) or the [user managed storage](#create-and-configure-storage-resources) sections for procedures to verify access.
0 commit comments