azcmagent check

Run a series of network connectivity checks to see if the agent can successfully communicate with required network endpoints. The command outputs a table showing connectivity test results for each required endpoint, including whether the agent used a private endpoint and/or proxy server.

Usage

azcmagent check [flags]

Examples

Check connectivity with the agent's configured cloud and region.

azcmagent check

Check connectivity with the China East region using public endpoints.

azcmagent check --location "chinaeast2"

Check connectivity for supported extensions (SQL Server enabled by Azure Arc) using public endpoints:

azcmagent check --extensions all

Check connectivity with the China East 2 region using private endpoints.

azcmagent check --location "chinaeast2" --enable-pls-check

Flags

--cloud

Specifies the Azure cloud instance. Must be used with the --location flag. If the machine is already connected to Azure Arc, the default value is the cloud to which the agent is already connected. Otherwise, the default value is "AzureCloud".

Supported values:

  • AzureCloud (public regions)
  • AzureUSGovernment (Azure US Government regions)
  • AzureChinaCloud (Azure operated by 21Vianet regions)

-e, --extensions

Includes extra checks for extension endpoints to help validate end-to-end scenario readiness. This flag is available in agent version 1.41 and later.

Supported values:

  • all (checks all supported extension endpoints)
  • sql (SQL Server enabled by Azure Arc)

-l, --location

The Azure region to check connectivity with. If the machine is already connected to Azure Arc, the current region is selected as the default.

Sample value: chinaeast2

-p, --enable-pls-check

Checks if supported Azure Arc endpoints resolve to private IP addresses. This flag should be used when you intend to connect the server to Azure using an Azure Arc private link scope.

Common flags available for all commands

--config

Takes in a path to a JSON or YAML file containing inputs to the command. The configuration file should contain a series of key-value pairs where the key matches an available command line option. For example, to pass in the --verbose flag, the configuration file would look like:

{
    "verbose": true
}

If a command line option is found in both the command invocation and a configuration file, the value specified on the command line will take precedence.

-h, --help

Get help for the current command, including its syntax and command line options.

-j, --json

Output the command result in the JSON format.

--log-stderr

Redirect error and verbose messages to the standard error (stderr) stream. By default, all output is sent to the standard output (stdout) stream.

--no-color

Disable color output for terminals that do not support ANSI colors.

-v, --verbose

Show more detailed logging information while the command executes. Useful for troubleshooting issues when running a command.