az network watcher packet-capture

(PREVIEW) Commands to manage packet capture sessions on VMs.

Requires that Network Watcher is enabled for the region in which the VM is located and that the AzureNetworkWatcherExtension is enabled on the VM.

Commands

az network watcher packet-capture create Create and start a packet capture session.
az network watcher packet-capture delete Deletes the specified packet capture session.
az network watcher packet-capture list Lists all packet capture sessions within the specified resource group.
az network watcher packet-capture show Gets a packet capture session by name.
az network watcher packet-capture show-status Query the status of a running packet capture session.
az network watcher packet-capture stop Stops a specified packet capture session.

az network watcher packet-capture create

Create and start a packet capture session.

az network watcher packet-capture create --name
--resource-group
--vm
[--capture-limit]
[--capture-size]
[--file-path]
[--filters]
[--storage-account]
[--storage-path]
[--time-limit]

Required Parameters

--name -n

Name of the packet capture session.

--resource-group -g

Name of the resource group the target VM is in. Do not use when supplying VM ID.

--vm

Name or ID of the VM to target.

Optional Parameters

--capture-limit

The maximum size in bytes of the capture output.

--capture-size

Number of bytes captured per packet. Excess bytes are truncated.

--file-path

Local path on the targeted VM at which to save the packet capture. For Linux VMs, the path must start with /var/captures.

--filters

JSON encoded list of packet filters. Use @ to load from file.

--storage-account

Name or ID of a storage account into which to save the packet capture.

--storage-path

Fully qualified URI to an existing storage container in which to store the capture file.

If not specified, the container 'network-watcher-logs' will be created if it does not exist and the capture file will be stored there.

--time-limit

Maximum duration of the capture session in seconds.

az network watcher packet-capture delete

Deletes the specified packet capture session.

az network watcher packet-capture delete --location
--name

Required Parameters

--location -l

Location. You can configure the default location using az configure --defaults location=.

--name -n

The name of the packet capture session.

az network watcher packet-capture list

Lists all packet capture sessions within the specified resource group.

az network watcher packet-capture list --location

Required Parameters

--location -l

Location. You can configure the default location using az configure --defaults location=.

az network watcher packet-capture show

Gets a packet capture session by name.

az network watcher packet-capture show --location
--name

Required Parameters

--location -l

Location. You can configure the default location using az configure --defaults location=.

--name -n

The name of the packet capture session.

az network watcher packet-capture show-status

Query the status of a running packet capture session.

az network watcher packet-capture show-status --location
--name

Required Parameters

--location -l

Location. You can configure the default location using az configure --defaults location=.

--name -n

The name given to the packet capture session.

az network watcher packet-capture stop

Stops a specified packet capture session.

az network watcher packet-capture stop --location
--name

Required Parameters

--location -l

Location. You can configure the default location using az configure --defaults location=.

--name -n

The name of the packet capture session.