NetBSD and XenSome days ago, I read something about Xen, which is a virtual machine monitor for x86 hardware. Ok, I know Linux vServers and FreeBSD Jails, which are not working with my NetBSD machines. Thus I tried it. Xen supports multiple guest operating systems on a single machine. Each guest OS (in Xen called 'domain') requires a modified Kernel which supports Xen, to access the physical hardware. The normal bootloader will be replaced with grub, which can load the Xen kernel along witch the guest kernel foer the first domain (domain0). The first domain can access all physical hardware and administrate other domains. I wanted to use NetBSD as domain0 and as unprivileged domain. But it's also possible to use FreeBSD, Linux and Plan9. So I have the chance to install a FreeBSD inside my NetBSD box, for testing etc. First we need to setup our host system (domain0), which can be done with a normal NetBSD installation (I used 3.0). See http://www.netbsd.org/guide/en/chap-inst.html for more details. Keep in mind, that you need own partitions for Xen. It's also possible to use large files and map them with vnd. First of all, we need some packages.
# cd /usr/pkgsrc/sysutils/grub
# make install
# cd /usr/pkgsrc/sysutils/xentools20
# make install
# cd /usr/pkgsrc/sysutils/xenkernel20
# make install
# grub-install /dev/wd0d
default=0
timeout=10
serial --unit=0 --speed=115200 --word=8 --parity=no --stop=1
terminal --timeout=10 vga console
title Xen 2.0 / NetBSD 3 (hda0, vga)
root(hd0,0)
kernel (hd0,a)/xen.gz dom0_mem=65536
module (hd0,a)/netbsd-XEN0 root=/dev/hda1 ro console=tty0
title NetBSD 3.0
root (hd0,a)
kernel --type=netbsd /netbsd-GENERIC
create
!brconfig bridge0 add rtk0
!brconfig bridge0 up
# chmod +x /etc/ifconfig.bridge0
# chmod +x /usr/pkg/etc/xen/network
# chmod +x /usr/pkg/etc/xen/vif-bridge
# cd /dev && sh MAKEDEV xen
# cp /usr/pkg/share/examples/rc.d/xend* /usr/pkg/etc/rc.d/
# echo "xend=YES" >> /etc/rc.conf
# /usr/pkg/etc/rc.d/xend start
# xm list
Name Id Mem(MB) CPU State Time(s) Console
Domain-0 0 63 0 r---- 1145.0
kernel = "/netbsd-INSTALL_XENU"
memory = 128
name = "setup"
cpu = -1
nics = 1
vif = [bridge=bridge0' ]
disk = [ 'phy:/dev/cd0a,cd0a,r', 'phy:/dev/wd0h,wd0d,w' ]
root = "/dev/wd0d"
# xm create -c /usr/pkg/etc/xen/setup
kernel = "/netbsd-XENU"
memory = 128
name = "test"
cpu = -1
nics = 1
vif = [ 'bridge=bridge0' ]
disk = [ 'phy:/dev/wd0h,wd0d,w' ]
root = "/dev/wd0d"
xm create -c /usr/pkg/etc/xen/test
powerd=YES
xendomains="test"
15. Mai, 2006
Kommentar hinzufügen |
Tag CloudCoding Django Eclipse Frauen Fun Google JSON Java Linux Mail NetBSD OS X Postfix Python SQLite SSH Unix WindowsKategorienArchiv
Links![]()
|
||
|
Social Bookmarking Copyright © 2006 treibsand.com. All Rights Reserved |
|||