The last issue to resolve is detecting the hard drive at boot time. My recommendation is to install the kernel for virtual installations:
# apt-get install linux-image-virtual
IMPORTANT: Because XenServer 5.5 is not compatible with grub 2, you will need to update the path to the kernel and initrd images of the VM (by modifying the PV-boot-loader-args parameter as shown in Part 4) for every kernel upgrade. Verify the paths in /boot/grub/grub.cfg and update before rebooting the VM.
Another option is to add the xen block device driver to initrd:
Another option is to add the xen block device driver to initrd:
# echo xen-blkfront >> /etc/initramfs-tools/modules # update-initramfs -u
Your installation should be complete and booting without intervention.... now go have fun!
Nice series! Just what I needed; I installed my first xenserver 5.5 a week ago and I was looking for exactly this. Thanks! But there's one problem, being used to compiling my kernel by my self I don't have a clue how to add missing modules (ie reiserfs) to the virtual "edition" of Ubuntu's kernel. Any ideas?
ReplyDeleteHi Urban,
ReplyDeleteYou can add other modules during boot up the same way xen-blkfront was added:
echo reiserfs >> /etc/initramfs-tools/modules
update-initramfs -u
Ah, but I later last evening found a bug report regarding reiserfs not being included in the virtual kernel package. So, it won't work.
ReplyDeleteInteresting. I'd probably stick to using the stock kernel and use option 2 to include xen-blkfront at boot-up.
ReplyDeleteHad problem after upgrading VM to natty on xenserver 5.6 fp1. During boot, VM showed something like "/init: line 244 ... 0x44d2fb7c-47ee-4b27-9f68-aeb0d9d6c62d ...". where 44d2fb7c-47ee-4b27-9f68-aeb0d9d6c62d was /dev/xvda1 UUID. next, init crashes /kernel panic.
ReplyDeleteIt started to work after
xe vm-param-set uuid=$VMUUID PV-args="root=/dev/xvda1 ro console=hvc0 splash quiet vt.handoff=7
Thanks Justin... good to know!
ReplyDeleteMaybe needless to say but you should just do:
ReplyDeleteln -s /boot/vmlinuz-xxxxxxx /boot/vmlinuz
ln -s /boot/initrd.img-xxxxx /boot/initrd.img
And specify in de PV params --kernel=vmlinuz --ramdisk=initrd.img
That way you only need to update the symlinks, and not the Xen configs, which takes considerably less time ;)
Aren't those symlinks maintained automatically when new kernels are installed?
ReplyDeleteJust remove grub2 and install grub. From my notes:
ReplyDelete===============================
First of all we have to remove grub-pc and install grub, so Xen’s pygrub loader can understand how to boot our system:
sudo apt-get purge grub-pc grub-common
sudo rm -rf /boot/grub/*
sudo apt-get install grub
sudo update-grub
Then change indomU=detect to indomU=false in your /boot/grub/menu.lst and type:
sudo update-grub
sudo grub-install /dev/sda
=============================
Hello, i have one problem...
ReplyDeletei choose reiserfs too... but i dont use :
"echo reiserfs >> /etc/initramfs-tools/modules
update-initramfs -u"
i can put from :
"xe-edit-bootloader -n LinuxTemplate2 -p3 -f /etc/initramfs-tools/modules"
but cant update-initramfs -u ... have other way to do that?
ty and nice tutorial