VMware Cloud Community
elflaco
Contributor
Contributor
Jump to solution

Commands Don't Work Via SSH

Hi All:

I have 3 ESX 3.5 U2 running on Dell 2950's. When I ssh to any of them (connect as normal user, then 'su' to root) and attempt to run an esx command such as esxcfg-nics -l or vmkping, I get the message bash: esxcfg-nics: command not found. Even if I navigate to the directory /usr/sbin and can see the commands listed, I get the same error. If I am at the console or connect via IP KVM, the commands work perfectly.

I suspect that it is an issue with an incorrectly registered path, but I'm unsure. Has anyone else encountered this or know where the fix for it might be found?

Thank you in advance for any help.

0 Kudos
1 Solution

Accepted Solutions
atbnet
Expert
Expert
Jump to solution

have you tried running the command this way..

/usr/sbin/esxcfg-vswitch -l

OR

cd /usr/sbin/

./esxcfg-vswitch -l

(notice the "./" above to run it)

Andy, VMware Certified Professional (VCP),

If you found this information useful please award points using the buttons at the top of the page accordingly.

Andy Barnes
VCP / VCA-DT / MCITP:EA / CCIA
Help, Guides and How Tos... www.VMadmin.co.uk

If you found this information useful please award points using the buttons at the top of the page accordingly.

View solution in original post

0 Kudos
7 Replies
atbnet
Expert
Expert
Jump to solution

have you tried running the command this way..

/usr/sbin/esxcfg-vswitch -l

OR

cd /usr/sbin/

./esxcfg-vswitch -l

(notice the "./" above to run it)

Andy, VMware Certified Professional (VCP),

If you found this information useful please award points using the buttons at the top of the page accordingly.

Andy Barnes
VCP / VCA-DT / MCITP:EA / CCIA
Help, Guides and How Tos... www.VMadmin.co.uk

If you found this information useful please award points using the buttons at the top of the page accordingly.
0 Kudos
atbnet
Expert
Expert
Jump to solution

Also run "export" which will print all your environment variables, specifcally PATH$ which may not have /usr/sbin in it.

Andy, VMware Certified Professional (VCP),

If you found this information useful please award points using the buttons at the top of the page accordingly.

Andy Barnes
VCP / VCA-DT / MCITP:EA / CCIA
Help, Guides and How Tos... www.VMadmin.co.uk

If you found this information useful please award points using the buttons at the top of the page accordingly.
0 Kudos
Jasemccarty
Immortal
Immortal
Jump to solution

I would agree in saying that your PATH is the issue.

Jase McCarty

http://www.jasemccarty.com

Co-Author of VMware ESX Essentials in the Virtual Data Center

(ISBN:1420070274) from Auerbach

Jase McCarty - @jasemccarty
0 Kudos
depping
Leadership
Leadership
Jump to solution

seen this many times, path issue for sure.

Duncan

Blogging:

If you find this information useful, please award points for "correct" or "helpful".

0 Kudos
elflaco
Contributor
Contributor
Jump to solution

Red Condor was unable to deliver the attached message to the recipients listed below.

The original message was rejected at Wed, 12 Nov 2008 09:38:59 -0800

0 Kudos
VMweaver
Contributor
Contributor
Jump to solution

use "su -"

0 Kudos
elflaco
Contributor
Contributor
Jump to solution

That was it, but what's really bizarre is that I tried that yesterday and it wasn't working. Now it is.

Thanks for the assist...

0 Kudos