OpenVZ Forum - RDF feed
type: channel
items: null template?
items: Re: null template?

null template?
type: item
description: 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?
creator: John Kelly
date: 2006-05-09T02:20:17-00:00

Re: null template?
type: item
description: 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.
creator: dev
date: 2006-05-09T15:01:01-00:00

Re: null template?
type: item
description: 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?
creator: John Kelly
date: 2006-05-10T05:53:57-00:00

Re: null template?
type: item
description: 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.
creator: dev
date: 2006-05-10T05:58:06-00:00

Re: null template?
type: item
description: 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
creator: dev
date: 2006-05-10T06:41:25-00:00

Re: null template?
type: item
description: 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.
creator: kir
date: 2006-05-11T08:26:39-00:00