Performing Autodiscovery via CLI
search cancel

Performing Autodiscovery via CLI

book

Article ID: 331164

calendar_today

Updated On: 03-06-2025

Products

VMware Smart Assurance

Issue/Introduction

Commissioning/adding new devices in NCM from CLI.

Environment

NCM - 10.1.x

Resolution

  • Login to NCM AS (Application Server) with 'root' access.
  • Set environmental variable as source /etc/voyence.conf
  • Navigate to $VOYENCE_HOME/tools/bulk-import.
  • Execute runCmd.sh, it prompts for UserName and Password. Provide User details who has System Administrator Privilege
  • Command prompt will be available where user can type 'help' to get list of commands that are available to run.
  • To perform auto discovery run as 
    seedAD <network name> <device server name> <Discovery type> hostfile <credentials>
Example:
cmd > seedAD <NETWORK_NAME> <DS_NAME> ping-sweep <FILENAME>.csv "global:<Credential>"
 
Where:
  • Discovery type can be one of the following:
    • ping-sweep
    • snmp-sweep
  • Hostfile is a tab separated format, similar to /etc/hosts. Sample can be found in $VOYENCE_HOME/tools/bulk-import and refer to examples.tar.
  • Credentials can be one of the following:
    • global - global credentials have a global: prefix.
    • Network - network credentials are those that belong to the network provided in the command.

Command executed in Lab:

cmd > seedAD NCM_LAB <DS_NAME> ping-sweep importDevices-Single-Level.csv "global:<CredentialName>"

AD Output looks like below in console:

Added the Account:LAB_ACC to AD
**************AD Entry Details************
NameAUTODISC-CMDLINE-Thu Mar 06 22:13:24 EST 2025
Account Identities: <CredentialName>
PrivPass Identities:
CS Identities:
SnmpV3 Identities:

**************AD Entry Details************

AD job can be verified from NCM GUI:

NOTE:
  1. If the credential names exists either in Global or Network and contains any spaces or other special characters, user must enclose the name using double quotes (").
    Example: If the global name is global: credname1, credname2, then the name would be entered as: "global:credname1,credname2".
  2. If there are multiple credentials to be entered, user need to add the credentials first to NCM using importCredentials command available in $VOYENCE_HOME/tools/bulk-import after executing runCmd.sh
Log (commandLineUtil.log) available in $VOYENCE_HOME/logs
  • Once AD is completed, exit the command prompt by typing 'quit'.