Tuesday, December 29, 2009

More XenServer Paravirt Adventures

While working with someone else about running Linux under Citrix Xenserver 5, I ran across an interesting paradox. Daniel points out that the ability to run Linux as a DomU has been moved into the kernel, no longer requiring the kernel-xen RPM.

Yet, when I tried to install F11, on XenServer as a paravirt VM using the "CentOS 5.3 x64" template, it failed. When I clicked the Logs tab in XenCenter, I got:
Unable to access a required file in the the specified repository:
The template is expecting the standard install image format.

Tried a few other templates with the same result. The only way I was able to get it to run was by installing using "Other install media", which meant it was running HVM.

The paradoxical part of this, is that Fedora implies that it can be done, yet when attempted on a Fedora Xen Dom0, an F11 paravirt VM fails:
libvir: Xen error : Domain not found:
Invalid URL location given: [Errno 14] HTTP Error 404
In a way, its the message XenServer threw: I can't find the specially compiled paravirt kernel.

My guess at this point is that there has to be a new installer that understands how to use the newly compile options. Looks like there is some more research to be done. Stay tuned.


  1. Hi Doug, it's me, again.

    I had exactly the same thoughts! and tried the same but I was pointed to this by a guy from the citrix support forum:

    basically the HVM requirement is only a parameter set in the template and you can change it thru the CLI with
    xe vm-param-set uuid="VM UUID" HVM-boot-policy=""

    moreover if you go thru all parameters available for a vm you get those interesting one which may be used to get booting any PV linux guest under xenserver.

    ('PV_bootloader' '') ('PV_kernel' '') ('PV_ramdisk' '') ('PV_args' '') ('PV_bootloader_args' '') ('PV_legacy_args' '')

    I am just playing with them right now to boot fedora12 from dvd using other install media template (after you create that you can disable HVM requirement and it start without complaining anymore about HVM), I'm doing all this on a server without hardware virt.

  2. I've looked at the kernel source for F11. It's all there, just like the docs say:
    ...But I sure can't figure out how to use it.

    I've invested all the time I can tonight.

  3. Hi Doug, remember hitchhikers guide to the galaxy?

    did you tried "other installa media" template and than manually disable HVM than starting install?

    I get a "could not read file:" error but I think it's related to the fact I'm installing via a CIFS mount

  4. After:     (all end w/ UUDI=xxx)
      xe vm-param-set PV-bootloader=pygrub
      xe vm-param-set PV-args="console=hvc0"
      xe vm-param-set HVM-boot-policy=""
    I get:
      xe vm-start
      The bootloader returned an error
      vm: xxx (F11-64-PV)
      msg: Error from bootloader: no bootable disk

    Oh... the humanity!

  5. I did just this (nothing else to the new VM)
    , I left bootloader and console as default for "other install media".

    xe vm-param-set HVM-boot-policy=""

    xe vm-start Fedora12
    The bootloader returned an error
    vm: Fedora12
    msg: could not read file:

    that's the complete error message, it doesn't tells me which file it can't read.
    I'll try again after burning the ISO with the drive physically attached to the server.

  6. You need to set one of the disks as bootable -- its yet another xe command, I can't remember which one -- google will tell you..

  7. xe vm-disk-list uuid= bootable=true

    hope this helps :)

    i have trouble to get my console in xencenter working :-(

  8. Ah sorry - Post got mixed up by special chars.
    Here again.

    xe vm-disk-list uuid=(uuid of your virtual machine)
    xe vbd-param-set uuid=(uuid of the VBD entry) bootable=true

  9. "could not read file:" on boot is probaly because your /boot is ext4. pygrub only supports ext3. Fedora 13 with ext3 /boot works fine.

  10. there no longer is images/xen/vmlinuz, since images/pxeboot/vmlinuz supports pv_ops.

    i faked out the xen/vmlinuz path through an apache redirect:

    RewriteEngine on
    RewriteRule ^/distros/rhel-6-current-x86_64/disc1/images/xen(.*) /distros/rhel-6-current-x86_64/disc1/images/pxeboot$1 [R]