1

I have been trying to make xen work on a remote machine with no GUI.Installed XEN hypervisor on the machine and booted in that kernel.Try to create VM using virt-manager. I tried accessing virt-manager through X11 forwarding(ssh -X) but still i cant create VM using it.Is there a solution to it.

Details:

Emulator used: usr/lib/xen-default/bin/qemu-dm
virsh version output:

info : libvirt version: 0.9.8  
Compiled against library: libvir 0.9.8  
Using library: libvir 0.9.8  
Using API: Xen 0.9.8  j
Running hypervisor: Xen 4.1.0  

using virt-manger after allocating space for the disk its showing following error

Unable to complete install: 'POST operation failed: xend_post: error from xen daemon: '

Traceback (most recent call last):
  File "/usr/share/virt-manager/virtManager/asyncjob.py", line 45, in cb_wrapper
    callback(asyncjob, *args, **kwargs)
  File "/usr/share/virt-manager/virtManager/create.py", line 1909, in do_install
    guest.start_install(False, meter=meter)
  File "/usr/lib/python2.7/dist-packages/virtinst/Guest.py", line 1236, in start_install
    noboot)
  File "/usr/lib/python2.7/dist-packages/virtinst/Guest.py", line 1304, in _create_guest
    dom = self.conn.createLinux(start_xml or final_xml, 0)
  File "/usr/lib/python2.7/dist-packages/libvirt.py", line 2166, in createLinux
    if ret is None:raise libvirtError('virDomainCreateLinux() failed', conn=self)
libvirtError: POST operation failed: xend_post: error from xen daemon: <Fault 3: 'VM'>

I tired to create using virt-install --name=hello --ram=512 --file-size 10 --location=/home/admin/ubuntu-12.04-server-amd64.iso --file=/VMA/new/123 but its showing

**ERROR    Couldn't find xen kernel for Ubuntu tree.**

this the grub configuration ,it boot directly to first option here

