For this setup, I want to install Debian Lenny with several Xen virtual machines. The hardware is an older Dell something in a black case, so the dom0 domain will be called "blackbox" and the domU domains will be known by other colors. I don't need any GUI stuff for this install since it'll just be doing server-ish terminal stuff.
Install
Install Debian from the net install CD. From the screen to select "choose software to install" deselect the Desktop Environment unless you want it for some reason. Leave Standard System selected.
This Debian install doesn't come with sudo so just use su instead. You can install sudo if you really want to but then you'll have to configure it.
I like to setup the system so I can SSH to the box and I don't have to spend all my time in the basement.
su
aptitude install -R openssh-server
aptitude install openssh-blacklist-extra
aptitude install -R avahi-daemon
reboot
Remote Control
From the comfort of a computer not in a server room or basement ssh to box. Just to test it properly, I like to remote in, and reboot the machine. If that works you know you have full remote control of the box.
ssh blackbox.local
su
reboot
Static IP
By default if Debian can use DHCP, it will, but since we are running a server we probably want it to have a static IP address. So get in there and change it. You should be careful, because if you screw it up you have to head back to the physical machine and update it.
vim /etc/network/interfaces
(edit this line)When you've got it perfect run I prefer to reboot (reboot) the system again just for good measure. Some people will prefer to just restart the networking bits on the system (/etc/init.d/networking restart).
iface eth0 inet dhcp
(change it to this, in my case)
iface eth0 inet static
address 192.168.25.80
netmask 255.255.255.0
network 192.168.25.0
broadcast 192.168.25.255
gateway 192.168.25.1
You'll be disconnected from your ssh session but should be able to reconnect with ssh blackbox.local again.
Setup Xen
Up until this point, the rest of that junk was pretty basic setup that would apply to all Debian Lenny installs, but here's where we actually get specialized.
su
aptitude install -R bridge-utils
aptitude install -R xen-linux-system-2.6.26-2-xen-686
aptitude install -R xen-utils-3.2-1
aptitude install -R xen-shellaptitude install -R xen-tools
reboot
uname -r
... make sure it that "xen" is included in the name of the kernel
su
vim /etc/xen/xend-config.sxp
... uncomment (network-script network-bridge)
... comment (network-script network-dummy)
vim /etc/modules
... edit loop to loop max_loop=64
... uncomment dir = /home/xen
... edit dist = etch to dist = lenny
... uncomment gateway = 192.168.1.1
... uncomment netmask = 255.255.255.0
... uncomment broadcast = 192.168.1.255
... edit network addresses to match your configuration
... uncomment passwd = 1
reboot (just for good measure)
Conclusion
Now everything should be setup properly. Cross your fingers
No comments:
Post a Comment