VMware Cloud Community
Lyfe
Contributor
Contributor
Jump to solution

esxcli "not found"

Hi,

Hopefully someone will take pity on a poor stressed administrator, having inherited a ESXi 5.0.0 build 623860 server, and trying to install Windows 2012... I know, I know!

I don't have the Update Manager and am trying to patch to Update 3 via the command shell. I've downloaded update-from-esxi5.0-5.0_update03.zip to... [ISO-Storage]/Updates/update-from-esxi5.0-5.0_update03.zip and have enabled local shell via F2 on the console and SSH.

In both cases, I seem to end up at a basic prompt, with no esxi CLI commands...

~ # esxcli

sh: esxcli: not found

~ # vicfg-cfgbackup --save myserver.tgz

sh: vicfg-cfgbackup: not found

~ # vicfg-hostops --operation info

sh: vicfg-hostops: not found

So I downloaded vCLI for windows with about the same amount of success...

C:\Program Files (x86)\VMware\VMware vSphere CLI\bin>esxcli --server kay-9 --use

rname admin software sources preofile list --depot=[ISO-Storage]/Updates/update-

from-esxi5.0-5.0_update03.zip

Enter password:

Error: Unknown namespace software

esxcli can only be used with version 4.0 or newer servers

In short - I cant find any of these problems on google... help!!!!

Reply
0 Kudos
1 Solution

Accepted Solutions
Lyfe
Contributor
Contributor
Jump to solution

Once again, many thanks for your time and effort Arun!

I solved the esxcli problem as well. While my login 'admin' appears to be as high a privilege as I can make it, including running su at the command line, it doesn't seem to have permissions to esxcli. Logging in as 'root' works.

Therefore, I seem to have no problems anymore.

If anyone else has either of these problems...

1) Make sure your version of vCLI matches your version of ESXi - vCLI 4.0 doesn't seem to entirely run against ESXi 5.0.

2) If you are 'missing' esxcli and vi-cfg on a local console - check your permissions and log in as 'root'

View solution in original post

Reply
0 Kudos
7 Replies
f10
Expert
Expert
Jump to solution

Hi,

Its strange that you cannot use #esxcli namespace in ESXi 5.0, can you check the build # by using #vmware -l and vmware -v. Can you also check if the esxcli command is available in /usr/bin/ on the ESXi host.

Regarding vCLI from a remote machine, can you try the below command

esxcli -s <server> -u root -p mypassword software vib install -d <datastore path><bundle.zip>

-Arun

Twitter: https://twitter.com/arunpande

Blog: http://highoncloud.blogspot.in/

About VMware Virtualization on NetApp

Regards, Arun Pandey VCP 3,4,5 | VCAP-DCA | NCDA | HPUX-CSA | http://highoncloud.blogspot.in/ If you found this or other information useful, please consider awarding points for "Correct" or "Helpful".
Lyfe
Contributor
Contributor
Jump to solution

Thanks for your time and effort Arun - I greatly appreciate it!

Regarding the remote vCLI - I found the problem and it was mainly user related - vCLI 4.0 doesnt work on 5.0! But downloading vCLI 5.0 worked and allowed me to patch successfully!

However, your questions helped me spot the local esxcli problem... any idea why I don't have any of the vmware command line tools installed? Or, more importantly, how I restore them?

The time and date of this login have been sent to the system logs.

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.

~ $ su

Password:

~ # vmware -l

VMware ESXi 5.0.0 Update 3

~ # vmware -v

VMware ESXi 5.0.0 build-1311175

~ # esxcli

sh: esxcli: not found

~ # ls /usr/bin

[                  fgrep              mv                 sum

[[                 find               nc                 sync

addgroup           gdbserver          nohup              tail

adduser            getty              nslookup           tar

ash                grep               od                 tcpdump-uw

awk                groupadd           openssl            tee

basename           groupdel           openssl_098        test

busybox            groups             passwd             ticket

cat                gunzip             ping               time

chgrp              gzip               ping6              touch

chmod              halt               pkill              true

chown              head               poweroff           uname

chvt               hexdump            printf             uniq

cim-diagnostic.sh  host_reboot.sh     prop_of_instances  unzip

cim_host_powerops  host_shutdown.sh   ps                 useradd

cimslp             hostname           python             userdel

cksum              id                 readlink           usermod

clear              inetd              reboot             usleep

cp                 init               reset              vdf

crond              kdestroy           resize             vdu

cut                kill               rm                 vi

date               kinit              rmdir              vim-cmd

dd                 klist              scp                vmware

delgroup           less               sed                vmware-vimdump

deluser            ln                 seq                vmx

diff               lockfile           setsid             vmx-buildtype

dirname            logger             sfcb-config.py     vmx-debug

du                 login              sh                 vmx-stats

echo               ls                 sha1sum            watch

egrep              lw-lsa             sleep              wc

eject              md5sum             sort               wget

enum_instances     mkdir              ssh                which

env                mkfifo             stat               who

expr               mknod              strace             whoami

false              mktemp             stty               xargs

fdisk              more               su                 zcat

~ #

Reply
0 Kudos
f10
Expert
Expert
Jump to solution

Hi,

Apologies, but I haven't seen anything similar in the past hence cannot provide the exact fix for this issue. However you may try the following:

Is this issue on all ESXi hosts or just one, I suspect that there may be issues with the image.

After upgrading the ESXi host to 5.0 U3 is there any change after rebooting the ESXi host?

In case the reboot has not been done yet, can you restart the services using #services.sh restart

If you have a support contract log a case with VMware

All the best Smiley Happy

-Arun

Twitter: https://twitter.com/arunpande

Blog: http://highoncloud.blogspot.in/

About VMware Virtualization on NetApp

Regards, Arun Pandey VCP 3,4,5 | VCAP-DCA | NCDA | HPUX-CSA | http://highoncloud.blogspot.in/ If you found this or other information useful, please consider awarding points for "Correct" or "Helpful".
Lyfe
Contributor
Contributor
Jump to solution

Once again, many thanks for your time and effort Arun!

I solved the esxcli problem as well. While my login 'admin' appears to be as high a privilege as I can make it, including running su at the command line, it doesn't seem to have permissions to esxcli. Logging in as 'root' works.

Therefore, I seem to have no problems anymore.

If anyone else has either of these problems...

1) Make sure your version of vCLI matches your version of ESXi - vCLI 4.0 doesn't seem to entirely run against ESXi 5.0.

2) If you are 'missing' esxcli and vi-cfg on a local console - check your permissions and log in as 'root'

Reply
0 Kudos
f10
Expert
Expert
Jump to solution

Oops !! I have always used "root" Smiley Happy user account to login and now looking back at the thread I see why you had used "su" command to get the vmware version details. This was learning for me, will definitely check this next time.

Thanks.

-Arun

Twitter: https://twitter.com/arunpande

Blog: http://highoncloud.blogspot.in/

About VMware Virtualization on NetApp

Regards, Arun Pandey VCP 3,4,5 | VCAP-DCA | NCDA | HPUX-CSA | http://highoncloud.blogspot.in/ If you found this or other information useful, please consider awarding points for "Correct" or "Helpful".
Reply
0 Kudos
HiFra
Contributor
Contributor
Jump to solution

Hello,

it reads all so plausible here, but strangely enough this does not work for me:

~ #  vicfg-cfgbackup

-sh: vicfg-cfgbackup: not found

~ #  find / -iname vicfg-cfgbackup

~ #  vicfg-cfgbackup.pl

-sh: vicfg-cfgbackup.pl: not found

1) My current release:

VMware ESXi 5.5.0 build-2456374



2) The binaries available:

~ #  ls /usr/bin

BootModuleConfig.sh      debugfs                  expr                     logchannellogger         pgrep                    snmpd                    vmkchdev

Formatters.py            df                       false                    logger                   pidof                    sort                     vmkdevmgr

Formatters.pyc           dhclient-uw              fdisk                    login                    ping                     ssh                      vmkdump_extract

InstallHelper.sh         diff                     fgrep                    ls                       ping6                    stat                     vmkerrcode

Session.py               dirname                  find                     lsassd                   pkill                    storageRM                vmkfstools

Session.pyc              dmesg                    firmwareConfig.sh        lsof                     pktcap-uw                strace                   vmkiscsi-tool

Xorg                     dnsdomainname            ft-stats                 lspci                    powerOffVms              stty                     vmkiscsid

[                        doat                     gdbserver                lsusb                    poweroff                 sum                      vmkload_mod

[[                       dosfsck                  generate-certificates    lw-lsa                   printf                   summarize-dvfilter       vmkmicrocode

amldump                  du                       getty                    lwiod                    prop_of_instances        sync                     vmkmkdev

apply-host-profiles      echo                     gpuvm                    lzop                     ps                       tail                     vmkperf

applyHostProfile         egrep                    grabCIMData              lzopcat                  python                   tar                      vmkping

applyHostProfileWrapper  eject                    grep                     mcopy                    randomSeed               tcpdump-uw               vmkramdisk

ash                      emmett                   gunzip                   md5sum                   readlink                 techsupport.sh           vmkvsitools

authd                    enum_instances           gzip                     memstats                 reboot                   tee                      vmtar

auto-backup.sh           env                      halt                     mkdir                    remoteDeviceConnect      test                     vmware

awk                      esxcfg-advcfg            hbrfilterctl             mkfifo                   reset                    ticket                   vmware-autostart.sh

backup.sh                esxcfg-dumppart          head                     mknod                    resize                   time                     vmware-usbarbitrator

basename                 esxcfg-fcoe              hexdump                  mktemp                   rhttpproxy               timeout                  vmware-vimdump

bootOption               esxcfg-hwiscsi           host-ind                 more                     rm                       tmpwatch.py              vmx

cat                      esxcfg-info              host_reboot.sh           mv                       rmdir                    touch                    vmx-buildtype

chardevlogger            esxcfg-init              host_shutdown.sh         nc                       runInRP                  tracenet                 vmx-debug

check_serial             esxcfg-ipsec             hostd                    net-cdp                  scantools                traceroute               vmx-stats

chgrp                    esxcfg-module            hostd-probe              net-dvs                  sched-stats              true                     voma

chkconfig                esxcfg-mpath             hostname                 net-lacp                 scp                      tune2fs                  vprobe

chmod                    esxcfg-nas               hwclock                  net-lbt                  sdrsInjector             uname                    vprobed

chown                    esxcfg-nics              indcfg                   net-stats                secpolicytools           uniq                     vscsiStats

chvt                     esxcfg-rescan            inetd                    net-vdl2                 sed                      unlzop                   vsi_traverse

cim-diagnostic.sh        esxcfg-resgrp            init                     net-vdr                  sensord                  unzip                    vsipioctl

cim_host_powerops        esxcfg-route             init-launcher            netlogond                seq                      uptime                   vsish

cimslp                   esxcfg-scsidevs          initterm.sh              nohup                    services.sh              usleep                   watch

cksum                    esxcfg-swiscsi           install                  nologin                  setsid                   uwstats                  watchdog.sh

clear                    esxcfg-vmknic            irqinfo                  nslookup                 sfcb-config.py           vdf                      wc

cmmds-tool               esxcfg-volume            jumpstart                ntfscat                  sfcbd                    vdq                      wget

cp                       esxcfg-vswitch           kdestroy                 ntp-keygen               sh                       vdu                      which

cpio                     esxcli                   kill                     ntpd                     sha1sum                  vi                       who

crond                    esxcli.cgi               kinit                    ntpdc                    sha256sum                vim-cmd                  xargs

cut                      esxcli.py                klist                    ntpq                     sha512sum                vm-support               xkbcomp

date                     esxhpcli                 less                     od                       shutdown.sh              vmamqpd                  zcat

dcbd                     esxhpedit                lldpnetmap               openssl                  sleep                    vmcp

dcui                     esxtop                   ln                       openwsmand               slpd                     vmdumper

dcuiweasel               esxupdate                localcli                 partedUtil               smartd                   vmfs-support

dd                       ethtool                  lockfile                 passwd                   smbiosDump               vmkbacktrace

3) The system is fairly stock configuration (just configured network, no customisation so far) and i ssh in as root.

4) License is a 1CPU free license, so no trial mode.

5) "su" not even available:

~ #  su

-sh: su: not found

Could some of you hopefully confirm that the "vicfg-cfgbackup" should be available (my entire backup strategy depends on it)?

And if so: could you figure out a reason why i don't have access to it?

Best

Reply
0 Kudos
HiFra
Contributor
Contributor
Jump to solution

Amending my own post: it dawns on me that this neat tool will possibly not be covered by a "free" license?

Comparing the feature set that the trial 5.5.0u2 provided:

[feature] = vsmp:0 ("Unlimited virtual SMP")

  [feature] = esxHost ("vCenter agent for VMware host")

  [feature] = rem ("Reliable Memory")

  [feature] = endpoint ("vShield Endpoint")

  [feature] = replication ("vSphere Replication")

  [feature] = sriov ("SR-IOV")

  [feature] = vimapi ("vSphere API")

  [feature] = vstorage ("Storage APIs")

  [feature] = vmsafe ("VMsafe")

  [feature] = das ("vSphere HA")

  [feature] = hotplug ("Hot-Pluggable virtual HW")

  [feature] = vmotion ("vSphere vMotion")

  [feature] = ft ("vSphere FT")

  [feature] = dr ("vSphere Data Protection")

  [feature] = vshield ("vShield Zones")

  [feature] = drs ("vSphere DRS")

  [feature] = svmotion ("vSphere Storage vMotion")

  [feature] = mpio ("MPIO / Third-Party Multi-Pathing")

  [feature] = dvs ("vSphere Distributed Switch")

  [feature] = hostprofile ("vSphere Host Profiles")

  [feature] = serialuri:2 ("Remote virtual Serial Port Concentrator")

  [feature] = sioshares ("vSphere Storage I/O Control")

  [feature] = dpvmotion ("Direct Path vMotion")

  [feature] = vaai ("vSphere Storage APIs for Array Integration")

  [feature] = smartcard ("Shared Smart Card Reader")

  [feature] = storagedrs ("vSphere Storage DRS")

  [feature] = spbm ("vSphere Profile-Driven Storage")

  [feature] = metrovmotion ("vSphere vMotion Metro")

  [feature] = autodeploy ("vSphere Auto Deploy")

  [feature] = viewaccel ("vSphere View Accelerator")

  [feature] = appha ("vSphere App HA")

  [feature] = vflash ("vSphere Flash Read Cache")

to what the registered free license for 5.5.0u2 left:

[feature] = vsmp:8 ("Up to 8-way virtual SMP")


... renders my foreboding not necessarily an excrescence of a feverous dream.

Although i still wish it would...

Reply
0 Kudos