Difference between revisions of "Setting up a xen server"

From FreekiWiki
Jump to navigation Jump to search
 
(pulled docs from RT ticket)
Line 1: Line 1:
do it
+
i've configured and played with xen on laze.
 +
 
 +
== to set create the parent server (out of date?) ==
 +
as long as you don't read the documentation(at least, i found it very confusing and intimidating), it's actually not much more difficult than vserver.
 +
 
 +
apt-get install xen-linux-system-2.6.18-3-xen-vserver-686 xen-tools libc6-xen
 +
 
 +
(alternately, you could install xen-linux-system-2.6.18-3-xen-686, or xen-linux-system-2.6.18-3-xen-vserver-686)
 +
 
 +
martin noticed that you likely will need to edit
 +
 
 +
/etc/xen-tools/xen-tools.conf:
 +
 
 +
kernel = /boot/vmlinuz-2.6.18-3-xen-vserver-686
 +
initrd = /boot/initrd.img-2.6.18-3-xen-vserver-686
 +
 
 +
to match the kernel you have installed
 +
 
 +
[http://bugs.debian.org/405223]
 +
 
 +
i've been unable to verify if this helps at all, but:
 +
 
 +
[http://lists.xensource.com/archives/html/xen-users/2006-11/msg00034.html]
 +
 
 +
echo 'hwcap 0 nosegneg' > /etc/ld.so.conf.d/libc6-xen.conf
 +
 
 +
appears to not help at all, at least on laze.
 +
 
 +
== to create an instance on the parent server ==
 +
you create new xen instances with:
 +
 
 +
xen-create-image --hostname NAME --debootstrap --mirror http://some.debian.mirror/debian --dist etch
 +
 
 +
(you set some default values in /etc/xen-tools/xen-tools.conf)
 +
 
 +
you start a xen instance with:
 +
 
 +
xm create NAME.cfg
 +
 
 +
list the running xen instances and how much resources they're using:
 +
 
 +
xm list
 +
 
 +
to get networking to work, i had to uncomment in /etc/xen/xend-config.sxp:
 +
(network-script network-bridge)
 +
 
 +
and restart xend:
 +
 
 +
invoke-rc.d xend restart
 +
 
 +
reclaim memory for the host machine stolen by stopped xen instances:
 +
 
 +
xm mem-set Domain-0 700
 +
 
 +
(for 700MB of ram)
 +
 
 +
to get to a login screen on the vm, either ssh in, or:
 +
 
 +
xm console NAME
 +
 
 +
there's some mechanism to start instances at boot time i haven't yet explored, but it doesn't sound difficult.
 +
 
 +
 
  
 
[[Category:ASS]]
 
[[Category:ASS]]

Revision as of 18:13, 6 December 2007

i've configured and played with xen on laze.

to set create the parent server (out of date?)

as long as you don't read the documentation(at least, i found it very confusing and intimidating), it's actually not much more difficult than vserver.

apt-get install xen-linux-system-2.6.18-3-xen-vserver-686 xen-tools libc6-xen

(alternately, you could install xen-linux-system-2.6.18-3-xen-686, or xen-linux-system-2.6.18-3-xen-vserver-686)

martin noticed that you likely will need to edit

/etc/xen-tools/xen-tools.conf:
kernel = /boot/vmlinuz-2.6.18-3-xen-vserver-686
initrd = /boot/initrd.img-2.6.18-3-xen-vserver-686

to match the kernel you have installed

[1]

i've been unable to verify if this helps at all, but:

[2]

echo 'hwcap 0 nosegneg' > /etc/ld.so.conf.d/libc6-xen.conf

appears to not help at all, at least on laze.

to create an instance on the parent server

you create new xen instances with:

xen-create-image --hostname NAME --debootstrap --mirror http://some.debian.mirror/debian --dist etch

(you set some default values in /etc/xen-tools/xen-tools.conf)

you start a xen instance with:

xm create NAME.cfg

list the running xen instances and how much resources they're using:

xm list

to get networking to work, i had to uncomment in /etc/xen/xend-config.sxp: (network-script network-bridge)

and restart xend:

invoke-rc.d xend restart

reclaim memory for the host machine stolen by stopped xen instances:

xm mem-set Domain-0 700

(for 700MB of ram)

to get to a login screen on the vm, either ssh in, or:

xm console NAME

there's some mechanism to start instances at boot time i haven't yet explored, but it doesn't sound difficult.