Get on-demand logs for troubleshooting

> Applies to: Azure Stack HCI, version 23H2, AKS enabled by Azure Arc on VMware (preview)

This article describes how to collect full on-demand logs and send them to Microsoft support for troubleshooting issues with AKS enabled by Azure Arc.

Prepare the SSH key

Before log collection, you must have the SSH key you obtained when you created the cluster. It is usually saved under the ~/.ssh path; for example, C:\Users\HciiDeploymentUser.ssh\id_rsa. If the SSH key is lost, the log can't be collected.

Collect logs

You can collect logs using IPs or the kubeconfig parameter. If an IP is used, it collects the log from a particular node. If kubeconfig is used, it collects logs from all cluster nodes. This command generates a .zip file on the local disk. For other parameters, see the Az CLI reference.

az aksarc logs hci --ip 192.168.200.25 --credentials-dir ./.ssh --out-dir ./logs

Or

az aksarc logs hci --kubeconfig ./.kube/config --credentials-dir ./.ssh --out-dir ./logs

Send logs to Microsoft Support

Contact Microsoft Support to send the logs to Microsoft. If the environment is disconnected, you must recover the network first.

Next steps