5 Feb 2008
This is what I did to get Xen up and running on a Mac Mini. The unit I've got was purchased February 2008 - it's a 2.0Ghz Intel Core Duo 2, which has the IntelVT feature you need for full virtualization (this was enabled by default). Because these boxes have (pretty much) uniform hardware I'm going to skip most of the detail and just go through what I did. Some design decisions I made included: Use a minimal dom0, use LVM, keep OS X around and no swap - 2GB ought to be enough for anyone, right?
enable-always.sh
to cause the rEFit boot loader to load for every boot.apt-cache search xen-linux-system
to see what the most recent Xen kernel is. For me it was "xen-linux-system-2.6.18-xen-686".
apt-get install ssh openssh-server less ntp pciutils file parted lvm2 lvm-common xen-utils xen-docs-3.0 bridge-utils xen-tools libc6-xen xen-ioemu-3.0.3-1 xen-linux-system-NNN-xen-686
. Naturally NNN is the version you found in the previous step.xm list)
.pvcreate /dev/sda4
to create an LVM physical volume from the rest of your disk.vgcreate vg /dev/sda4
to create a Volume Group.eetc/xen-tools/xen-tools.conf
to use the LVM group you've just created.parted
instead if you want to mess with partitions.xenbr0
network interface created). Maybe this is because the Ethernet comes up as eth1
rather than eth0
, I don't know. What I did to start it was:
/etc/xen/scripts/network-bridge start vifnum=0 bridge=xenbr0 netdev=eth1
to the end of /etc/init.d/rc.local
. Although I might go back and add that to the /etc/init.d/xend
instead, as it should happen before the domU boots. Maybe there is somewhere better, I'm still figuring out debian.mkdir /etc/xen/auto
and ln -s /etc/xen/host.cfg /etc/xen/auto/host.cfg
, to auto-boot the "host" domU./boot/grub/menu.lst
and search for the line that loads the linux kernel as a module in the Xen hypervisor. It will look like module /boot/vmlinuz-...
. To the end of that line, add pciback.hide=(0000:00:1b.0)
(if you run "lspci" it will list the PCI devices, in case you want to pass anything else through./etc/xen
, and add the line pci=['00:1b.0']
.
apt-get install libesd-alsa0 alsa alsa-utils
. You might need to reboot the domU at this point, and then run alsaconf
to configure the sound card.Followup Not quite as smooth as I'd hope. The Marvel 88E8053 Gigabit Ethernet card has problems, and hangs under load using the "sky2" drivers - this is a known problem. I've followed the instructions at http://www.sumardi.net/2007/06/21/how-to-install-madwifi-on-debian-40-etch/ and it's worked, after a bit of fiddling (this page was also very useful).
Parts of this were derived from the following:
PS. here's my domU config file, in /etc/xen/tiny.cfg
kernel = '/boot/vmlinuz-2.6.18-6-xen-686' ramdisk = '/boot/initrd.img-2.6.18-6-xen-686' memory = '512' root = '/dev/sda1 ro' disk = [ 'phy:vg/tiny-disk,sda1,w', 'phy:vg/tiny-swap,sda2,w', 'phy:vg/public,sda3,w' ] name = 'tiny' pci = [ '00:1b.0' ] vif = [ 'ip=10.1.1.99' ] on_poweroff = 'destroy' on_reboot = 'restart' on_crash = 'restart'