Xen Dom0: Difference between revisions

From Alpine Linux
(fully working now)
m (first try to format this article)
Line 1: Line 1:
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.
So before anything else verify that you can '''reliably''' log into your Alpine box through [[Setting_up_a_ssh-server|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).
Then upgrade your setup to [[Upgrading_to_Edge|Edge/testing]] (as of the date of writing, Xen is only available in Edge). Install Xen:
Install Xen:
 
apk add xen
{{Cmd|apk add xen}}


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


<pre>
timeout 20
timeout 20
prompt 1
prompt 1
Line 16: Line 17:
  kernel mboot.c32
  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
  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
 
</pre>
Of course replace root=UUID= with '''your''' UUID in yours.
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.
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
Use the script found here: http://lists.xensource.com/archives/html/xen-devel/2010-03/msg01605.html
 
<pre>
#!/bin/sh
#!/bin/sh


Line 32: Line 33:
         modprobe ${module}>/dev/null 2>&1
         modprobe ${module}>/dev/null 2>&1
         done
         done
 
</pre>
xl info won't work
xl info won't work


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

Revision as of 04:39, 21 August 2011

So before anything else verify that you can 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 your setup to Edge/testing (as of the date of writing, Xen is only available 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

#!/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
         done

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 !