It’s expensive and it tastes like water.
Archive for November, 2006
So I was following this guide: http://fedoraproject.org/wiki/FedoraXenQuickstartFC6 to get Xen running on my spare FC6 machine, and I couldn’t get any domU to install.
Here’s a command I was using:
xenguest-install --name=test1 --ram=320 --file=/xen/test1.img --file-size=2 --nographics --paravirt --location=http://www.gtlib.gatech.edu/pub/fedora.redhat/linux/core/6/i386/os/ --debug
I read through theXen-Users archives and found this thread, which looked somewhat relevant. I changed that single setting:
echo 'hwcap 0 nosegneg' > /etc/ld.so.conf.d/libc6-xen.conf and now the xenguest-install command works!
I was following the directions from The Debian User, except I’m using a P3-1GHz machine with 512MB RAM and a 30GB HD.
I partitioned the 30GB HD into one 255MB /boot partition (ext3) and the rest as a VG. I made a 1GB LV for the main system, a 512MB LV for swap, and left the rest alone for now.
After the minimal install (I unchecked “standard system” in tasksel), only ~155 packages were installed. I added pciutils, less, ntpdate, sysstat and ssh (as in my previous post, and then proceeded to install Xen.
#apt-get install xen-linux-system-2.6.17-2-xen-686 libc6-xen bridge-utils
I didn’t install the xen-ioemu package because the description says it’s for HVM domains, and the xen-linux-system package automatically pulls in the xen-hypervisor package (I installed the non-PAE one following the package descriptions which say that you want the PAE one if you have >4GB RAM). The above command also removed libc6-686, which I find a bit scary, but the reboot came up with the dom0 without a problem.
ifconfig showed that the network bridge wasn’t configured, so I had to uncomment the line
(vif-script vif-bridge) was already uncommented. I also changed the dom0-min-mem to 128MB.
/etc/init.d/xend restart to enable the network bridge.
Then I realized I’d forgotten to install xen-tools, so
apt-get install xen-tools libterm-readline-gnu-perl, which also pulled in perl and other stuff.
debian-dom0:/etc/xen-tools# grep -v ^# xen-tools.conf |sort
debootstrap = 1
dhcp = 1
dir = /xen #make sure this exists!
dist = etch # Default distribution to install.
fs = ext3 # use the EXT3 filesystem for the disk image.
gateway = xx.xx.xx.xx #modify for your network
image = sparse # Specify sparse vs. full disk images.
initrd = /boot/initrd.img-2.6.17-2-xen-686
kernel = /boot/vmlinuz-2.6.17-2-xen-686
memory = 256Mb # Memory size
mirror = http://ftp.us.debian.org/debian/
netmask = 255.255.255.0 #modify to suit your needs
passwd = 1
size = 2Gb # Disk image size.
swap = 128Mb # Swap size
Make sure the directory /xen (or whatever) exists! The xen-create-image script does not tell you of this error! (although its log file does) You should probably read the log while its running. The log is in /var/log/xen-tools/hostname.log
After xen-guest-install was finished, I merely had to xm create -c /etc/xen/hostname.cfg and off it went. The -c switch binds you to the VM’s console, so you can see the boot messages. Soon after boot, however, the VM experienced a lot of disk errors (odd!)
debftp1:~# end_request: I/O error, dev sda1, sector 4049792
Buffer I/O error on device sda1, logical block 506224
lost page write due to I/O error on sda1
end_request: I/O error, dev sda1, sector 4049800
Buffer I/O error on device sda1, logical block 506225
lost page write due to I/O error on sda1
On a real machine, this would indicate a disk failure, but on a VM mounted from a disk image, I’m not sure. I tried commenting out the initrd line from /etc/xen/hostname.cfg but that only got me a kernel panic on boot. Thus, I will try the same thing again, but this time building the VM in an LV.
debian-dom0:~# xen-create-image --hostname=debftp1 --netmask=255.255.255.0 --gateway=188.8.131.52 --password --ide --lvm debian-dom0
where debian-dom0 is my VG, and the script creates an LV in it with the same name as the hostname. Now xm create worked! I think the key was the –ide flag.
The new VM has the root account with the password I set. Nice. It also has ssh running, and that’s it. Nice. However, the locale isn’t set, so
apt-get install locales