Difference between revisions of "Setting up a xen server"

From FreekiWiki
Jump to navigation Jump to search
(pulled docs from RT ticket)
Line 26: Line 26:
  
 
appears to not help at all, at least on laze.
 
appears to not help at all, at least on laze.
 +
 +
When it's all finished, review values in /etc/xen-tools/xen-tools.conf ???
  
 
== to create an instance on the parent server ==
 
== to create an instance on the parent server ==
 
you create new xen instances with:
 
you create new xen instances with:
  
  xen-create-image --hostname NAME --debootstrap --mirror http://some.debian.mirror/debian --dist etch
+
  sudo xen-create-image --hostname NAME --debootstrap --mirror http://mirrors.kernel.org/debian --dist etch --ip IP_ADDRESS
 +
 
 +
Prepare to wait awhile while this all installs. Kill your time by editing the appropriate dns files and the purpose file in the ass svn project, check your work, and then commit the changes. Then ssh into dns1 and:
 +
 
 +
cd /var/cache/bind
 +
svn update
 +
/etc/init.d/bind9 reload
 +
sudo /etc/init.d/bind9 reload
 +
 
 +
Continue waiting for your install to happen. Go help out at the Front Desk or something.
 +
 
 +
It will ask for a root password. Have one prepared and ready to go.
 +
 
 +
Your configuration file will be in:
 +
 
 +
/etc/xen/NAME.cfg
  
(you set some default values in /etc/xen-tools/xen-tools.conf)
+
Check to see that it is there.
  
you start a xen instance with:
+
To start the xen instance:
  
  xm create NAME.cfg
+
  xm create /etc/xen/NAME.cfg
  
list the running xen instances and how much resources they're using:
+
To list the running xen instances and how much resources they're using:
  
 
  xm list
 
  xm list
  
to get networking to work, i had to uncomment in /etc/xen/xend-config.sxp:
+
To get networking to work, i had to uncomment in /etc/xen/xend-config.sxp:
 
(network-script network-bridge)
 
(network-script network-bridge)
  

Revision as of 18:09, 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.

When it's all finished, review values in /etc/xen-tools/xen-tools.conf ???

to create an instance on the parent server

you create new xen instances with:

sudo xen-create-image --hostname NAME --debootstrap --mirror http://mirrors.kernel.org/debian --dist etch --ip IP_ADDRESS

Prepare to wait awhile while this all installs. Kill your time by editing the appropriate dns files and the purpose file in the ass svn project, check your work, and then commit the changes. Then ssh into dns1 and:

cd /var/cache/bind
svn update
/etc/init.d/bind9 reload
sudo /etc/init.d/bind9 reload

Continue waiting for your install to happen. Go help out at the Front Desk or something.

It will ask for a root password. Have one prepared and ready to go.

Your configuration file will be in:

/etc/xen/NAME.cfg

Check to see that it is there.

To start the xen instance:

xm create /etc/xen/NAME.cfg

To 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.