If you have added multiple target servers, you should specify the target server explicitly when running commands. By default, vMA executes commands on the server that is configured as the default target by using the vifptarget -s command. If none of the added target servers are configured as the default target and no target server is explicitly specified when running the vSphere CLI commands, then the commands are run against the vMA itself.

1

Add servers as vMA targets.

vifp addserver server1

vifp addserver server2

2

Check whether the target server has been added:

vifp listservers

3

Run vifptarget.

vifptarget -s server2

The command initializes the specified target server. This server is set as the default target for the vSphere CLI or vSphere SDK for Perl scripts.

4

Run vSphere CLI or vSphere SDK for Perl scripts, by specifying the target server.

esxcli --server server2 network nic list