Saturday, June 16, 2012

XCP on Ubuntu

This has been an odyssey so far. I've learned a few things too, mostly different commands related to using LVMs, and a few commands related to managing Xen/XCP via xe.

If anyone else gets into a state where XCP is stuck in maintenance mode, and the only thing it will do when you try to take it out is to tell you that the host is disabled until reboot..
Delete /var/lib/xcp/local.db
Then do: sudo service xcp-xapi restart

Bingo! (at least for me)

If you lost your guest templates, the list will be empty in XenCenter and if you do "xe template-list" nothing will appear.. do this:
run /usr/lib/xcp/lib/create_templates

If your Storage Repository won't let you create it, check to see if one exists in the LVM already and then use that one. (I may update this later with more details, this part is fuzzy now I'll have to recreate it)

The VNC session in XenCenter might not work when you use the keyboard. Don't know why, but if you close XenCenter and open a VNC session with another viewer, it seems to work. I opened one remotely from my X session and it worked fine. Although the viewer I used kept closing when the OS I was installing kept messing with the display settings.

Ubuntu 12.04 and XDMCP

XDMCP is a really neat protocol. You can use an X server to remotely connect to a linux system running it and then you can use it as if you are sitting at the system. I use it on a couple of my Linux server computers and it is incredibly easy to setup on Ubuntu 12.04.

The recent versions of Ubuntu use LightDM for the display manager. You can run a bare X windows session, but there's no easy way to start programs. That's why Window Managers like Gnome, KDE, icewm and others exist. Then you have Display Managers like xdm, gdm, lightdm and others that will give you a graphic login and the ability to switch which Window Manager you are using with a GUI.

Edit /etc/lightdm/lightdm.conf
That's it!

You can log in using X on another linux system, or using an X server on Windows such as Xming. I highly recommend Xming when on Windows.

Want to run the system headless? That's where you remotely access the GUI without having a local copy running.

Edit /etc/lightdm/lightdm.conf
then add
Then sudo restart lightdm to load the new settings.
You'll have to login again if you were using the GUI but you will see that the server side GUI didn't start up, while you can still log in over the network.