Xen Dom0

From Alpine Linux
Revision as of 18:20, 14 August 2011 by Forth (talk | contribs) (fully working now)
Jump to: navigation, search

So before anything else verify that you car reliably log into your Alpine box through ssh, because with some video chipset (intel in my case) xen will blank your screen so you will have to use ssh.

Then upgrade you setup to Edge / testing (as of the date of writing, Xen is only avaible in Edge). Install Xen: apk add xen

Modify your extlinux.cfg: http://lists.alpinelinux.org/alpine-devel/1406.html

timeout 20 prompt 1 default grsec label grsec

kernel /boot/vmlinuz-grsec
append initrd=/boot/initramfs-grsec root=UUID=f40e340b-ea49-445b-81c0-4d7104b56662 modules=sd-mod,usb-storage,ext4

label xen

kernel mboot.c32
append /boot/xen-4.gz console=/dev/null dom0_mem=256M vga=mode-0x0311 --- /boot/vmlinuz-grsec root=UUID=f40e340b-ea49-445b-81c0-4d7104b56662 modules=sd-mod,usb-storage,ext4 vga=785 --- /boot/initramfs-grsec

Of course replace root=UUID= with your UUID in yours. Default menu.c32 can mangle with Xen, further investigation needed, so don't use for now.

Use the script found here: http://lists.xensource.com/archives/html/xen-devel/2010-03/msg01605.html

  1. !/bin/sh

test -d /proc/xen || exit 0 test -f /proc/xen/capabilities || mount -t xenfs xen /proc/xen test -f /proc/xen/capabilities || exit 0 grep -q "control_d" /proc/xen/capabilities || exit 0

for module in xen-evtchn evtchn blkbk netbk; do

        modprobe ${module}>/dev/null 2>&1

xl info won't work

Start xecommons: xencommons use bash, so install it: apk add bash (should try sh instead) alpine:/boot# /etc/init.d/xencommons start Starting xenstored...FATAL: Failed to open evtchn device: No such file or directory

well this will fail but xl info will work anyway

Oh but wait, evtchn device is built in the kernel, so why is there no /dev/xen/evtch file ? let's start udev ! ;)

That's all folks !