Friday, November 27, 2009

Fedora On Citrix XenServer 5

I've been having problems getting Fedora to run on Citrix XenServer 5.5.0 and have been disappointed with the resources available to complete the task. But, once again, persistence has rewarded us with victory. The problem is "an issue" with the paravirt console driver.

On the Citrix XenServer, the console is meant to redirect to /dev/xvc0 rather than tty0. With Red Hat (and Fedora's) implementation of xen, the paravirt driver intercepts tty0 and seamlessly handles the reroute. No so with Citrix, meaning we need to help the VM find the location of the console. Three changes to the VM are needed:
vi /boot/grub/grub.conf
add a kernel argument:
...xen ro console=xvc0 root=...
vi /etc/inittab
change the tty1 line:
.../sbin/mingetty xvc0
to allow root login at console:
echo xvc0 >> /etc/securetty
What might make this difficult is the fact that without these changes, you can't get to the console. Unfortunately, without the console, you can't make the changes.

The interesting thing is that you can boot to single user mode, and avoid the problem. To do this:
  1. Using XenCenter, right click the newly created VM and select Properties.
  2. Click Startup Options.
  3. For OS Boot Parameters add single.
  4. Click OK and reboot the VM.
  5. Make the changes listed above.
  6. Use the same steps to remove single from the boot params.
  7. Reboot.
This should allow you to modify the VMs configuration.

7 comments:

  1. Hi Doug, I am trying to do the same (install fedora 12), so i started some thread around, google a bit, but I could'nt do that, how did you made fedora xen bootable (pygrub compatible) with dracut?

    ReplyDelete
  2. Ah, and interesting point. What I failed to mention is that I was using Fedora 9. With Fedora 10, and up, there is no longer a xen kernel, as Red Hat is favoring KVM. That means F10+ will be installed as HVM rather than PV.

    I have not bothered optimizing an HVM Linux instance, so you are a step ahead of me on this one.

    ReplyDelete
  3. I am not optimizing an HVM, baiscally I am trying to install PV linux guest without using HVM (I don't have a CPU supporting it....)

    Anyway it doesn't seem that way to me,
    this is fedora 12 release notes:

    5.3.12.3. Xen Kernel Support
    The kernel package in Fedora 12 supports booting as a guest domU, but will not function as a dom0 until such support is provided upstream. Work is ongoing and hopes are high that support will be included in kernel 2.6.33 and Fedora 13.
    The most recent Fedora release with dom0 support is Fedora 8.

    and here more about it
    http://fedoraproject.org/wiki/Features/XenPvops

    My best guess it should work out of the box, but I am having boot issue with xenserver, but they seems grub.conf related "pygrub fails to find the partition containing the kernel"

    ReplyDelete
  4. "pygrub fails to find the partition containing the kernel" this is probaly because /boot has been made ext4 and pygrub only supports ext3. Re-install with a ext3 /boot. Works for Fedora 13

    ReplyDelete
  5. What's up, its pleasant piece of writing concerning media print, we all know media is a fantastic source of data.

    ReplyDelete
  6. It's not my first time to visit this website, i am browsing this site dailly and obtain good data from here everyday.

    ReplyDelete