Setting up Xen hosts and guests can be repetitive. Here are some scripts to automate the installation of Xen dom0 and domU using Ubuntu Server 12.04 LTS.
dom0
Perform a clean install of Ubuntu Sever 12.04. During the installation, use LVM while partitioning, and don’t install any optional packages other than the OpenSSH server. Once the installation is complete, and you have done any required customizations (network, hostname, etc.), run the following script (as sudo/root) to install and customize the Xen hypervisor. By default, the script assigns 512MB of RAM to dom0. Adjust line 24 to suit your needs. Also note that the script grants VNC access from everywhere – adjust line 29 to limit access.
When the script has finished, reboot the machine. [TODO: add tweaks to /etc/xen/xend-config.sxp for dom0-min-mem and to disable balooning]
domU
Once the Xen hypervisor is installed, the following script will do a network-install of Ubuntu Server 12.04 as a para-virtualized guest. There are some user-configurable values at the top of the script. Run as sudo/root:
Hi,
i follow step by step this tuto, but when im trying to run this command
xm create /etc/xen/ubuntu.cfg -c
after add the line
bootloader= pygrub
i get this error
Error: (2, ‘Invalid kernel’, ‘elf_xen_note_check: ERROR: Will only load images built for the generic loader or Linux images’)
can you help me please?
thanks in advance!
Hmm. Hard to say without more info, but here are some guesses:
1) Are you manually executing each line? If so, try running it all as a script instead.
2) What does /etc/xen/ubuntu.cfg look like? Maybe the “kernel=” line is incorrect or pointing to a file that does not exist.
abythell, Thanks for your time,
i made a deep search about this error in St. Google, and i found this web…
http://www.bentasker.co.uk/documentation/linux/188-setting-up-xen-on-ubuntu-12-04#troubleshooting
so, im running my Dom0 and DomU
Thanks for this tutorial!!!