Xen VPS

From ParabolaWiki
Jump to: navigation, search

This guide assumes you've already got a working Xen server, and a clean Parabola system installed. I use a Debian Xen server, for legacy reasons, and VirtualBox to create Parabola systems.

$ mkfs.ext3 /dev/vg-00/lv-01    ## format primary partition
$ mkswap /dev/vg-00/lv-02       ## format swap
$ mkdir /tmp/install
$ mount /dev/vg-00/lv-01 /tmp/install
$ mkdir /tmp/install/{proc,sys}
$ chmod 555 /tmp/install/proc
$ rsync -avzH --delete --exclude=proc/ --exclude=sys/ parabola-system:/ /tmp/install/

$ vi /etc/xen/parabola-vps     ## create config file
     kernel = "/boot/vmlinuz-linux-libre-xen"
     ramdisk = "/boot/initramfs-linux-libre-xen.img"
     memory = 1024
     name = "parabola.parabolagnulinux.org"
     vif  = [ 'ip=999.999.999.999,mac=00:01:02:03:04:05' ]
     disk = [ 
              'phy:/dev/vg-00/lv-01,xvda1,w', 
              'phy:/dev/vg-00/lv-02,xvda2,w', 
            ]
     hostname = "parabola"
     root = "/dev/xvda1 ro"

$ vi /tmp/install/etc/inittab
    c1:2345:respawn:/sbin/agetty -8 38400 hvc0 linux
    #c1:2345:respawn:/sbin/agetty -8 38400 tty1 linux
    #c2:2345:respawn:/sbin/agetty -8 38400 tty2 linux
    #c3:2345:respawn:/sbin/agetty -8 38400 tty3 linux
    #c4:2345:respawn:/sbin/agetty -8 38400 tty4 linux
    #c5:2345:respawn:/sbin/agetty -8 38400 tty5 linux
    #c6:2345:respawn:/sbin/agetty -8 38400 tty6 linux

$ umount /tmp/install
$ xm create -c parabola-vps

Also, ensure you've copied vmlinuz-linux-libre-xen and initramfs-linux-libre-xen.img to Dom0 /boot/.