Posts Tagged ‘XenServer’
Besides the gui/vnc consoles you can still use the equivlent of xm console in Citrix XenServer.
On the host console:
- xe vm-list to get the list of domins running (just note the uuid of the domain you want).
- list_domains will list the domain name and the uuid of the domains. Match up your uuid so you get the proper dom_id
- xm console equivlent is /usr/lib/xen/bin/xenconsole dom_id
Its not in the root users $PATH though I think it ought to be. Of course you can symlink it or alter your path yourself but it would be a sensible default.
Example:
xen01 = dom0
knox = linuxpv domU
Say I want to connect to knox (a linux domU)
[root@xen01 ~]# xe vm-list uuid ( RO) : 8258a6d4-23f6-003d-30d7-65bd13086863 name-label ( RW): knox power-state ( RO): running uuid ( RO) : 1a191475-a99d-7a77-6550-b30a0038fd92 name-label ( RW): Windows Server 2008 SP2 x86 power-state ( RO): halted uuid ( RO) : ffd95724-d818-4f15-b4b4-159b7ff41df4 name-label ( RW): Control domain on host: xen01 power-state ( RO): running
Now get domain ids
[root@xen01 ~]# list_domains id | uuid | state 0 | ffd95724-d818-4f15-b4b4-159b7ff41df4 | R 1 | bc150966-8c21-7ad9-c329-839d5823041d | B H 7 | baa3699b-95dd-eea0-ccc4-51e8972857f5 | B 11 | 8258a6d4-23f6-003d-30d7-65bd13086863 | B
You can see the domain ID that matches the UUID of knox is 11. So we use xenconsole.
[root@xen01 ~]# /usr/lib/xen/bin/xenconsole 11 (press enter) You have new mail in /var/spool/mail/root [root@knox ~]#
Citrix has released the beta for the next version of XenServer code named “Midnight Ride”.
I’m looking forward to the enhanced snapshots (memory+disk), and memory over commit for lab environments.
If you hadn’t already guessed I am a big fan of the Xen hypervisor. Lately I have been using the Citrix XenServer release because it makes it quite palatable for my co-workers. One annoyance that I do have about XenServer is the requirement that you license it (with a free license) every year. If you fail to license it the GUI stops working. Now I hate relying on GUIs but the fact of the matter is others in my team expect to have a working GUI when they need to do something. And I dont know about you but I don’t really log onto the management console very often. Really I only log on to it if I need to provision a new server so its entirely plausible that a license would expire and I wouldn’t know about it until I really needed to do something.
I ended up writing a little Nagios plugin that checks the license expiration date using XenAPI. I don’t know that it’s 100% compliant with the plugin specification but it does work for me. I actually don’t prefer to use the warn and critical states with the Nagios (I use the performance data with Zenoss and apply thresholds there. I find that to be a bit more flexible.) but I did implement them. The plugin can be executed on the XenServer (you may want to reference how to install nrpe on XenServer) or on from your monitoring host as long as the host performing the check has the python XenAPI installed.
The plugin check_citrix_xenserver_license can be found on github.
I hope someone can find it useful.
I like to have as little run in dom0 as possible. However some things you really need checked from dom0, like the status of your raid perhaps. Just some quick instructions on getting Nagios NRPE running in XenServer.
- Install EPEL repository and disable it by default (remember we don’t want to accidentally install unnecessary packages)
wget http://download.fedora.redhat.com/pub/epel/5/$(uname -i)/epel-release-5-3.noarch.rpm rpm -hiv epel-release*.rpm sed -i 's/enabled=1/enabled=0/g' /etc/yum.repos.d/epel.repo
- Install nrpe and configure it to start on boot
yum install --enablerepo=epel nrpe chkconfig nrpe on
- Modify the firewall to allow NRPE connections. Add the following before the REJECT line in /etc/sysconfig/iptables
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 5666 -j ACCEPT
- Restart your firewall and start nrpe
restart your firewall , and start nrpe /etc/init.d/iptables restart && /etc/init.d/nrpe start
- Configure nrpe like normal and have fun
I am sure you are aware of my affinity for the Xen hypervisor. In the last year I have switched over to Citrix Xenserver. With other people managing VMs as well having a nice GUI is helpful. One of my complaints is that the GUI (XenCenter) is a windows only app. Common Citrix, please release a cross platform management console. I’ve got to run a windows VM just to use the GUI (granted I don’t have to use the gui, there is a nice API and console utilities). At any rate today I noticed that I could no longer pull up the console for a windows VM nor could I pull up the performance metrics available in XenCenter. A few searches turned up Kenneth Hunts blog and a post that showed me where to fix it. (more…)
Identica
Twitter
LinkedIn