Archive

Archive for the ‘xen’ Category

HowTo: new debian squeeze VM for XEN (the manual way)

August 24th, 2012 No comments

How to set up debian squeeze as domU. Replace irc with the desired name

execute on dom0:

1
2
3
4
5
6
7
8
mkdir /mnt/target
lvcreate -L 20G vg -nirc
lvcreate -L 2G vg -nirc_swap
mkfs.ext3 /dev/vg/irc
mkswap /dev/vg/irc_swap
mount /dev/vg/irc /mnt/target
cd /mnt/target
debootstrap squeeze . http://ftp.us.debian.org/debian

configuring:

1
2
3
4
vi etc/fstab
vi etc/network/interfaces
chroot . /bin/bash
passwd

basic installation fixup:

1
2
3
4
apt-get remove vim-tiny
apt-get install vim ctags vim-doc vim-scripts
exit
umount /mnt/target
1
vi /etc/xen/irc

(fix up before pasting!)

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#  -*- mode: python; -*-
kernel   = "/boot/vmlinuz-X-xen-amd64"
ramdisk  = "/boot/initrd.img-X-xen-amd64"

memory   = 512
name     = 'irc'

hostname = name + ".yourdomain.com"

vif = [
        'ip=<IPV6> <IPV4>,mac=<MAC>',
        'ip=<IPV4_internal>,mac=<MAC>'
      ]

disk = [
        'phy:/dev/vg/'+name+'     ,sda1,w',
        'phy:/dev/vg/'+name+'_swap,sda2,w'
       ]

root     = "/dev/sda1 ro"

vcpus = "1"
cpus="3"
extra = "xencons=tty console=xvc0 barrier=0 clocksource=jiffies"

boot the new machine:

1
2
3
4
5
6
xm create -c irc
#after logging in:
vi /etc/hostname
hostname <>
apt-get install openssh-server
# install more software now :)

now how to install qwebirc, in case you want that ;)

1
2
3
4
5
6
7
8
9
10
apt-get install python python-twisted python-twisted-bin python-twisted-core python-twisted-runner python-twisted-names python-twisted-mail python-twisted-words python-twisted-web python-zope.interface python-openssl openjdk-6-jdk mercurial
cd /opt/
hg clone http://hg.qwebirc.org/qwebirc/
cp config.py.example config.py
vi config.py
# fix your config up!
python compile.py
# start it up on port 80 :)
python run.py -p 80
# visit your ip in your browser

and done, have fun :)

Categories: bash, server, xen Tags:

extended XEN wiki a bit

July 13th, 2010 No comments

so the XEN Networking page is really nice, but misses some actual usage examples, so i started with that and added our setup there:

http://wiki.xensource.com/xenwiki/XenNetworking#head-c68ea7b3a6b235b59401445549210309cdac6a82

Categories: xen Tags: