*solved* VE not rebooting [message #16009] |
Sat, 18 August 2007 19:03 |
locutius
Messages: 125 Registered: August 2007
|
Senior Member |
|
|
i have the problem: VE NOT rebooting. i checked:
1. vz is present in crond.d
2. /usr/share/vzctl/scripts/vpsreboot scripts is present
3. crond is running
#service crond status
crond (pid 24765 8579) is running...
3. when rebooting a VE the following files are created:
reboot
halt
running on CentOS 4.5 with latest OpenVZ kernel. teplate is the default CentOS 4.5 with additions yum, mysql*, php*, and removed cups, samba
thanks in advance
[Updated on: Sat, 18 August 2007 19:55] Report message to a moderator
|
|
|
|
|
|
Re: VE not rebooting [message #16018 is a reply to message #16016] |
Sat, 18 August 2007 20:34 |
|
dowdle
Messages: 261 Registered: December 2005 Location: Bozeman, Montana
|
Senior Member |
|
|
Greetings,
Ok... I have to admit, I hadn't learned anything about this until you asked... so I played with it and I believe I understand how it works now.
Whenever the vz service starts up it copies /etc/vz/cron/vz to /etc/cron.d/vz (as the comments in /etc/vz/cron/vz indicate). Whenever the vz service is stopped, it removes the /etc/cron.d/vz file. The contents of the /etc/cron.d/vz reveal that it will run ever 5 minutes.
If you run reboot as root inside of a VPS it will do two things:
1) create a file named reboot on the root directory. The file doesn't contain anything but it is just the fact that it exists that is significant
2) shuts down the vps
Then from the host node, the vz script that is running from cron every five minutes looks into the private directories for all of the VPSes and if it sees a file named reboot, it'll start the VPS back up... which basically simulates a reboot of the VPS.
So I tried it.
I ran reboot in a VPS. That stopped it and sure enough /vz/private/VEID/reboot existed. I checked /var/log/cron to see when the last time the vz cronjob had run... and then at the five minute mark after it last ran, it did indeed start the VPS back up.
How long it takes to restart the VPS depends on where within the 5 minute cycle the VPS stopped and created the reboot file.
If you are waiting 5 minutes and it still isn't restarting the VPS, it isn't acting as it is supposed to... but the comment has been made in the other thread you mentioned... that some VPS OS templates don't seem to have that functionality setup correctly... and may not remove the reboot file... or may not create it to begin with. It all depends on the OS Template the VPS was made with I guess.
Knowing how it works though will allow you to figure out what is going on. After the VPS has stopped... is there a 0 byte file named reboot in the root directory of the VE's private directory? Does it restart if you wait at least 5 minutes after the previous run of the cron vz script? Does it clear the reboot file from the VE's private directory after it restarts?
--
TYL, Scott Dowdle
Belgrade, Montana, USA
[Updated on: Sat, 18 August 2007 20:36] Report message to a moderator
|
|
|
|
|
|
|
|
|
GUIs from a VPS [message #16065 is a reply to message #16064] |
Mon, 20 August 2007 18:58 |
|
dowdle
Messages: 261 Registered: December 2005 Location: Bozeman, Montana
|
Senior Member |
|
|
On the #openvz IRC channel this weekend someone was talking about NoMachine's NX product... and I know you had mentioned it... so I gave it a try.
After playing with it for a while, I think it works quite well. It is RDP-based (or something very similar) so it uses a lot less bandwidth than VNC and is much snappier than VNC... AND it runs over SSH so it is encrypted and requires no additional firewall ports to be open. I know I'm not telling you anything you don't already know... but this is new to me.
I ended up installing freenx (in CentOS Extras repo as well as a stock package in Fedora [which I run on my desktops]) on the server and the proprietary but free (as in beer) NX client for Linux. Worked rather well.
The only problem I had was I nuked a perfectly good CentOS 5 VPS when I tried adding the basic xfce envirnoment... because the package dependencies included udev and hal... and it ended up removing the vzdev package... making my VPS basically useless after that. On a CentOS 4 based VPS I had much better luck and got a minimal twm setup with xscreensaver without nuking vzdev. I was able to connect to the remote machine and get a fairly usable (speed wise) desktop.
After reading your comments and playing with it a little bit... I can imagine there indeed being a niche for running a remote desktop. The challenge will be to tweak the OpenVZ packaging stuff so one is able to install a usable set of GUI applications without breaking the VPS... which currently doesn't seem doable with CentOS... but perhaps other OS Templates? It would be nice if the vzdev package could say that it is a replacement for udev and hal (as well as any other packages that might break things) so that applications that say they depend on udev (etc) will install happily with vzdev. Something to work on I guess.
--
TYL, Scott Dowdle
Belgrade, Montana, USA
[Updated on: Mon, 20 August 2007 18:59] Report message to a moderator
|
|
|
|
|
|
|
|
|
Re: GUIs from a VPS [message #16147 is a reply to message #16139] |
Thu, 23 August 2007 22:33 |
|
dowdle
Messages: 261 Registered: December 2005 Location: Bozeman, Montana
|
Senior Member |
|
|
I gave up on freenx because after the initial luck I had, I had nothing but problems.
I installed vnc-server and have been using vncviewer... and over my 100Mbit LAN it works great.
From outside the LAN it is a bit pokey but usable.
--
TYL, Scott Dowdle
Belgrade, Montana, USA
|
|
|