OpenVZ Forum


Home » Mailing lists » Users » "reboot" inside a container stops the container
"reboot" inside a container stops the container [message #42405] Wed, 13 April 2011 09:16 Go to next message
Benjamin Henrion is currently offline  Benjamin Henrion
Messages: 51
Registered: February 2011
Member
Hi,

I found out that typing "reboot" in a container halts the whole
container, making it unreacheable (the container itself is not running
anymore, checking with vzlist on the physical machine).

Any idea if there is another command that kills all the processes and
restart the container from within a root shell on the container (yes I
know that you can do that with 'vzctl restart CTID' on the HN)?

Best,

--
Benjamin Henrion <bhenrion at ffii.org>
FFII Brussels - +32-484-566109 - +32-2-4148403
"In July 2005, after several failed attempts to legalise software
patents in Europe, the patent establishment changed its strategy.
Instead of explicitly seeking to sanction the patentability of
software, they are now seeking to create a central European patent
court, which would establish and enforce patentability rules in their
favor, without any possibility of correction by competing courts or
democratically elected legislators."
Re: &quot;reboot&quot; inside a container stops the container [message #42410 is a reply to message #42405] Wed, 13 April 2011 16:24 Go to previous messageGo to next message
MaksymDolgykh is currently offline  MaksymDolgykh
Messages: 4
Registered: February 2007
Location: Ukraine
Junior Member
Hi,

reboot is working inside containers but you need add cron job
*/2 * * * * root /usr/share/vzctl/scripts/vpsreboot

this script do start rebooted containers.

On Wednesday 13 April 2011 12:16:52 Benjamin Henrion wrote:
> Hi,
>
> I found out that typing "reboot" in a container halts the whole
> container, making it unreacheable (the container itself is not running
> anymore, checking with vzlist on the physical machine).
>
> Any idea if there is another command that kills all the processes and
> restart the container from within a root shell on the container (yes I
> know that you can do that with 'vzctl restart CTID' on the HN)?
>
> Best,
Re: &quot;reboot&quot; inside a container stops the container [message #42412 is a reply to message #42405] Wed, 13 April 2011 16:37 Go to previous message
kir is currently offline  kir
Messages: 1645
Registered: August 2005
Location: Moscow, Russia
Senior Member

On 13 April 2011 13:16, Benjamin Henrion <bh@udev.org> wrote:
> Hi,
>
> I found out that typing "reboot" in a container halts the whole
> container, making it unreacheable (the container itself is not running
> anymore, checking with vzlist on the physical machine).

Which vzctl and kernel do you use?

In case of vzctl < 3.0.25 reboot is performed by the vpsreboot cron
script which is
called from cron every 5 minutes by default. Check if your cron daemon
is running,
check that you have that job installed, and note that since this job
is run every 5
minutes, your container can be done for as long as 5 minutes.

In case of vzctl >= 3.0.25 (and a decent/recent kernel) reboot is performed by a
daemon called vzeventd. Check that vzevent kernel module is loaded,
that vzeventd
daemon is running and included in autostart.


Kir Kolyshkin
http://static.openvz.org/userbars/openvz-developer.png
Previous Topic: How do I know which IP packet is for which container in kernel space
Next Topic: Switching from VMWare to OpenVZ?
Goto Forum:
  


Current Time: Sat Nov 09 11:38:55 GMT 2024

Total time taken to generate the page: 0.03257 seconds