| 3 | | Place holder... |
| | 3 | In this example, we're creating a new server called jacobo. Change jacobo to the name of the server you are creating. |
| | 4 | |
| | 5 | * Create a disk (or disks) to be used by the vserver |
| | 6 | {{{ |
| | 7 | lvcreate --name jacobo_root --size 1G vg_ottorene0 |
| | 8 | }}} |
| | 9 | * Create a filesystem |
| | 10 | {{{ |
| | 11 | mkfs -t ext3 /dev/mapper/vg_ottorene0-jacobo_root |
| | 12 | }}} |
| | 13 | * Add the new disk to fstab so it is mounted on boot |
| | 14 | {{{ |
| | 15 | echo /dev/mapper/vg_ottorene0-jacobo_root /var/lib/vservers/jacobo ext3 defaults 0 2 >> /etc/fstab |
| | 16 | }}} |
| | 17 | * Make the target directory and mount it |
| | 18 | {{{ |
| | 19 | mkdir /var/lib/vservers/jacobo |
| | 20 | mount /var/lib/vservers/jacobo |
| | 21 | }}} |
| | 22 | * Create the vserver. Replace the context number with a number unique to the server |
| | 23 | {{{ |
| | 24 | vserver jacobo build -m debootstrap --context 201 --hostname jacobo --interface eth0:209.234.253.167/27 --initstyle plain -- -d lenny -m http://ftp.us.debian.org/debian -- --include less,psmisc,lsof,socat,emacs22-nox,emacs22-bin-common,emacs22-common,liblockfile1,emacsen-common,bsdmainutils,locales --keyring=/usr/share/keyrings/debian-archive-keyring.gpg |
| | 25 | }}} |
| | 26 | * Ensure that the server starts on boot |
| | 27 | {{{ |
| | 28 | echo default > /etc/vservers/jacobo/apps/init/mark |
| | 29 | }}} |
| | 30 | * Manually start the vserver |
| | 31 | {{{ |
| | 32 | vserver jacobo start |
| | 33 | }}} |
| | 34 | * Ensure that it started |
| | 35 | {{{ |
| | 36 | vserver-stat |
| | 37 | }}} |
| | 38 | * Enter the vserver |
| | 39 | {{{ |
| | 40 | vserver jacobo enter |
| | 41 | }}} |
| | 42 | |
| | 43 | Here's the output of a full session: |