Skip to content

Commit bf28713

Browse files
Merge pull request #294267 from halkazwini/nw-packet
Packet capture note about saved file to storage account
2 parents 8c53ea7 + 70e17ef commit bf28713

File tree

1 file changed

+17
-22
lines changed

1 file changed

+17
-22
lines changed

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

Lines changed: 17 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
---
2-
title: Manage packet captures for VMs
2+
title: Manage packet captures
33
titleSuffix: Azure Network Watcher
44
description: Learn how to start, stop, download, and delete Azure virtual machines packet captures with the packet capture feature of Network Watcher.
55
author: halkazwini
66
ms.author: halkazwini
77
ms.service: azure-network-watcher
88
ms.topic: how-to
9-
ms.date: 01/31/2025
9+
ms.date: 02/07/2025
1010

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 with Azure Network Watcher
14+
# Start, stop, download, and delete packet captures with Azure Network Watcher
1515

16-
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.
16+
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 packet captures.
1717

1818
## Prerequisites
1919

@@ -298,9 +298,9 @@ The following example is the output from the `az network watcher packet-capture
298298

299299
## Download a packet capture
300300

301-
# [**Portal**](#tab/portal)
301+
After your packet capture session completes, the resulting capture file is saved to Azure Storage, a local file on the target virtual machine, or both. The storage destination for the packet capture is specified during its creation. For more information, see [Start a packet capture](#start-a-packet-capture) section.
302302

303-
After concluding your packet capture session, the resulting capture file is saved to Azure storage, a local file on the target virtual machine or both. The storage destination for the packet capture is specified during its creation. For more information, see [Start a packet capture](#start-a-packet-capture) section.
303+
# [**Portal**](#tab/portal)
304304

305305
To download a packet capture file saved to Azure storage, follow these steps:
306306

@@ -312,19 +312,14 @@ To download a packet capture file saved to Azure storage, follow these steps:
312312

313313
1. In the blob page, select **Download**.
314314

315-
> [!NOTE]
316-
> You can also download capture files from the storage account container using the Azure portal or Storage Explorer<sup>1</sup> at the following path:
317-
> ```
318-
> https://{storageAccountName}.blob.core.windows.net/network-watcher-logs/subscriptions/{subscriptionId}/resourcegroups/{storageAccountResourceGroup}/providers/microsoft.compute/virtualmachines/{virtualMachineName}/{year}/{month}/{day}/packetcapture_{UTCcreationTime}.cap
319-
> ```
320-
> <sup>1</sup> Storage Explorer is a standalone app that you can conveniently use to access and work with Azure Storage data. For more information, see [Get started with Storage Explorer](../vs-azure-tools-storage-manage-with-storage-explorer.md).
321315

322-
To download a packet capture file saved to the virtual machine (VM), connect to the VM and download the file from the local path specified during the packet capture creation.
316+
You can also download capture files by directly going to the storage account container at the following path:
317+
```
318+
https://{storageAccountName}.blob.core.windows.net/network-watcher-logs/subscriptions/{subscriptionId}/resourcegroups/{storageAccountResourceGroup}/providers/microsoft.compute/virtualmachines/{virtualMachineName}/{year}/{month}/{day}/packetcapture_{UTCcreationTime}.cap
319+
```
323320

324321
# [**PowerShell**](#tab/powershell)
325322

326-
After concluding your packet capture session, the resulting capture file is saved to Azure storage, a local file on the target virtual machine or both. The storage destination for the packet capture is specified during its creation. For more information, see [Start a packet capture](#start-a-packet-capture) section.
327-
328323
If a storage account is specified, capture files are saved to the storage account at the following path:
329324

330325
```url
@@ -338,13 +333,8 @@ To download a packet capture from Azure storage to the local disk, use [Get-AzSt
338333
Get-AzStorageBlobContent -Container 'network-watcher-logs' -Blob '/subscriptions/aaaa0a0a-bb1b-cc2c-dd3d-eeeeee4e4e4e/resourcegroups/myresourcegroup/providers/microsoft.compute/virtualmachines/myvm/2024/01/25/packetcapture_22_44_54_342.cap' -Destination 'C:\Capture\myVM_1.cap'
339334
```
340335

341-
> [!NOTE]
342-
> You can also download the capture file from the storage account container using the Azure Storage Explorer. Storage Explorer is a standalone app that you can conveniently use to access and work with Azure Storage data. For more information, see [Get started with Storage Explorer](../vs-azure-tools-storage-manage-with-storage-explorer.md).
343-
344336
# [**Azure CLI**](#tab/cli)
345337

346-
After concluding your packet capture session, the resulting capture file is saved to Azure storage, a local file on the target virtual machine or both. The storage destination for the packet capture is specified during its creation. For more information, see [Start a packet capture](#start-a-packet-capture) section.
347-
348338
If a storage account is specified, capture files are saved to the storage account at the following path:
349339

350340
```url
@@ -358,10 +348,15 @@ To download a packet capture from Azure storage to the local disk, use [az stora
358348
az storage blob download --container-name 'network-watcher-logs' --blob-url '/subscriptions/aaaa0a0a-bb1b-cc2c-dd3d-eeeeee4e4e4e/resourcegroups/myresourcegroup/providers/microsoft.compute/virtualmachines/myvm/2024/01/25/packetcapture_22_44_54_342.cap' --file 'C:\Capture\myVM_1.cap'
359349
```
360350

351+
---
352+
361353
> [!NOTE]
362-
> You can also download the capture file from the storage account container using the Azure Storage Explorer. Storage Explorer is a standalone app that you can conveniently use to access and work with Azure Storage data. For more information, see [Get started with Storage Explorer](../vs-azure-tools-storage-manage-with-storage-explorer.md).
354+
> You can use Azure Storage Explorer to download capture files from the storage account container. Storage Explorer is a standalone app that you can conveniently use to access and work with Azure Storage data. For more information, see [Get started with Storage Explorer](../vs-azure-tools-storage-manage-with-storage-explorer.md).
363355
364-
---
356+
> [!IMPORTANT]
357+
> During the packet capture session, the capture file might not immediately appear in the storage account container because it's initially saved to a temporary location. The file is transferred to its final location after the capture session is completed.
358+
359+
To download a packet capture file saved to the virtual machine (VM), connect to the VM and download the file from the local path specified during the packet capture creation.
365360

366361
## Delete a packet capture
367362

0 commit comments

Comments
 (0)