OpenVZ Forum


Home » General » Support » null template?
null template? [message #3028] Tue, 09 May 2006 02:20 Go to next message
John Kelly is currently offline  John Kelly
Messages: 97
Registered: May 2006
Location: Palmetto State
Member
Hi all,

I'm getting started with openvz, it looks very interesting. I have the 2.6.16 vz kernel compiled and booted on my HN, and I also installed vzctl, from source.

I have a small custom built distro in a tar.gz. It has no RPMS or package management, only directories and files. I have no idea how to construct an install template from it.

I want to unpack it into a /vz directory, and then boot it as a VPS. Is that possible, without templates? Or maybe a null template?
Re: null template? [message #3034 is a reply to message #3028] Tue, 09 May 2006 15:01 Go to previous messageGo to next message
dev is currently offline  dev
Messages: 1693
Registered: September 2005
Location: Moscow
Senior Member

you just need to extract your .tar.gz to /vz/private/<VPSID> and create a config for it (for example, copy the existing one).
after that just check that you have /vz/private/<VPSID>/bin/init, i.e. you extracted correctly and try to start your new VPS.
I suppose there will be some problems with networking if your distro is too much different from FC/RHEL/Debian etc. but it can be fixed with creation of custom vzctl scripts.


http://static.openvz.org/userbars/openvz-developer.png
Re: null template? [message #3053 is a reply to message #3034] Wed, 10 May 2006 05:53 Go to previous messageGo to next message
John Kelly is currently offline  John Kelly
Messages: 97
Registered: May 2006
Location: Palmetto State
Member
dev wrote on Tue, 09 May 2006 11:01

you just need to extract your .tar.gz to /vz/private/<VPSID> and create a config for it (for example, copy the existing one). after that just check that you have /vz/private/<VPSID>/bin/init, i.e. you extracted correctly and try to start your new VPS.


OK, I will try that later. For now, I installed FC4 to see how everything fits together. Looks nice. This will be great for application testing!

I don't understand the /vz/root mount though. I see where the files get installed to /vz/private, and when the VPS starts, the files also appear in /vz/root. But in the HN, "mount" does not show it.

It's a mystery to me. Can anyone explain it?

Re: null template? [message #3054 is a reply to message #3053] Wed, 10 May 2006 05:58 Go to previous messageGo to next message
dev is currently offline  dev
Messages: 1693
Registered: September 2005
Location: Moscow
Senior Member

it's quite easy. /vz/private contains private VPS files.
/vz/root contains directory tree as VPS see it. e.g. you can construct /vz/root/VPSID with private VPS tree and mount some external trees there (e.g. NFS etc.).

/vz/root/VPSID is mounted with simfs filesystem, which works on top of ext3/others and provides correct disk space information.


http://static.openvz.org/userbars/openvz-developer.png
Re: null template? [message #3056 is a reply to message #3053] Wed, 10 May 2006 06:41 Go to previous messageGo to next message
dev is currently offline  dev
Messages: 1693
Registered: September 2005
Location: Moscow
Senior Member

also note, there is no any magic, just 'mount' command doesn't show dirs which are not in /etc/mtab.
you can check _all_ the real mounts with:
# cat /proc/mounts


http://static.openvz.org/userbars/openvz-developer.png
Re: null template? [message #3072 is a reply to message #3053] Thu, 11 May 2006 08:26 Go to previous message
kir is currently offline  kir
Messages: 1645
Registered: August 2005
Location: Moscow, Russia
Senior Member

The mount is not shown in "mount" command output since "-n" option is used while mounting, thus the mount is not written to /etc/mtab. If you will look into /proc/mounts you will find that mount there.

Kir Kolyshkin
http://static.openvz.org/userbars/openvz-developer.png
Previous Topic: VPS with no barrir and no limit
Next Topic: *FIXED* cannot compile test012.1
Goto Forum:
  


Current Time: Fri Sep 13 05:17:02 GMT 2024

Total time taken to generate the page: 0.05187 seconds