submenu "Xen 4.1-amd64" {
menuentry 'Ubuntu GNU/Linux, with Xen 4.1-amd64 and Linux 3.2.0-23-generic' --class ubuntu --class gnu-linux --class gnu --class os --class xen {
menuentry 'Ubuntu, with Linux 3.2.0-23-generic' --class ubuntu --class gnu-linux --class gnu --class os {

it boot directly to first option here, but uname -a shows

Linux ubuntu 3.2.0-23-generic #36-Ubuntu SMP Tue Apr 10 20:39:51 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux

grub.cfg:

set default="0"

### BEGIN /etc/grub.d/20_linux_xen ###
submenu "Xen 4.1-amd64" {
menuentry 'Ubuntu GNU/Linux, with Xen 4.1-amd64 and Linux 3.2.0-23-generic' --class ubuntu --class gnu-linux --class gnu --class os --class xen {

    insmod part_msdos

    insmod ext2

    set root='(hd0,msdos6)'

    search --no-floppy --fs-uuid --set=root a24dc20d-d11a-465a-a040-839468167da0

    echo    'Loading Xen 4.1-amd64 ...'

    multiboot   /xen-4.1-amd64.gz placeholder  

    echo    'Loading Linux 3.2.0-23-generic ...'

    module  /vmlinuz-3.2.0-23-generic placeholder root=UUID=870d5785-bf0b-4af9-bf15-1b8e891e793a ro  

    echo    'Loading initial ramdisk ...'

    module  /initrd.img-3.2.0-23-generic

}

menuentry 'Ubuntu GNU/Linux, with Xen 4.1-amd64 and Linux 3.2.0-23-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os --class xen {

    insmod part_msdos


    insmod ext2
    set root='(hd0,msdos6)'

    search --no-floppy --fs-uuid --set=root a24dc20d-d11a-465a-a040-839468167da0

    echo    'Loading Xen 4.1-amd64 ...'

    multiboot   /xen-4.1-amd64.gz placeholder 

    echo    'Loading Linux 3.2.0-23-generic ...'

    module  /vmlinuz-3.2.0-23-generic placeholder root=UUID=870d5785-bf0b-4af9-bf15-1b8e891e793a ro single 

    echo    'Loading initial ramdisk ...'

    module  /initrd.img-3.2.0-23-generic

}
}
menuentry 'Ubuntu, with Linux 3.2.0-23-generic' --class ubuntu --class gnu-linux --class gnu --class os {

    recordfail

    gfxmode $linux_gfx_mode

    insmod gzio

    insmod part_msdos

    insmod ext2

    set root='(hd0,msdos6)'

    search --no-floppy --fs-uuid --set=root a24dc20d-d11a-465a-a040-839468167da0

    linux   /vmlinuz-3.2.0-23-generic root=UUID=870d5785-bf0b-4af9-bf15-1b8e891e793a ro

    initrd  /initrd.img-3.2.0-23-generic

}
menuentry 'Ubuntu, with Linux 3.2.0-23-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os {

    recordfail

    insmod gzio

    insmod part_msdos

    insmod ext2

    set root='(hd0,msdos6)'

    search --no-floppy --fs-uuid --set=root a24dc20d-d11a-465a-a040-839468167da0

    echo    'Loading Linux 3.2.0-23-generic ...'

    linux   /vmlinuz-3.2.0-23-generic root=UUID=870d5785-bf0b-4af9-bf15-1b8e891e793a ro recovery nomodeset 

    echo    'Loading initial ramdisk ...'

    initrd  /initrd.img-3.2.0-23-generic
}
mgorven
  • 30,036
  • 7
  • 76
  • 121
ananthan
  • 1,490
  • 1
  • 17
  • 27
  • Your last line indicates kernel issue. Did you boot to the right xen kernel ? post your uname -a output please. – Chakri May 25 '12 at 13:28
  • his the grub configuration ,it boot directly to first option here **"Xen 4.1-amd64" { menuentry 'Ubuntu GNU/Linux, with Xen 4.1-amd64 and Linux 3.2.0-23-generic' --class ubuntu --class gnu-linux --class gnu --class os --class xen {** **menuentry 'Ubuntu, with Linux 3.2.0-23-generic' --class ubuntu --class gnu-linux --class gnu --class os {** it boots directly to first option here..but **uname -a** shows Linux ubuntu 3.2.0-23-generic #36-Ubuntu SMP Tue Apr 10 20:39:51 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux – ananthan May 25 '12 at 15:48
  • So the issue is "the box not booting to xen kernel" . Can you manually select the xen line and hit enter. I think your grub default is still pointing back to regular kernel. – Chakri May 25 '12 at 16:27
  • I am able to install and run vm through KVM..but i dont want to use that...how can i fix this – ananthan May 25 '12 at 16:28
  • I am not sure why are you switching the topic to KVM ? aren't we discussing about XEN. Again can post the results of " grep -i 'default=' /boot/grub/grub.cfg" – Chakri May 25 '12 at 16:32
  • default is xen itself,also i tried manually choosing xen kernel..inside t will ask for one more option "ubuntu linux with XEN 4.1 amd64 and Linux 3.2.0-23 genric" i chose this option but still uname -a shows Linux ubuntu 3.2.0-23-generic #36-Ubuntu SMP Tue Apr 10 20:39:51 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux – ananthan May 25 '12 at 17:13
  • I have heard that ubuntu 12.04 kernel being 3.0 supports xen with out seperate xen kerenl...is this the reason that both are showing same kernel; – ananthan May 25 '12 at 17:19
  • No I don't think so. Still you should see the XEN kernel. Can you restart xend service and do 'xm dmesg'. Also try run your create command and run 'xm dmesg'. See if we can catch interesting. – Chakri May 25 '12 at 18:05
  • i tried xm dmesg and its output is ok with many XEN listed in it..so it seems no issue with kernel loading... – ananthan May 25 '12 at 18:12
  • Is there anyway you can upload your grub.cfg file – Chakri May 25 '12 at 18:18
  • Added grub file in the main topic..can u have a look it into it... – ananthan May 26 '12 at 05:58
  • Just to be sure - `xm list` lists your Dom0 after boot? – Nils May 26 '12 at 20:15
  • @Nils yes it was showing,the problem was virt-manager was not working. – ananthan Oct 02 '12 at 15:45

1 Answers1

3

This fixed the issue..

mkdir /usr/lib64/xen -p

cp /usr/lib/xen-4.1/* -r /usr/lib64/xen/

cp -r /usr/share/qemu-linaro/ /usr/share/qemu

ananthan
  • 1,490
  • 1
  • 17
  • 27