OpenVZ Forum


Home » General » Support » (probably) an easy question
Re: (probably) an easy question [message #30754 is a reply to message #30748] Fri, 06 June 2008 08:31 Go to previous message
maratrus is currently offline  maratrus
Messages: 1495
Registered: August 2007
Location: Moscow
Senior Member
Hi,

as far as I understand you've asked about two different things:

- about OpenVZ service that provides the ability of managing containers. You said that this service is always stopped after you've rebooted the HN. To make sure that it is indeed stopped you can issue this command "/etc/init.d/vz status".

There is runlevel concept.
Your current runlevel can be obtained via the "runlevel" command.
The difference between two runlevels consists in services that is started in each of them. Each service started by appropriate script.
There are "/etc/rc[runlevel_number].d" directories.
Each of them consist symlinks to the "real" scripts that are stared or stopped in each runlevel.
For example
root@localhost:~# ls -l /etc/rc0.d/S01halt
lrwxrwxrwx  1 root root 14 Jul 26  2005 /etc/rc0.d/S01halt -> ../init.d/halt
root@localhost:~# ls -l /etc/rc0.d/K99sysstat
lrwxrwxrwx  1 root root 17 Jan  8 15:36 /etc/rc0.d/K99sysstat -> ../init.d/sysstat

Each file name can be imaginary divided by three parts
[SK][NN][basename]
[SK] - if this script is started on boot or on (init process takes care about reading this filenames and starting appropriate script)
[NN] - is a number that affects the order of this script. (it can be numerous scripts in /etc/rc0.d directory)
[basename] - it is base name of that script (look inside /etc/init.d directory)

So, you can chose what script should be started in particular runlevel. But there are several utils that could help us with managing scripts.
In rpm based distributives there is "chkconfig" utility.
You can use "update-rc.d" utility. (see man pages about using it)
So, the bottom line is the following:
- check your current runlevel
- check OpenVZ status
- if it's stopped look inside appropriate /etc/rc*.d directory to make sure that OpenVZ service don't start in this runlevel
- chose appropriate setting and apply it to your case


- you want your containers reboot automatically after HN reboot, am I right?

- vzctl utility is a utility that provides us the ability to manage containers from the HN (man vzctl for detail)
from man vzctl
Quote:


--onboot yes|no
Sets whether this VE will be started during system boot up. VE will not be auto-started during system boot up unless this parameter is set to yes.




For example

vzctl set 101 --onboot yes --save
 
Read Message
Read Message
Previous Topic: checkpointing failed - Ubuntu hardy/xfs unkown inode mode 0
Next Topic: Is it possible to share non-private areas when you are not migrating from virtuozzo?
Goto Forum:
  


Current Time: Wed Aug 06 14:07:30 GMT 2025

Total time taken to generate the page: 1.82181 seconds