Skip to content

Commit 3f061c2

Browse files
committed
tweaks
1 parent ecbee54 commit 3f061c2

File tree

3 files changed

+27
-25
lines changed

3 files changed

+27
-25
lines changed
-15.1 KB
Loading
66 Bytes
Loading

articles/network-watcher/packet-capture-manage.md

Lines changed: 27 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ ms.date: 01/23/2025
1111
#CustomerIntent: As an administrator, I want to capture IP packets to and from a virtual machine (VM) so I can review and analyze the data to help diagnose and solve network problems.
1212
---
1313

14-
# Manage packet captures for virtual machines with Azure Network Watcher
14+
# Manage packet captures with Azure Network Watcher
1515

1616
In this article, you learn how to use the Azure Network Watcher [packet capture](packet-capture-overview.md) feature to remotely configure, start, stop, download, and delete virtual machine packet captures.
1717

@@ -21,46 +21,46 @@ In this article, you learn how to use the Azure Network Watcher [packet capture]
2121

2222
- An Azure account with an active subscription. [Create an account for free](https://azure.microsoft.com/free/?WT.mc_id=A261C142F).
2323

24-
- Sign in to the [Azure portal](https://portal.azure.com) with your Azure account.
25-
26-
- A virtual machine (VM) with outbound TCP connectivity to: `169.254.169.254` over port `80` and `168.63.129.16` over port `8037`. The Network Watcher agent VM extension uses these IP addresses to communicate with the Azure platform.
24+
- A virtual machine (VM) or virtual machine scale set with outbound TCP connectivity to: `169.254.169.254` over port `80` and `168.63.129.16` over port `8037`. The Network Watcher agent VM extension uses these IP addresses to communicate with the Azure platform.
2725

2826
- Network Watcher Agent VM extension installed on the target virtual machine. Whenever you use Network Watcher packet capture in the Azure portal, the agent is automatically installed on the target VM or scale set if it wasn't previously installed. To update an already installed agent, see [Update Azure Network Watcher extension to the latest version](network-watcher-agent-update.md).
2927

30-
- An Azure storage account with VM outbound TCP connectivity to it over port `443`. If you don't have a storage account, see [Create a storage account using the Azure portal](../storage/common/storage-account-create.md?tabs=azure-portal&toc=/azure/network-watcher/toc.json).
28+
- An Azure storage account with VM outbound TCP connectivity to it over port `443`. If you don't have a storage account, see [Create a storage account using the Azure portal](../storage/common/storage-account-create.md?tabs=azure-portal&toc=/azure/network-watcher/toc.json). The storage account must be accessible from the subnet of the target virtual machine or scale set. For more information, see [Configure Azure Storage firewalls and virtual networks](../storage/common/storage-network-security?tabs=azure-portal&toc=/azure/network-watcher/toc.json).
29+
30+
- Sign in to the [Azure portal](https://portal.azure.com) with your Azure account.
3131

3232
# [**PowerShell**](#tab/powershell)
3333

3434
- An Azure account with an active subscription. [Create an account for free](https://azure.microsoft.com/free/?WT.mc_id=A261C142F).
3535

36+
- A virtual machine (VM) with outbound TCP connectivity to: `169.254.169.254` over port `80` and `168.63.129.16` over port `8037`. The Network Watcher agent VM extension uses these IP addresses to communicate with the Azure platform.
37+
38+
- Network Watcher Agent VM extension installed on the target virtual machine. For more information, see [Manage Network Watcher Agent VM extension for Windows](network-watcher-agent-windows.md?tabs=powershell) or [Manage Network Watcher Agent VM extension for Linux](network-watcher-agent-linux.md?tabs=powershell).
39+
40+
- An Azure storage account with VM outbound TCP connectivity to it over port `443`. If you don't have a storage account, see [Create a storage account using PowerShell](../storage/common/storage-account-create.md?tabs=azure-powershell&toc=/azure/network-watcher/toc.json). The storage account must be accessible from the subnet of the target virtual machine or scale set. For more information, see [Configure Azure Storage firewalls and virtual networks](../storage/common/storage-network-security?tabs=azure-powershell&toc=/azure/network-watcher/toc.json).
41+
3642
- Azure Cloud Shell or Azure PowerShell.
3743

3844
The steps in this article run the Azure PowerShell cmdlets interactively in [Azure Cloud Shell](/azure/cloud-shell/overview). To run the commands in the Cloud Shell, select **Open Cloud Shell** at the upper-right corner of a code block. Select **Copy** to copy the code and then paste it into Cloud Shell to run it. You can also run the Cloud Shell from within the Azure portal.
3945

4046
You can also install Azure PowerShell locally to run the cmdlets. This article requires the Az PowerShell module. For more information, see [How to install Azure PowerShell](/powershell/azure/install-azure-powershell). If you run PowerShell locally, sign in to Azure using the [Connect-AzAccount](/powershell/module/az.accounts/connect-azaccount) cmdlet.
4147

42-
- A virtual machine (VM) with outbound TCP connectivity to: `169.254.169.254` over port `80` and `168.63.129.16` over port `8037`. The Network Watcher agent VM extension uses these IP addresses to communicate with the Azure platform.
48+
# [**Azure CLI**](#tab/cli)
4349

44-
- Network Watcher Agent VM extension installed on the target virtual machine. For more information, see [Manage Network Watcher Agent VM extension for Windows](network-watcher-agent-windows.md?tabs=powershell) or [Manage Network Watcher Agent VM extension for Linux](network-watcher-agent-linux.md?tabs=powershell).
50+
- An Azure account with an active subscription. [Create an account for free](https://azure.microsoft.com/free/?WT.mc_id=A261C142F).
4551

46-
- An Azure storage account with VM outbound TCP connectivity to it over port `443`. If you don't have a storage account, see [Create a storage account using PowerShell](../storage/common/storage-account-create.md?tabs=azure-powershell&toc=/azure/network-watcher/toc.json).
52+
- A virtual machine (VM) with outbound TCP connectivity to: `169.254.169.254` over port `80` and `168.63.129.16` over port `8037`. The Network Watcher agent VM extension uses these IP addresses to communicate with the Azure platform.
4753

48-
# [**Azure CLI**](#tab/cli)
54+
- Network Watcher Agent VM extension installed on the target virtual machine. For more information, see [Manage Network Watcher Agent VM extension for Windows](network-watcher-agent-windows.md?tabs=cli) or [Manage Network Watcher Agent VM extension for Linux](network-watcher-agent-linux.md?tabs=cli).
4955

50-
- An Azure account with an active subscription. [Create an account for free](https://azure.microsoft.com/free/?WT.mc_id=A261C142F).
56+
- An Azure storage account with VM outbound TCP connectivity to it over port `443`. If you don't have a storage account, see [Create a storage account using PowerShell](../storage/common/storage-account-create.md?tabs=azure-cli&toc=/azure/network-watcher/toc.json). The storage account must be accessible from the subnet of the target virtual machine or scale set. For more information, see [Configure Azure Storage firewalls and virtual networks](../storage/common/storage-network-security?tabs=azure-cli&toc=/azure/network-watcher/toc.json).
5157

5258
- Azure Cloud Shell or Azure CLI.
5359

5460
The steps in this article run the Azure CLI commands interactively in [Azure Cloud Shell](/azure/cloud-shell/overview). To run the commands in the Cloud Shell, select **Open Cloud Shell** at the upper-right corner of a code block. Select **Copy** to copy the code, and paste it into Cloud Shell to run it. You can also run the Cloud Shell from within the Azure portal.
5561

5662
You can also [install Azure CLI locally](/cli/azure/install-azure-cli) to run the commands. If you run Azure CLI locally, sign in to Azure using the [az login](/cli/azure/reference-index#az-login) command.
5763

58-
- A virtual machine (VM) with outbound TCP connectivity to: `169.254.169.254` over port `80` and `168.63.129.16` over port `8037`. The Network Watcher agent VM extension uses these IP addresses to communicate with the Azure platform.
59-
60-
- Network Watcher Agent VM extension installed on the target virtual machine. For more information, see [Manage Network Watcher Agent VM extension for Windows](network-watcher-agent-windows.md?tabs=cli) or [Manage Network Watcher Agent VM extension for Linux](network-watcher-agent-linux.md?tabs=cli).
61-
62-
- An Azure storage account with VM outbound TCP connectivity to it over port `443`. If you don't have a storage account, see [Create a storage account using PowerShell](../storage/common/storage-account-create.md?tabs=azure-cli&toc=/azure/network-watcher/toc.json).
63-
6464
---
6565

6666
> [!NOTE]
@@ -76,24 +76,25 @@ If a network security group is associated to the network interface, or subnet th
7676

7777
:::image type="content" source="./media/network-watcher-portal-search.png" alt-text="Screenshot shows how to search for Network Watcher in the Azure portal." lightbox="./media/network-watcher-portal-search.png":::
7878

79-
1. Select **Packet capture** under **Network diagnostic tools**. Any existing packet captures are listed, regardless of their status.
79+
1. Select **Packet capture** under **Network diagnostic tools**, then select **+ Add** to create a packet capture.
8080

8181
:::image type="content" source="./media/packet-capture-manage/packet-capture.png" alt-text="Screenshot that shows Network Watcher packet capture in the Azure portal." lightbox="./media/packet-capture-manage/packet-capture.png":::
8282

83-
1. Select **+ Add** to create a packet capture. In **Add packet capture**, enter or select values for the following settings:
83+
1. In **Add packet capture**, enter or select values for the following settings:
8484

8585
| Setting | Value |
8686
| --- | --- |
8787
| **Basic Details** | |
8888
| Subscription | Select the Azure subscription of the virtual machine. |
8989
| Resource group | Select the resource group of the virtual machine. |
90-
| Target type | Select **Virtual machine**. |
91-
| Target instance | Select the virtual machine. |
90+
| Target type | Select **Virtual machine** or . **Virtual machine scale set**. |
91+
| Target virtual machine scale set | Select the virtual machine scale set. This option is available if you select Virtual machine scale set as the target type. |
92+
| Target instance | Select the virtual machine or scale set instance. |
9293
| Packet capture name | Enter a name or leave the default name. |
9394
| **Packet capture configuration** | |
94-
| Capture location | Select **Storage account**, **File**, or **Both**. |
95-
| Storage account | Select your **Standard** storage account<sup>1</sup>. <br> This option is available if you selected **Storage account** or **Both** as a capture location. |
96-
| Local file path | Enter a valid local file path where you want the capture to be saved in the target virtual machine. If you're using a Linux machine, the path must start with */var/captures*. <br> This option is available if you selected **File** or **Both** as a capture location. |
95+
| Capture location | Select **Storage account** (default option), **File**, or **Both**. |
96+
| Storage account | Select your **Standard** storage account<sup>1</sup>. <br> This option is available if you select **Storage account** or **Both** as a capture location. <br> The storage account must be in the same region as the target instance. |
97+
| Local file path | Enter a valid local file path where you want the capture to be saved in the target virtual machine. <br>If you're using a Linux machine, the path can start with `/var/captures`. <br>If you're using a Windows machine, the path can start with `C:\Captures`. <br> This option is available if you select **File** or **Both** as a capture location. |
9798
| Maximum bytes per packet | Enter the maximum number of bytes to be captured per each packet. All bytes are captured if left blank or 0 entered. |
9899
| Maximum bytes per session | Enter the total number of bytes that are captured. Once the value is reached the packet capture stops. Up to 1 GB is captured if left blank. |
99100
| Time limit (seconds) | Enter the time limit of the packet capture session in seconds. Once the value is reached the packet capture stops. Up to 5 hours (18,000 seconds) is captured if left blank. |
@@ -334,21 +335,22 @@ az storage blob download --container-name 'network-watcher-logs' --blob-url '/su
334335
Use [Remove-AzNetworkWatcherPacketCapture](/powershell/module/az.network/remove-aznetworkwatcherpacketcapture) to delete a packet capture resource.
335336

336337
```azurepowershell-interactive
337-
# Remove a packet capture resource.
338+
# Delete a packet capture resource.
338339
Remove-AzNetworkWatcherPacketCapture -Location 'eastus' -PacketCaptureName 'myVM_1'
339340
```
340341
# [**Azure CLI**](#tab/cli)
341342

342343
Use [az network watcher packet-capture delete](/cli/azure/network/watcher/packet-capture#az-network-watcher-packet-capture-delete) to delete a packet capture resource.
343344

344345
```azurecli-interactive
346+
# Delete a packet capture resource.
345347
az network watcher packet-capture delete --location 'eastus' --name 'myVM_1'
346348
```
347349

348350
---
349351

350352
> [!IMPORTANT]
351-
> Deleting a packet capture in Network Watcher doesn't delete the capture file from the storage account or the virtual machine. If you don't need the capture file anymore, you must manually delete it from the storage account to avoid incurring storage costs.
353+
> Deleting the packet capture resource in Network Watcher doesn't delete the capture file from the storage account or the virtual machine. If you don't need the capture file anymore, you must manually delete it from the storage account or virtual machine.
352354
353355
## Related content
354356

0 commit comments

Comments
 (0)