User Tools

Site Tools


docs:vserver

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision Both sides next revision
docs:vserver [2012-10-28 12:39]
glen cleanup dead links, update desc
docs:vserver [2012-10-28 12:50]
glen refreshen creating vserver docs
Line 14: Line 14:
  
 ===== Installing Vserver host on PLD Linux ===== ===== 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 # poldek -u kernel
 </​file>​ </​file>​
  
 +or alternatively,​ a longterm stable kernel:
 +<​file>​
 +# poldek -u kernel-longterm
 +</​file>​
  
 ===== Installing guest PLD Linux Vserver ===== ===== Installing guest PLD Linux Vserver =====
Line 25: Line 30:
  
 ==== Preparing userspace tools ==== ==== Preparing userspace tools ====
-First, install the tools: ​ 
  
-<​file>#​ poldek -u util-vserver+First, install the tools: 
 +<​file>​ 
 +# poldek -u util-vserver
 </​file>​ </​file>​
-Then configure //​poldek.conf//: ​ 
  
-<​file>#​ vim /​etc/​vservers/​.distributions/​pld-XX/poldek/repos.d/​pld.conf +If you need to review poldek repo sources, then the configs are in 
-</​file>​ +''​/​etc/​vservers/​.distributions/​pld-*/poldek/''​ 
-Where XX is: ac, ti, th +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. ​ At this point you should have booted into vserver-enabled kernel. You must start ''​vprocunhide''​ or none of your Vservers can start. ​
Line 39: Line 44:
 To start ''​vprocunhide'': ​ To start ''​vprocunhide'': ​
  
-<​file>#​ /​sbin/​service vprocunhide start+<​file>​ 
 +# /​sbin/​service vprocunhide start
 </​file>​ </​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>​ </​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-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: ​ 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>​ </​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: ​ 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 +<​file>​ 
-vserver ​test build --context ​<​num> ​-m poldek -n test --personality linux_32bit ​--machine i686 -- -d pld-th+MIRROR=http://​ftp.pld-linux.org/​dists/​ac 
 + 
 +vserver ​$NAME build --context ​$CTX -m poldek -n $NAME -- -m $MIRROR
 </​file>​ </​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): ​ 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>​ </​file>​
 To see other ''​build''​ command options: ​ To see other ''​build''​ command options: ​
  
-<​file>#​ vserver test build --help+<​file>​ 
 +# vserver test build --help
 </​file>​ </​file>​
 +
 Install ''​rc-scripts''​ to the new system using ''​vpoldek'': ​ Install ''​rc-scripts''​ to the new system using ''​vpoldek'': ​
  
-<​file>#​ vpoldek test -- -u rc-scripts+<​file>​ 
 +# vpoldek test -- -u rc-scripts
 </​file>​ </​file>​
 +
 you should consider installing ''​vserver-packages''​ rpm package to satisfy packages dependency which have no use inside vserver. ​ you should consider installing ''​vserver-packages''​ rpm package to satisfy packages dependency which have no use inside vserver. ​
  
 And then start the guest system: ​ And then start the guest system: ​
  
-<​file>#​ vserver test start+<​file>​ 
 +# vserver test start
 </​file>​ </​file>​
 +
 To enter that vserver, type:  To enter that vserver, type: 
  
-<​file>#​ vserver test enter+<​file>​ 
 +# vserver test enter
 </​file>​ </​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. ​
  
  
docs/vserver.txt · Last modified: 2015-10-05 15:07 by glen