Capture Network Trace on Azure Virtual Machine (VM) - Step-by-Step Guide

Capture Network Trace on Azure Virtual Machine (VM)

Question

You create an Azure virtual machine named VM1 in a resource group named RG1.

You discover that VM1 performs slower than expected.

You need to capture a network trace on VM1.

What should you do?

Answers

Explanations

Click on the arrows to vote for the correct answer

A. B. C. D.

C

The performance diagnostics tool helps you troubleshoot performance issues that can affect a Windows or Linux virtual machine (VM). Supported troubleshooting scenarios include quick checks on known issues and best practices, and complex problems that involve slow VM performance or high usage of CPU, disk space, or memory.

Advanced performance analysis, included in the performance diagnostics tool, includes all checks in the performance analysis, and collects one or more of the traces, as listed in the following sections. Use this scenario to troubleshoot complex issues that require additional traces. Running this scenario for longer periods will increase the overall size of diagnostics output, depending on the size of the VM and the trace options that are selected.

https://docs.microsoft.com/en-us/azure/virtual-machines/troubleshooting/performance-diagnostics

To capture a network trace on an Azure virtual machine (VM), you can use the Connection troubleshoot feature or the diagnostic settings for the VM.

Option A: From Diagnostic settings for VM1, configure the performance counters to include network counters. This option is not a direct way to capture a network trace. Configuring performance counters will collect performance data such as CPU usage, memory usage, and network usage, but it will not capture a network trace.

Option B: From the VM1 blade, configure Connection troubleshoot. This option allows you to capture a network trace on the VM. Connection troubleshoot is a built-in feature in Azure that helps diagnose and troubleshoot network connectivity issues. To use this feature, follow these steps:

  1. Go to the VM1 blade in the Azure portal.
  2. Select the "Connection troubleshoot" option.
  3. Select "Start troubleshoot".
  4. Wait for the troubleshoot to complete.
  5. Once completed, you can download the network trace in .cap file format.

Option C: From the VM1 blade, install performance diagnostics and run advanced performance analysis. This option is not related to capturing a network trace. It is used to analyze the performance of the VM using the Performance Diagnostics extension, which can provide insights into resource utilization, application performance, and system diagnostics.

Option D: From Diagnostic settings for VM1, configure the log level of the diagnostic agent. This option is not related to capturing a network trace. It is used to configure the diagnostic settings for the VM, including log levels and metrics to collect.

Therefore, the correct option for capturing a network trace on an Azure VM is B. From the VM1 blade, configure Connection troubleshoot.