[PLDWWW] page changed: docs:vserver
"Elan Ruusamäe (glen)"
glen at pld-linux.org
Sun Oct 28 12:50:34 CET 2012
refreshen creating vserver docs
--- https://www.pld-linux.org/docs/vserver?rev=1351424350
+++ https://www.pld-linux.org/docs/vserver
@@ -12,84 +12,116 @@
* [[http://www.gentoo.org/doc/en/vserver-howto.xml|Gentoo Linux-VServer Howto]] you'll need this if you want to setup Gentoo guest vserver
===== Installing Vserver host on PLD Linux =====
- Build and install the kernel:
- <file>$ ./builder -bb kernel.spec
+ vserver support is included in PLD Linux main kernels, so you can just install kernel package
+
+ <file>
# poldek -u kernel
</file>
+ or alternatively, a longterm stable kernel:
+ <file>
+ # poldek -u kernel-longterm
+ </file>
===== Installing guest PLD Linux Vserver =====
==== Preparing userspace tools ====
- First, install the tools:
- <file># poldek -u util-vserver
+ First, install the tools:
+ <file>
+ # poldek -u util-vserver
</file>
- Then configure //poldek.conf//:
- <file># vim /etc/vservers/.distributions/pld-XX/poldek/repos.d/pld.conf
- </file>
- Where XX is: ac, ti, th
+ If you need to review poldek repo sources, then the configs are in
+ ''/etc/vservers/.distributions/pld-*/poldek/''
+ where ''*'' can be ''ac'' or ''th'' depending which guest you wish to install.
At this point you should have booted into vserver-enabled kernel. You must start ''vprocunhide'' or none of your Vservers can start.
To start ''vprocunhide'':
- <file># /sbin/service vprocunhide start
+ <file>
+ # /sbin/service vprocunhide start
</file>
+ ==== Guest creation ====
- ==== Actual guest creation ====
- Build the guest system:
+ Build the guest system.
- <file># vserver test build --context <num> -m poldek -n test
+ <file>
+ # a guest name (not hostname)
+ NAME=test
+ # <num> must be a number within 2-32767 range.
+ CTX=2
+
+ vserver $NAME build --context $CTX -m poldek -n $NAME
</file>
- <num> must be a number within 2-32767 range.
- There are two versions of PLD available for guest systems:
+ This defaults installing guest same ARCH and VERSION that your host is.
+ If you need to use another combination, then there are two versions of PLD available for guest systems:
* pld-ac - [[:AcInfo|PLD 2.0 (Ac)]]
- * pld-th - [[:ThInfo|PLD 3.0 (Th)]]
+ * pld-th - [[:ThInfo|PLD 3.0 (Th)]]
+
You may choose one using ''-d'' option:
+ <file>
+ DIST=pld-th
- <file># vserver test build --context <num> -m poldek -n test -- -d pld-th
+ vserver $NAME build --context $CTX -m poldek -n $NAME -- -d $DIST
</file>
+
using ''util-vserver >= 0.30.214-2'' from ac-updates, ''util-vserver >= 0.30.215-2'' from from th you can build other arch or distro or using own mirror:
- <file># vserver test build --context <num> -m poldek -n test -- -m http://ftp.pld-linux.org/dists/ac
- # vserver test build --context <num> -m poldek -n test --personality linux_32bit --machine i686 -- -d pld-th
+ <file>
+ MIRROR=http://ftp.pld-linux.org/dists/ac
+
+ vserver $NAME build --context $CTX -m poldek -n $NAME -- -m $MIRROR
</file>
+
+ To build 32bit guest on 64bit host:
+ <file>
+ vserver $NAME build --context $CTX -m poldek -n $NAME --personality linux_32bit --machine i686 -- -d $DIST
+ </file>
+
To build vserver from template (archive containing whole filesystem):
- <file># vserver test build --context <num> -m template -n test -- -t image.tar.bz2
+ <file>
+ # vserver $NAME build --context $CTX -m template -n $NAME -- -t image.tar.bz2
</file>
To see other ''build'' command options:
- <file># vserver test build --help
+ <file>
+ # vserver test build --help
</file>
+
Install ''rc-scripts'' to the new system using ''vpoldek'':
- <file># vpoldek test -- -u rc-scripts
+ <file>
+ # vpoldek test -- -u rc-scripts
</file>
+
you should consider installing ''vserver-packages'' rpm package to satisfy packages dependency which have no use inside vserver.
And then start the guest system:
- <file># vserver test start
+ <file>
+ # vserver test start
</file>
+
To enter that vserver, type:
- <file># vserver test enter
+ <file>
+ # vserver test enter
</file>
- Note, however, that if you don't run //plain// init style you must have at least one daemon running inside your guest vserver or it will be shut down shortly.
+ Note, however, that if you don't run //plain// init style you must have at least one daemon running inside your guest vserver or it will be shut down shortly.
===== Configuring the network =====
''/etc/vservers/<vserver-name>/interfaces/<iface>''
Diff URL:
https://www.pld-linux.org/docs/vserver?do=diff&r1=1351424350&r2=1351425033
--
This mail was generated by DokuWiki at
https://www.pld-linux.org/
More information about the pld-cvs-commit
mailing list