Squeeze upgrade to Grub2 that is not fully supported in XenServer 5.6, 5.6 FP1, 5.6 SP 2 because a lazzy programer just forgot to add a simple configuration file to list of possible paths of Grub2 files.
To make it work, make sure you install a linux-image-2.6-686-bigmem or linux-image-2.6-amd64 kernels packages (if not using the old 2.6.29 version provided by Citrix), because they are the only ones that supports Xen DomU operations out-of-the-box. If you install a simple kernel, XenServer will fail with a cryptic message "Will only load images built \\\". This message try to say that it will only execute a kernel image with DomU support.
For a new install, make sure to install the correct kernel packages (linux-image-2.6-686-bigmem or linux-image-2.6-amd64). For a running install where you want to to a upgrade, make sure to install one of that kernels packages or keep the old 2.6.29 version provided by Citrix. For both cases, install Citrix Xen Tools (Linux/xe-guest-utilities package from xs-tools.iso) for VM instrumentation and status report.
Take note of VM and it's VBD uuid, the kernel and ramdisk images path and filesystem uuid (check for it in /etc/fstab or /boot/grub/grub.cfg). Run these commands bellow, using your environment parameters to replace text in bold, don't add the single quotes.
To get the VM uuid
xe vm-list name-label='name of your VM'
To get the VBD uuid
xe vm-disk-list uuid='uuid of your VM'
Clear HVM boot policy from your VM
xe vm-param-clear uuid='uuid of your VM' param-name=HVM-boot-policy
Set VM boot loader to pygrub
xe vm-param-set uuid='uuid of your VM' PV-bootloader=pygrub
Set VBD to bootable
xe vbd-param-set uuid='uuid of your VM VBD' bootable=true
Set PV bootloader args
xe vm-param-set uuid='uuid of your VM' PV-bootloader-args="--kernel=/boot/vmlinuz-2.6.32-5-amd64 --ramdisk=/boot/initrd.img-2.6.32-5-amd64"
or
xe vm-param-set uuid='uuid of your VM' PV-bootloader-args="--kernel=/boot/vmlinuz-2.6.32-5-686-bigmem --ramdisk=/boot/initrd.img-2.6.32-5-686-bigmem"
xe vm-param-set uuid='uuid of your VM' PV-args="root=UUID='uuid of your VM filesystem' ro quiet console=hvc0 xencons=hvc0"
All set, now you can boot up your Squeeze VM and check if it's reporting as Optimized in general tab.
5 comentários:
Hi
Can you please tell me what is the 'uuid of your VM filesystem' parameter? I'm stuck at this point, how can I find this UUID?
Thank you!
Grush
The filesystem uuid param comes from your linux filesystem ID.
You can run blkid(8) command (inside your live linux system to get it) or you can get it from your /boot/grub/grub.cfg entry that represents your boot system
Thank you very much for your quick response! I tought I was good at XenServer, until I got stuck on a Debian Lenny install =/
Now I know that I'm only good with Windows Vm's =)
I'm installing Debian again and i'll take note of this parameter.
Thanks again, congratulations for your blog!
Done! I made it, thanks for your help.
Just an update, for others like me:To find the filesystem uuid, I used some commands explained on this link: http://blog.403labs.com/post/1546501840/paravirtulization-with-citrix-xenserver-5-5-and-ubuntu
In this link there are some information to install XS-Tools, worked like a charm for me.
My scenario:
XenServer 5.6 with updates 1,2,4,6,7;
Debian 6.0.4 multiarch;
Another XenServer question:
After a VM was created, Is it possible to check which template was used to create it? It's only for knowledgement purposes, but IMO it's important to be able to reach this kind of information.
Thanks one more time!
Grush
I don´t know any xe command that can be used to identify from which template a VM was built from...
Postar um comentário