User:Mattx86/qwn:Switching from Alpine Standard/Mini to Alpine VServer

From Alpine Linux
Revision as of 10:26, 15 March 2011 by Mattx86 (talk | contribs) (Created page with "<pre> Switching from Alpine Standard/Mini to Alpine VServer ----------------------------------------------------- # apk add linux-vserver util-vserver # vi /boot/extlinux.conf ...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.
Switching from Alpine Standard/Mini to Alpine VServer
-----------------------------------------------------

# apk add linux-vserver util-vserver
# vi /boot/extlinux.conf
  * copy and paste grsec configuration
  * change grsec to vserver in the copied grsec configuration
  * change default line to vserver
  * save and exit
# reboot

Creating a vserver template:
# mkdir /tmp/vstpl
# apk add --initdb --root /tmp/vstpl --repositories-file /etc/apk/repositories --keys-dir /etc/apk/keys -U alpine-base
# chroot /tmp/vstpl /sbin/rc-update add syslog boot
  * the vserver .. build command seems to add syslog to the boot runlevel, so this may be unnecessary.
# cd /tmp/vstpl && tar -czf /tmp/vstpl.tar.gz *
# rm /tmp/vstpl -rf

Creating a vserver guest:
# vserver guest1 build --interface eth0:192.168.1.26/24 --hostname guest1 -m template -- -t /tmp/vstpl.tar.gz -d alpine

Starting the vserver guest:
# vserver guest1 start
  * I need to see why this happens:
    mount: permission denied (are you root?)
    mount: permission denied (are you root?)

Entering the vserver guest:
# vserver guest1 enter