I have set up xen on ubuntu server 12.04 LTS. I have tried installing a guest to an lvm I created called xen-lvm
The virt-install script:
sudo virt-install \
--name client2-ubuntu-server \
--ram 512 \
--location http://www.mirrorservice.org/sites/archive.ubuntu.com/ubuntu/dists/precise/main/installer-i386/ \
--accelerate \
--disk path=/dev/dev-server/xen-lvm \
--boot kernel=/boot/vmlinuz-3.2.0-35-virtual,initrd=/boot/initrd.img-3.2.0-35-virtual \
--force
I had first tried installing without the --boot option which had the exact same error when I try to start the vm (xm create client1-ubuntu-server
):
Error: (2, 'Invalid kernel', 'elf_xen_note_check: ERROR: Will only load images built for the generic loader or Linux images')
Does anybody know what I need to do? Running 32 bit and hardware virtualization is out of the question (has to be paravirtualized).
Perhaps I am not supposed to install the master grub boot loader in the guest but alter the one for my host OS?
Update
I have managed to use xm create
instead of virt-install
in order to get to the point where I startup with a bootloader before the error as seen here:
I think the issue is because I don't have an pygrub option to select a 'virtual' kernel instead.
I have failed to discover how to add the virtual kernel to the domU (preferably at the install stage). I would have thought that the xen netboot image would have installed with this but I guess not.
My xm create script is as such:
name = 'client1-ubuntu-32'
memory = 512
disk = ['phy:/dev/ubu-32/xen-lvm,xvda,w']
vif = [' ']
# Comment this out if uncommenting the next section (installing)
#bootloader="/usr/bin/pygrub"
# This section is for installing ubuntu
kernel = "/var/lib/xen/images/ubuntu-netboot/vmlinuz"
ramdisk = "/var/lib/xen/images/ubuntu-netboot/initrd.gz"
extra = "debian-installer/exit/always_halt=true -- console=hvc0"