ESXi

 View Only
  • 1.  vSphere CLI: Error: Unknown Command

    Posted Jun 21, 2013 12:33 PM

    This could be as simple as me just missing something, but since I don't use the CLI very much at all, I thought I would just ask. I can connect to the CLI, but no matter what command I use the host just responds with either "<command> not found" or when using vSphere CLI "Error: Unknown command or namespace"

    I've even tried connecting through my vCenter Server and then out to the host using --vihost command, which works, but I still get the error that the command I am trying use it recognized.

    vSphere CLI

    C:\Program Files (x86)\VMware\VMware vSphere CLI>esxcli --server <servername> --username <my username> --password <my password> vicfg-snmp.pl --server <servername> -c public

    Error: Unknown command or namespace vicfg-snmp.pl




  • 2.  RE: vSphere CLI: Error: Unknown Command

    Posted Jun 21, 2013 01:51 PM

    You seem to be mixing two separate commands (esxcli and the perl script vicfg-snmp.pl).

    Try this as an example;

    vicfg-snmp.pl --server <servername> --username <my username>--password <my password> --show



  • 3.  RE: vSphere CLI: Error: Unknown Command

    Posted Jun 21, 2013 02:11 PM

    The "esxcli --server <servername> --username <my username> --password <my password>" is how vSphere CLI application connects to the ESXi Host, and then it runs the "vicfg-snmp.pl --server <servername> -c public" against the host.

    I have also tried using the same vicfg-snmp.pl command while logged into the host using putty, and get the same thing.. "-sh: vicfg-snmp.pl: not found"

    So far I have tried vSphere CLI, PowerGUI,and  Putty (both telnet and SSH), all connect to the ESXi Host fine, but no matter the command I try and send to the host, the host tells me ii doesn't know the command.


    Below is the sanitized output of the command that you recommended using Putty to the connect to the ESXi Host.


    VMware offers supported, powerful system administration tools.  Please
    see www.vmware.com/go/sysadmintools for details.

    The ESXi Shell can be disabled by an administrative user. See the
    vSphere Security documentation for more information.
    ~ # vicfg-snmp.pl --server <server> --username <user> --password <password> --show
    -sh: vicfg-snmp.pl: not found
    ~ #



  • 4.  RE: vSphere CLI: Error: Unknown Command
    Best Answer

    Posted Jun 21, 2013 02:31 PM

    You need to run this command from the vSphere CLI command prompt (not the shell as per above) and make sure that the bin folder is in your path. If not execute this from here;

    C:\Program Files (x86)\VMware\VMware vSphere CLI\bin>vicfg-snmp.pl --server <servername> --username <my username>--password <my password> --show



  • 5.  RE: vSphere CLI: Error: Unknown Command

    Posted Jun 21, 2013 04:50 PM

    Outstanding.. that is what I was missting.. I didn't have it in the \bin directory. I knew it had to be something simple.



  • 6.  RE: vSphere CLI: Error: Unknown Command

    Posted Nov 01, 2013 05:43 PM

    Hello Guys,

    I'm trying to do the same thing but I don't have a bin directory.  I'm re-installing the VMware vSphere PowerCLI to see it that will do the trick.  Can you guys tell me what I'm doing wrong?



  • 7.  RE: vSphere CLI: Error: Unknown Command

    Posted Nov 01, 2013 06:22 PM

    I installed VMware vSphere CLI... didn't know there was a diff...