OpenVZ Forum


Home » General » Support » cannot find command vzctl
cannot find command vzctl [message #30833] Sun, 08 June 2008 11:21 Go to next message
mojiz
Messages: 2
Registered: June 2008
Junior Member
Hi

I have installed OpenVZ on a Fedora 8.
When I run the command vzctl I get:

bash: vzctl: command not found


the uname -a returns:
Linux myhostname 2.6.18-53.1.19.el5.028stab053.14 #1 SMP Thu May 8 20:43:27 MSD 2008 i686 i686 i386 GNU/Linux



I've already installed vzctl & vzquota using yum but I don't know if I've booted into the right kernel or not.
I'm a newbie in openvz. Could you please tell me what's wrong.


Thanks
Mojiz
Re: cannot find command vzctl [message #30834 is a reply to message #30833] Sun, 08 June 2008 11:37 Go to previous messageGo to next message
kir is currently offline  kir
Messages: 1645
Registered: August 2005
Location: Moscow, Russia
Senior Member

Yes, this is the right kernel.

vzctl is located in /usr/sbin, so make sure (a) you are root (b) /usr/sbin is in your PATH. Usually if you use sudo or su it is not there; if you login as root it is there...

To check, run echo $PATH and if /usr/sbin is not in the list, add it like this:

export PATH=$PATH:/usr/sbin

Alternatively, run vzctl using the full path, i.e.
/usr/sbin/vzctl


Kir Kolyshkin
http://static.openvz.org/userbars/openvz-developer.png

[Updated on: Sun, 08 June 2008 11:39]

Report message to a moderator

Re: cannot find command vzctl [message #30835 is a reply to message #30834] Sun, 08 June 2008 11:49 Go to previous messageGo to next message
mojiz
Messages: 2
Registered: June 2008
Junior Member
Thanks!

How dumb I can be Razz
I just missed the s in /usr/Sbin !

Thanks Kir
Re: cannot find command vzctl [message #32256 is a reply to message #30833] Mon, 28 July 2008 23:21 Go to previous messageGo to next message
DerekG is currently offline  DerekG
Messages: 2
Registered: July 2008
Junior Member
Hi,

I was just wondering why vzctl won't work if you use su to switch to root? Also where is vzctl? I don't even see it in /usr/sbin, not even a link to it and `locate vzctl` returns nothing, but somehow /usr/sbin/vzctl works.

Derek
Re: cannot find command vzctl [message #32260 is a reply to message #32256] Tue, 29 July 2008 01:03 Go to previous messageGo to next message
dowdle is currently offline  dowdle
Messages: 261
Registered: December 2005
Location: Bozeman, Montana
Senior Member
Read the man page for su and discover the - and l flags. Either or both execute the login script of the user you are su'ing to (in this case root) so the environment variables are all set.

Compare the output of "echo $PATH" from both "su" and "su -" and you will see the difference.

This really isn't OpenVZ specific.


--
TYL, Scott Dowdle
Belgrade, Montana, USA
icon14.gif  Re: cannot find command vzctl [message #32264 is a reply to message #32260] Tue, 29 July 2008 04:47 Go to previous message
DerekG is currently offline  DerekG
Messages: 2
Registered: July 2008
Junior Member
dowdle wrote on Mon, 28 July 2008 21:03

Read the man page for su and discover the - and l flags. Either or both execute the login script of the user you are su'ing to (in this case root) so the environment variables are all set.

Compare the output of "echo $PATH" from both "su" and "su -" and you will see the difference.

This really isn't OpenVZ specific.


I never really understood what "make the shell a login shell" meant, makes more sense now thanks Smile
Previous Topic: Vituozzo to OpenVZ migration
Next Topic: vzmigrate and shared filesystems
Goto Forum:
  


Current Time: Sat Aug 02 06:33:07 GMT 2025

Total time taken to generate the page: 0.48192 seconds