<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>JasonSamuel.com &#187; xenserver</title>
	<atom:link href="http://www.jasonsamuel.com/tag/xenserver/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.jasonsamuel.com</link>
	<description>Cool stuff I see in the IT world</description>
	<lastBuildDate>Wed, 25 Jan 2012 21:05:04 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=</generator>
		<item>
		<title>Can&#8217;t console to frozen XenServer host but VMs are still running</title>
		<link>http://www.jasonsamuel.com/2011/12/13/cant-console-to-frozen-xenserver-host-but-vms-are-still-running/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=cant-console-to-frozen-xenserver-host-but-vms-are-still-running</link>
		<comments>http://www.jasonsamuel.com/2011/12/13/cant-console-to-frozen-xenserver-host-but-vms-are-still-running/#comments</comments>
		<pubDate>Tue, 13 Dec 2011 22:19:09 +0000</pubDate>
		<dc:creator>Jason Samuel</dc:creator>
				<category><![CDATA[Citrix XenServer]]></category>
		<category><![CDATA[citrix xenserver]]></category>
		<category><![CDATA[disable ha]]></category>
		<category><![CDATA[dom0]]></category>
		<category><![CDATA[logrotate]]></category>
		<category><![CDATA[logrotate.conf]]></category>
		<category><![CDATA[restart toolstack]]></category>
		<category><![CDATA[xapi]]></category>
		<category><![CDATA[xe commands]]></category>
		<category><![CDATA[xenserver]]></category>
		<category><![CDATA[xenserver logs]]></category>

		<guid isPermaLink="false">http://www.jasonsamuel.com/?p=1419</guid>
		<description><![CDATA[Let&#8217;s say a host in your pool won&#8217;t restart a VM and freezes half way (that wonderful yellow icon). If you hit the console tab, it might be blank. If you hit the console tab of the host, it might also be blank. If you SSH in it may connect, but you can&#8217;t pass any [...]<p><a href="http://www.jasonsamuel.com/2011/12/13/cant-console-to-frozen-xenserver-host-but-vms-are-still-running/">Can&#8217;t console to frozen XenServer host but VMs are still running</a> is a post from: <a href="http://www.jasonsamuel.com">JasonSamuel.com</a></p>

More of my posts you might like:<ol>
<li><a href='http://www.jasonsamuel.com/2009/09/21/running-open-solaris-on-citrix-xenserver-5-5-shows-no-ip-address-associated-with-the-vm/' rel='bookmark' title='Running Open Solaris on Citrix XenServer 5.5 shows no IP address associated with the VM'>Running Open Solaris on Citrix XenServer 5.5 shows no IP address associated with the VM</a></li>
<li><a href='http://www.jasonsamuel.com/2011/07/14/how-to-use-an-external-usb-drive-as-a-storage-repository-in-xenserver-5-6/' rel='bookmark' title='How to use an external USB drive as a storage repository in XenServer 5.6'>How to use an external USB drive as a storage repository in XenServer 5.6</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>Let&#8217;s say a host in your pool won&#8217;t restart a VM and freezes half way (that wonderful yellow icon).  If you hit the console tab, it might be blank.  If you hit the console tab of the host, it might also be blank.  If you SSH in it may connect, but you can&#8217;t pass any xe commands.  It just sits.  If you attempt to migrate or stop a VM, it hangs.  The host is essentially frozen but VMs are still running on it just fine.</p>
<p>This is all a pretty good sign the XAPI service on the host is hung up.  XAPI is the XenServer management toolstack which pretty much controls everything on the XenServer host.  If the &#8220;XenAPI&#8221; toolstack is hosed, XenCenter can&#8217;t talk to the host and you probably won&#8217;t be able to pass any xe commands. The Xen API is what controls everything at the host layer.  Quick way to troubleshoot this:</p>
<p>1. SSH into the host with the issue.</p>
<p>2. Type:</p>
<p><strong><code>df -h</code></strong></p>
<p>which will show the disk space usage on the file system.  The &#8220;<code>-h</code>&#8221; switch will display it in gigabytes.  Much easier to read.  We need to check the root partition and see if it is full.  This is typically 4 GB and can be filled up by logs which may cause the XAPI service to stop.  If the XenServer root disk is full, you will probably see it drop out of XenCenter because XAPI is stopped.  You won&#8217;t be able to restart the XAPI service until you free up some space.  Here is an example of the root being 100% full:</p>
<p><a href="http://www.jasonsamuel.com/wp-content/uploads/2011/12/xapi1.jpg"><img src="http://www.jasonsamuel.com/wp-content/uploads/2011/12/xapi1-300x113.jpg" alt="" title="xapi1" width="300" height="113" class="aligncenter size-medium wp-image-1425" /></a></p>
<p>Extra tip, once you log in to one XenServer host, you can check other hosts remotely without having to SSH into each one in a different terminal.  Just type:</p>
<p><strong><code>ssh &lt;RemoteXenServerIPorName&gt; df -h</code></strong></p>
<p>3.  If the root is full like above, type:</p>
<p><strong><code>cd /var/log</code></strong></p>
<p>then</p>
<p><strong><code>ls</code></strong></p>
<p>to list the logs.  Type:</p>
<p><strong><code>du –ksh *.*</code></strong></p>
<p>to list the logs with the sizes.  If you find one that is too big, delete it:</p>
<p><strong><code>rm &lt;logname&gt;.log</code></strong></p>
<p>From here you can skip ahead below to step 6 and try restarting XAPI.</p>
<p>Also, you might want to consider moving your logs off to a different volume.  If you fill your dom0 root, you&#8217;re basically hosing the XenServer.  Citrix has a good article on how to move the <code>/var/log</code> directory to a different volume here:</p>
<p><a href="http://support.citrix.com/article/CTX130245">http://support.citrix.com/article/CTX130245</a></p>
<p>or retain fewer logs by editing logrotate.conf here:</p>
<p><a href="http://support.citrix.com/article/CTX131619">http://support.citrix.com/article/CTX131619</a></p>
<p>4. If your root is not full, the next thing you probably want to do is disable HA.  You can do this in the XenCenter console or you can just type:</p>
<p><strong><code>xe pool-ha-disable</code></strong></p>
<p>or if you want to disable HA on a host (you&#8217;ll have to run this on each host though):</p>
<p><strong><code>host-emergency-ha-disable force=true</code></strong></p>
<p>5. After disabling HA, restart the toolstack:</p>
<p><strong><code>xe-toolstack-restart</code></strong></p>
<p>This will disconnect all the hosts in the pool in XenCenter but don&#8217;t panic.  Give it 10-20 seconds, once the toolstack is restarted the hosts will all reconnect to XenCenter.  All pending actions like reboots, migrations, etc. will all stop when restarting the tool stack so you have a clean slate.</p>
<p>6. You should be able to console into your host with the issues now.  Type:</p>
<p><strong><code>service xapi status</code></strong></p>
<p>and see if it is running.  If you want to see how taxed XAPI is, type:</p>
<p><strong><code>top</code></strong></p>
<p>to see all the running processing.  If XAPI is taking up 40% CPU or more, that is a good indication something is hung up on it.</p>
<p>If XAPI is not running or is very taxed, type:</p>
<p><strong><code>service xapi restart</code></strong></p>
<p>if it hangs at &#8220;Stopping xapi&#8221; or &#8220;Starting xapi&#8221;, you may need to kill the process.</p>
<p>Type:</p>
<p><strong><code>kill &lt;pid&gt;</code></strong></p>
<p>using the process ID from when you ran &#8220;service xapi status&#8221; or &#8220;top&#8221;.  Then service xapi status to verify all xapi processes have stopped.  Then you can type:</p>
<p><strong><code>service xapi restart</code></strong></p>
<p>again if it didn&#8217;t automatically try and start already.  Eventually it will say:</p>
<p><strong><code>Starting xapi: ....start-of-day complete.&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[&nbsp;&nbsp;OK&nbsp;&nbsp;]</code></strong></p>
<p>and you should see the host pop back in your XenCenter console.  If you go back and run top, xapi should be taking up around 1% or less CPU.  </p>
<p><a href="http://www.jasonsamuel.com/wp-content/uploads/2011/12/xapi2.jpg"><img src="http://www.jasonsamuel.com/wp-content/uploads/2011/12/xapi2-300x186.jpg" alt="" title="xapi2" width="300" height="186" class="aligncenter size-medium wp-image-1421" /></a></p>
<p>You can type:</p>
<p><strong><code>xe task-list</code></strong></p>
<p>to see all the running tasks which shouldn&#8217;t be much at this point.  Don&#8217;t forget to re-enable HA after you&#8217;re done.  Hope this helps someone.</p>
<p><a href="http://www.jasonsamuel.com/2011/12/13/cant-console-to-frozen-xenserver-host-but-vms-are-still-running/">Can&#8217;t console to frozen XenServer host but VMs are still running</a> is a post from: <a href="http://www.jasonsamuel.com">JasonSamuel.com</a></p>
<p>More of my posts you might like:<ol>
<li><a href='http://www.jasonsamuel.com/2009/09/21/running-open-solaris-on-citrix-xenserver-5-5-shows-no-ip-address-associated-with-the-vm/' rel='bookmark' title='Running Open Solaris on Citrix XenServer 5.5 shows no IP address associated with the VM'>Running Open Solaris on Citrix XenServer 5.5 shows no IP address associated with the VM</a></li>
<li><a href='http://www.jasonsamuel.com/2011/07/14/how-to-use-an-external-usb-drive-as-a-storage-repository-in-xenserver-5-6/' rel='bookmark' title='How to use an external USB drive as a storage repository in XenServer 5.6'>How to use an external USB drive as a storage repository in XenServer 5.6</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.jasonsamuel.com/2011/12/13/cant-console-to-frozen-xenserver-host-but-vms-are-still-running/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>How to use an external USB drive as a storage repository in XenServer 5.6</title>
		<link>http://www.jasonsamuel.com/2011/07/14/how-to-use-an-external-usb-drive-as-a-storage-repository-in-xenserver-5-6/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=how-to-use-an-external-usb-drive-as-a-storage-repository-in-xenserver-5-6</link>
		<comments>http://www.jasonsamuel.com/2011/07/14/how-to-use-an-external-usb-drive-as-a-storage-repository-in-xenserver-5-6/#comments</comments>
		<pubDate>Fri, 15 Jul 2011 04:22:52 +0000</pubDate>
		<dc:creator>Jason Samuel</dc:creator>
				<category><![CDATA[Citrix XenServer]]></category>
		<category><![CDATA[local storage repository]]></category>
		<category><![CDATA[storage repository]]></category>
		<category><![CDATA[xencenter]]></category>
		<category><![CDATA[xenserver]]></category>

		<guid isPermaLink="false">http://www.jasonsamuel.com/?p=1076</guid>
		<description><![CDATA[I&#8217;m building out a quick test lab environment at home tonight using XenServer 5.6 SP2. Unfortunately the server I happened to be using for this is a 1U box with only two 73 GB drives inside. El cheapo Dell. Even striped, I needed just a bit more storage for what I was intending to use [...]<p><a href="http://www.jasonsamuel.com/2011/07/14/how-to-use-an-external-usb-drive-as-a-storage-repository-in-xenserver-5-6/">How to use an external USB drive as a storage repository in XenServer 5.6</a> is a post from: <a href="http://www.jasonsamuel.com">JasonSamuel.com</a></p>

More of my posts you might like:<ol>
<li><a href='http://www.jasonsamuel.com/2009/09/21/running-open-solaris-on-citrix-xenserver-5-5-shows-no-ip-address-associated-with-the-vm/' rel='bookmark' title='Running Open Solaris on Citrix XenServer 5.5 shows no IP address associated with the VM'>Running Open Solaris on Citrix XenServer 5.5 shows no IP address associated with the VM</a></li>
<li><a href='http://www.jasonsamuel.com/2009/11/04/how-to-move-sql-error-logs-errorlog-to-a-different-drive/' rel='bookmark' title='How to move SQL error logs (ERRORLOG) to a different drive'>How to move SQL error logs (ERRORLOG) to a different drive</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m building out a quick test lab environment at home tonight using XenServer 5.6 SP2.  Unfortunately the server I happened to be using for this is a 1U box with only two 73 GB drives inside.  El cheapo Dell.  Even striped, I needed just a bit more storage for what I was intending to use it for. Luckily I had a 250 GB external Western Digital USB drive handy.  It was formatted as NTFS since I pulled it from a Windows desktop.  I figured why not use it as a local storage repository? It&#8217;s a temporary test lab after all.</p>
<p>1. Plug the USB drive to your XenServer and turn it on if it&#8217;s not on already.</p>
<p>2. Once it finishes booting, enter the Local Command Shell (type your root credentials)</p>
<p>3. Now type:</p>
<p><code>fdisk –l</code></p>
<p>this will list all the drives.  Typically your USB drive will the best last one.  Mine was <code>/dev/sdb1</code> and under the System column, listed as HPFS/NTFS.</p>
<p>4. Now create a storage repository by typing:</p>
<p><code>xe sr-create name-label=&quot;USB drive&quot; content-type=user type=lvm device-config:device=/dev/sdb1</code></p>
<p>When it completes, it will give you a UUID (long alpha numeric string).  Don&#8217;t worry, no need to write it down.</p>
<p>5. Now open up XenCenter, and check the storage available on the XenServer you are working on.  You should see one called &#8220;USB drive&#8221; or whatever you decided to name the SR.  The UUID you saw above on the console will also be displayed if you click the storage repository in the resources pane and look under the General section.  Click the screenshot below for a bigger version:</p>
<p><a href="http://www.jasonsamuel.com/wp-content/uploads/2011/07/xenserver-usb-external-drive-storage-repository.jpg"><img src="http://www.jasonsamuel.com/wp-content/uploads/2011/07/xenserver-usb-external-drive-storage-repository-300x143.jpg" alt="" title="xenserver-usb-external-drive-storage-repository" width="300" height="143" class="aligncenter size-medium wp-image-1077" /></a></p>
<p><a href="http://www.jasonsamuel.com/2011/07/14/how-to-use-an-external-usb-drive-as-a-storage-repository-in-xenserver-5-6/">How to use an external USB drive as a storage repository in XenServer 5.6</a> is a post from: <a href="http://www.jasonsamuel.com">JasonSamuel.com</a></p>
<p>More of my posts you might like:<ol>
<li><a href='http://www.jasonsamuel.com/2009/09/21/running-open-solaris-on-citrix-xenserver-5-5-shows-no-ip-address-associated-with-the-vm/' rel='bookmark' title='Running Open Solaris on Citrix XenServer 5.5 shows no IP address associated with the VM'>Running Open Solaris on Citrix XenServer 5.5 shows no IP address associated with the VM</a></li>
<li><a href='http://www.jasonsamuel.com/2009/11/04/how-to-move-sql-error-logs-errorlog-to-a-different-drive/' rel='bookmark' title='How to move SQL error logs (ERRORLOG) to a different drive'>How to move SQL error logs (ERRORLOG) to a different drive</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.jasonsamuel.com/2011/07/14/how-to-use-an-external-usb-drive-as-a-storage-repository-in-xenserver-5-6/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Running Open Solaris on Citrix XenServer 5.5 shows no IP address associated with the VM</title>
		<link>http://www.jasonsamuel.com/2009/09/21/running-open-solaris-on-citrix-xenserver-5-5-shows-no-ip-address-associated-with-the-vm/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=running-open-solaris-on-citrix-xenserver-5-5-shows-no-ip-address-associated-with-the-vm</link>
		<comments>http://www.jasonsamuel.com/2009/09/21/running-open-solaris-on-citrix-xenserver-5-5-shows-no-ip-address-associated-with-the-vm/#comments</comments>
		<pubDate>Mon, 21 Sep 2009 20:33:01 +0000</pubDate>
		<dc:creator>Jason Samuel</dc:creator>
				<category><![CDATA[Citrix XenServer]]></category>
		<category><![CDATA[Sun Solaris]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[open solaris]]></category>
		<category><![CDATA[solaris]]></category>
		<category><![CDATA[unix]]></category>
		<category><![CDATA[xenserver]]></category>

		<guid isPermaLink="false">http://www.jasonsamuel.com/?p=162</guid>
		<description><![CDATA[Recent issue I saw, the XenCenter console sees Network 0 but has no IP address.  The VM however has an IP when you check.  Work around for this, install the Linux guest agent which will allow the VM to pass additional info about itself to your XenServer host. Mount the image into the guest using: [...]<p><a href="http://www.jasonsamuel.com/2009/09/21/running-open-solaris-on-citrix-xenserver-5-5-shows-no-ip-address-associated-with-the-vm/">Running Open Solaris on Citrix XenServer 5.5 shows no IP address associated with the VM</a> is a post from: <a href="http://www.jasonsamuel.com">JasonSamuel.com</a></p>
]]></description>
			<content:encoded><![CDATA[<p>Recent issue I saw, the XenCenter console sees Network 0 but has no IP address.  The VM however has an IP when you check.  Work around for this, install the Linux guest agent which will allow the VM to pass additional info about itself to your XenServer host.</p>
<p>Mount the image into the guest using:</p>
<blockquote><p>mount /dev/xvdd /mnt</p></blockquote>
<p>Then as the root user, execute the install script:</p>
<blockquote><p>/mnt/Linux/install.sh</p></blockquote>
<p>Then reboot the VM and it should work.</p>
<p><a href="http://www.jasonsamuel.com/2009/09/21/running-open-solaris-on-citrix-xenserver-5-5-shows-no-ip-address-associated-with-the-vm/">Running Open Solaris on Citrix XenServer 5.5 shows no IP address associated with the VM</a> is a post from: <a href="http://www.jasonsamuel.com">JasonSamuel.com</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.jasonsamuel.com/2009/09/21/running-open-solaris-on-citrix-xenserver-5-5-shows-no-ip-address-associated-with-the-vm/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Served from: www.jasonsamuel.com @ 2012-02-09 18:01:50 -->
