More playing with OpenVZ

Jeremy Davis's picture

Ok I'm revisiting my OpenVZ templates and been thinking about packaging as a distributable item (not sure if there's a lot of demand but still ...)

Now, I have a couple of questions:

  1. Have you any suggestions on why the confconsole doesn't run at boot as it should? Any ideas on where to start with that one?
  2. As I mentioned back in my original OpenVZ topic I can get the confconsole to run, but unless I set the network to be bridged (and use DHCP initially) it configures the wrong interface. Is there a way to adjust which interface the confconsole configures?
  3. Is there a way I can invoke the install config console on an already installed machine (ie the password requests etc, obviously not the partitioning stuff) or is that going to be too painful? Would devising a separate 'first run' config script be a better option?
  4. Following on from that, what would be the best way to get a script to run once only (on first boot)? I gather that update-rc.d is the go but would you just set it to run everytime but have the script itself remove its startup entry or is there another way? I've heard that cron can run scripts "on boot/reboot" and "on next boot/reboot", also in my googling I have come across mention of a "skeleton file" which I have no idea about.

If I can get these sorted out I'll happily upload my templates somewhere so others can play with them if they desire. Or perhaps I'd be better off providing my OpenVZ template creation script (which I've already been using for my own purposes, but it would need a lot of polish to share) and let users work that out themselves?

Alon Swartz's picture

Regarding executing scripts on boot, we developed the package inithooks which is exactly what you are looking for, and more. It is included in all 2009.10 appliances.
Regarding confconsle, the default interface is chosen dynamically (when possible), but it is configurable in /etc/confconsole/confconsole.conf.
Jeremy Davis's picture

Thanks for the info. When I get a chance I'll have a play with it. initihooks looks like exactly what I was after! Just one little typo in the readme - 3rd paragraph: "The init script is executed quiet early on in system...". It may well be quiet but I imagine you meant "quite early on"! (sorry to be so pedantic).

Thanks too for the info on confconsole config.

Any ideas about a password setting script? Or should I just make one up?


Post new comment