Should others come across this - here are the answers to my issue (by MSFT Support):
The cmdlet/api is not supported for the "Basic" GW-sku. There is no support for the policybased GW's.
The "A packet capture is already in progress" return-message is a bug. No capture is running (on that type of gateway).
Azure GW packet capture
Hi,
I am struggling to understand why these cmdlet would return contractionary answers (I have this actual case):
PS C:\> Start-AzVirtualNetworkGatewayPacketCapture -ResourceGroupName $rgname -Name $gwname
Start-AzVirtualNetworkGatewayPacketCapture : Long running operation failed with status 'Failed'. Additional Info:'A packet capture is already in progress. Please stop the current operation and try again.'
StatusCode: 200
ReasonPhrase: OK
Status: Failed
ErrorCode: VpnGatewayPacketCaptureOperationAlreadyInProgress
ErrorMessage: A packet capture is already in progress. Please stop the current operation and try again.
At line:1 char:1
- Start-AzVirtualNetworkGatewayPacketCapture -ResourceGroupName $rgname ...
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- CategoryInfo : CloseError: (:) [Start-AzVirtual...ayPacketCapture], NetworkCloudException
- FullyQualifiedErrorId : Microsoft.Azure.Commands.Network.VirtualNetworkGateway.StartAzVirtualNetworkGatewayPacketCaptureCommand
PS C:\> Stop-AzVirtualNetworkGatewayPacketCapture -ResourceGroupName $rgname -Name $gwname -SasUrl $sasurl
Stop-AzVirtualNetworkGatewayPacketCapture : Long running operation failed with status 'Failed'. Additional Info:'There is no packet capture operation running for this trace. Please start a packet capture and try again.'
StatusCode: 200
ReasonPhrase: OK
Status: Failed
ErrorCode: NoVpnGatewayPacketCaptureOperationRunning
ErrorMessage: There is no packet capture operation running for this trace. Please start a packet capture and try again.
At line:1 char:1
- Stop-AzVirtualNetworkGatewayPacketCapture -ResourceGroupName $rgname ...
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- CategoryInfo : CloseError: (:) [Stop-AzVirtualN...ayPacketCapture], NetworkCloudException
- FullyQualifiedErrorId : Microsoft.Azure.Commands.Network.VirtualNetworkGateway.StopAzVirtualNetworkGatewayPacketCaptureCommand
Is there somewhere I can learn about the implementation of the Packet Capture API's in Azure and what is actually going on serverside? ...or does someone know what is going on in my case?
Kr, René
-
Rene Løhde 211 Reputation points
2020-06-17T13:59:35.51+00:00