<?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>Running Systems&#187; Xen</title>
	<atom:link href="http://run.tournament.org.il/tag/xen/feed/" rel="self" type="application/rss+xml" />
	<link>http://run.tournament.org.il</link>
	<description>(and me chasing them)</description>
	<lastBuildDate>Wed, 02 Jun 2010 13:50:14 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Oracle VM post-install check list</title>
		<link>http://run.tournament.org.il/oracle-vm-post-install-check-list/</link>
		<comments>http://run.tournament.org.il/oracle-vm-post-install-check-list/#comments</comments>
		<pubDate>Fri, 21 May 2010 22:39:52 +0000</pubDate>
		<dc:creator>ez-aton</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Virtualization]]></category>
		<category><![CDATA[Oracle]]></category>
		<category><![CDATA[Xen]]></category>

		<guid isPermaLink="false">http://run.tournament.org.il/?p=515</guid>
		<description><![CDATA[Following my experience with OracleVM, I am adding my post-install steps for your pleasure. These steps are not mandatory, by design, but will help you get up and running faster and easier. These steps are relevant to Oracle VM 2.2, but might work for older (and newer) versions as well.
Define bonding
You should read more about [...]


No related posts.

Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.]]></description>
			<content:encoded><![CDATA[<p>Following my experience with OracleVM, I am adding my post-install steps for your pleasure. These steps are not mandatory, by design, but will help you get up and running faster and easier. These steps are relevant to Oracle VM 2.2, but might work for older (and newer) versions as well.</p>
<p><span style="text-decoration: underline;">Define bonding</span></p>
<p>You should read more about it in my <a href="http://run.tournament.org.il/oracle-vm-and-network-bonding/" target="_blank">past post</a>.</p>
<p><span style="text-decoration: underline;">Define storage multipathing</span></p>
<p>You can read about it <a href="http://wiki.oracle.com/page/Oracle+VM+Server+configuration:+multiple+networks,+multipathed+SAN+storage" target="_blank">here</a>.</p>
<p><span style="text-decoration: underline;">Define NTP</span></p>
<p>Define NTP servers for your Oracle VM host. Make sure the daemon &#8216;ntpd&#8217; is running, and following an initial time update, via</p>
<blockquote><p>ntpdate -u &lt;server&gt;</p></blockquote>
<p>to set the clock right initially, perform a sync to the hardware clock, for good measures</p>
<blockquote><p>hwclock &#8211;systohc</p></blockquote>
<p>Make sure NTPD starts on boot:</p>
<blockquote><p>chkconfig ntpd on</p></blockquote>
<p><span style="text-decoration: underline;">Install Linux VM</span></p>
<p>If the system is going to be stand-alone, you might like to run your VM Manager on it (we will deal with issues of it later). To do so, you will need to install your own Linux machine, since Oracle supplied image fails (or at least &#8211; failed for me!) for no apparent reason (kernel panic, to be exact, on a fully MD5 checked image). You could perform this action from the command line by running the command</p>
<blockquote><p>virt-install -n linux_machine -r 1024 -p &#8211;nographics -l nfs://iso_server:/mount</p></blockquote>
<p>This directive installs a VM called &#8220;linux_machine&#8221; from nfs iso_server:/mount, with 1GB RAM. You will be asked about where to place the VM disk, and you should place it in /OVS/running_pool/linux_machine , accordingly.</p>
<p>It assumes you have DHCP available for the install procedure, etc.</p>
<p><span style="text-decoration: underline;">Install Oracle VM Manager on the virtual Linux machine</span></p>
<p>This should be performed if you select to manage your VMs from a VM. This is a bit tricky, as you are recommended <span style="text-decoration: underline;">not to do so</span> if you designing HA-enabled server pool.</p>
<p><span style="text-decoration: underline;">Define autostart to all your VMs</span></p>
<p>Or, at least, those you want to auto start. Create a link from <em>/OVS/running_pool/&lt;VM_NAME&gt;/vm.cfg</em> to <em>/etc/xen/auto/</em></p>
<p>The order in which &#8216;ls&#8217; command will see them in <em>/etc/xen/auto/</em> is the order in which they will be called.</p>
<p><span style="text-decoration: underline;">Disable or relocate auto-suspending</span></p>
<p>Auto-suspend is cool, but your default Oracle VM installation has shortage of space under <em>/var/lib/xen/save/</em> directory, where persistent memory dumps are kept.  On a 16GB RAM system, this can get pretty high, which is far more than your space can contain.</p>
<p>Either increase the size (mount something else there, I assume), or edit <em>/etc/sysconfig/xendomains</em> and comment the line  with the directive <em>XENDOMAINS_SAVE=</em> . You could also change the desired path to somewhere you have enough space on.</p>
<p>Hashing this directive will force regular shutdown to your VMs following a power off/reboot command to the Oracle VM.</p>
<p><span style="text-decoration: underline;">Make sure auto-start VMs actually start</span></p>
<p>This is an annoying bug. For auto-start of VMs, you need /OVS up and available. Since it&#8217;s OCFS2 file system, it takes a short while (being performed by ovs-agent).</p>
<p>Since ovs-agent takes a while, we need to implement a startup script after it and before xendomains. Since both are markes &#8220;S99&#8243; (check /etc/rc3.d/ for details), we would add a script called &#8220;sleep&#8221;.</p>
<p>The script should be placed in <em>/etc/init.d/</em></p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p515code2'); return false;">View Code</a> BASH</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p5152"><td class="code" id="p515code2"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#!/bin/bash</span>
<span style="color: #666666; font-style: italic;">#</span>
<span style="color: #666666; font-style: italic;"># sleep     Workaround Oracle VM delay issues</span>
<span style="color: #666666; font-style: italic;">#</span>
<span style="color: #666666; font-style: italic;"># chkconfig: 2345 99 99</span>
<span style="color: #666666; font-style: italic;"># description: Adds a predefined delay to the initialization process</span>
<span style="color: #666666; font-style: italic;">#</span>
&nbsp;
<span style="color: #007800;">DELAY</span>=<span style="color: #000000;">60</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">case</span> <span style="color: #ff0000;">&quot;$1&quot;</span> <span style="color: #000000; font-weight: bold;">in</span>
start<span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #c20cb9; font-weight: bold;">sleep</span> <span style="color: #007800;">$DELAY</span>
<span style="color: #000000; font-weight: bold;">;;</span>
<span style="color: #000000; font-weight: bold;">esac</span>
<span style="color: #7a0874; font-weight: bold;">exit</span> <span style="color: #000000;">0</span></pre></td></tr></table></div>

<p>Place the script as a file called &#8220;sleep&#8221; (omit the suffix I added in this post), set it to be executable, and then run</p>
<blockquote><p>chkconfig &#8211;add sleep</p></blockquote>
<p>This will solve VM startup problems.</p>
<p><span style="text-decoration: underline;">Fix /etc/hosts file</span></p>
<p>If you are into multi-server pool, you will need that the host name would not be defined to 127.0.0.1 address. By default, Oracle VM defines it to match 127.0.0.1, which will result in a poor attempt to create multi-server pool.</p>
<p>This is all I have had in mind for now. It should solve most new-comer issues with Oracle VM, and allow you to make good use of it. It&#8217;s a nice system, albeit it&#8217;s ugly management.</p>
<p><span style="text-decoration: underline;">Update the OracleVM</span></p>
<p>You could use Oracle&#8217;s unbreakable network, if you are a paying customer, or you could use the <a href="http://public-yum.oracle.com/" target="_blank">Public Yum Server</a> for your system.</p>
<p><span style="text-decoration: underline;">Updates to Oracle VM Manager</span></p>
<p>If you won&#8217;t use Oracle Grid Control (Enterprise Manager) to manage the pool, you will probably use Oracle VM Manager. You would need to update the ovs-console package, and you will probably want to add tightvnc-java package, so that IE users will be able to use the web-based VNC services. You would better grub these packages from <a href="http://oss.oracle.com/oraclevm/manager/RPMS/" target="_blank">here</a>.</p>


<p>No related posts.</p>
<p>Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://run.tournament.org.il/oracle-vm-post-install-check-list/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Quickly install Xen Community Linux VM</title>
		<link>http://run.tournament.org.il/quickly-install-xen-community-linux-vm/</link>
		<comments>http://run.tournament.org.il/quickly-install-xen-community-linux-vm/#comments</comments>
		<pubDate>Sat, 05 Dec 2009 21:35:01 +0000</pubDate>
		<dc:creator>ez-aton</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Virtualization]]></category>
		<category><![CDATA[provisioning]]></category>
		<category><![CDATA[Xen]]></category>

		<guid isPermaLink="false">http://run.tournament.org.il/?p=494</guid>
		<description><![CDATA[On RHEL-type of systems, with virt-manager (libvirt), you can make use of virt-manager to easy your life. I, for myself, prefer to work with &#8216;xm&#8216; tools, but for the initial install, virt-manager is the quickest and most simple available tool.
To install a new Linux VM, all you need to follow this flow
Create an LV for [...]


No related posts.

Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.]]></description>
			<content:encoded><![CDATA[<p>On RHEL-type of systems, with virt-manager (libvirt), you can make use of virt-manager to easy your life. I, for myself, prefer to work with &#8216;<em>xm</em>&#8216; tools, but for the initial install, virt-manager is the quickest and most simple available tool.</p>
<p>To install a new Linux VM, all you need to follow this flow</p>
<p>Create an LV for your VM (I use LVs because it&#8217;s easier to manage). If not LV, use a file. To create an LV, run the following command</p>
<blockquote><p>lvcreate -L 10G -n new_vm1 VolGroup00</p></blockquote>
<p>I assume that the name you wish to grant is &#8216;new_vm1&#8242; (better maintain order there, else you will find yourself with hundreds of small LVs you have no idea what to do with), and that the name of the volume group is &#8216;VolGroup00&#8242;. Change to different values to match your environment.</p>
<p>Next, make sure you have your ISO contents unpacked (you can use loop device) and exported via NFS (my favorite method).</p>
<p>To mount a CD/DVD ISO, you should use &#8216;mount&#8217; command with the &#8216;loop&#8217; options. This would look like this:</p>
<blockquote><p>mount -o loop my_iso.iso /mnt/temp</p></blockquote>
<p>Again, I assume the name of the ISO is my_iso.iso and that the target directory /mnt/temp is available.</p>
<p>Now, export your newly created directory. If you have NFS already running, you can either add to /etc/exports the newly mounted directory /mnt/temp and restart the &#8216;nfs&#8217; service, or you could use &#8216;exportfs&#8217; to add it:</p>
<p>exportfs -o no_root_squash *:/mnt/temp</p>
<p>would probably do the trick. I added &#8216;no_root_squash&#8217; to make sure no permission/access problems present themselves during the installation phase. Test your export to verify it&#8217;s working.</p>
<p>Now you could begin your installation. Run the following command:</p>
<blockquote><p>virt-install -n new_vm1 -r 512 -p -f /dev/VolGroup00/new_vm1 &#8211;nographics nfs://nfs_server:/mnt/temp</p></blockquote>
<p>The name follows the &#8216;-n&#8217; flag. The amount of RAM to give is 512MB. The -p means it&#8217;s paravirtualized. The -f shows which device will be the block device, and the last argument is the source of the installation. Do not use local files, as the VM installer should be able to access the installation source.</p>
<p>Following that, you should have a very nice TUI installation experience.</p>
<p>Now &#8211; let&#8217;s make this machine &#8216;xm&#8217; compatible.</p>
<p>Currently, the VM is virt-manager compatible. It means you need virt-manager to start/stop it correctly. Since I prefer &#8216;xm&#8217; commands, I will show you how to convert this machine to VM.</p>
<p>First &#8211; export its XML file:</p>
<blockquote><p>virsh dumpxml new_vm1 &gt; /tmp/new_vm1.xml</p>
<p>virsh domxml-to-native xen-xm /tmp/new_vm1.xml &gt; /etc/xen/new_vm1</p></blockquote>
<p>This should do the trick.</p>
<p>Now you can turn the newly created VM off, and remove the VM from virt-manager using</p>
<blockquote><p>virsh undefine new_vm1</p></blockquote>
<p>and you&#8217;re back to &#8216;xm&#8217;-only interface.</p>


<p>No related posts.</p>
<p>Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://run.tournament.org.il/quickly-install-xen-community-linux-vm/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>XenServer &#8220;Internal error: Failure&#8230; no loader found&#8221;</title>
		<link>http://run.tournament.org.il/xenserver-internal-error-failure-no-loader-found/</link>
		<comments>http://run.tournament.org.il/xenserver-internal-error-failure-no-loader-found/#comments</comments>
		<pubDate>Sat, 24 Oct 2009 11:42:13 +0000</pubDate>
		<dc:creator>ez-aton</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Virtualization]]></category>
		<category><![CDATA[grub]]></category>
		<category><![CDATA[troubleshooting]]></category>
		<category><![CDATA[Xen]]></category>
		<category><![CDATA[XenServer]]></category>

		<guid isPermaLink="false">http://run.tournament.org.il/?p=489</guid>
		<description><![CDATA[It has been long since I had the time to write here. I have recently been involved more and more with XenServer virtualization, as you might see in the blogs, and following a solution to a rather common problem, I have decided to post it here.
The problem: When attempting to boot a Linux VM on [...]


No related posts.

Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.]]></description>
			<content:encoded><![CDATA[<p>It has been long since I had the time to write here. I have recently been involved more and more with XenServer virtualization, as you might see in the blogs, and following a solution to a rather common problem, I have decided to post it here.</p>
<p>The problem: When attempting to boot a Linux VM on XenServer (5.0 and 5.5), you get the following error message:</p>
<blockquote><p>Error: Starting VM &#8216;Cacti&#8217; &#8211; Internal error: Failure(&#8220;Error from xenguesthelper: caught exception: Failure(\\\&#8221;Subprocess failure: Failure(\\\\\\\&#8221;xc_dom_linux_build: [2] xc_dom_find_loader: no loader found\\\\\\\\n\\\\\\\&#8221;)\\\&#8221;)&#8221;)</p></blockquote>
<p>This is very common with Linux VMs which were converted from physical (or other, non-PV virtualization) to XenServer.</p>
<p>This will probably either happen during the P2V process, or after a successful update to the Linux VM.</p>
<p>The cause is that the original kernel, non PV-aware one, has not been removed, and GRUB likes to load from it. XenServer will use the GRUB menu, but will not display it to us to select our desired kernel.</p>
<p>With no chance to intervene, XenServer will attempt to load a PV-enabled machine using non-PV kernel, and will fail.</p>
<p>Preventing the problem is quite simple &#8211; remove your non-PV kernel (non-xen) so that future updates will not attempt to update it as well and set it to be the default kernel. Very simple.</p>
<p>Solving the problem in less than two minutes is a bit more tricky. Let&#8217;s see how to solve it.</p>
<p>All operations are performed from within the control domain. This guide does not apply to StorageLink or NetApp/Equalogic devices, as they behave differently. This applies only to LVM-over-something, whatever it may be.</p>
<p>First, we will need to find the name of the VDI we are to work on. Use xe in the following manner, using the VM&#8217;s name:</p>
<blockquote><p>xe vbd-list vm-name-label=Cacti</p>
<p>uuid ( RO)             : 128f29dc-4a14-1a2d-75d1-8674d3d2403b<br />
vm-uuid ( RO): eae053de-4a20-28a5-f335-f5a18dd79993<br />
vm-name-label ( RO): Cacti<br />
vdi-uuid ( RO): <strong>90524af4-5b20-4412-9bfe-f1fe27f220b1</strong><br />
empty ( RO): false<br />
device ( RO): xvda</p>
<p>uuid ( RO)             : de177727-b28a-8b79-e73e-d08366d56277<br />
vm-uuid ( RO): eae053de-4a20-28a5-f335-f5a18dd79993<br />
vm-name-label ( RO): Cacti<br />
vdi-uuid ( RO): &lt;not in database&gt;<br />
empty ( RO): true<br />
device ( RO): xvdd</p></blockquote>
<p>It is very common that xvdd is used for CDROM, so we can safely ignore the second section. The first section is the more interesting one. There is a correlation between the name of the VDI and the name of the LVM on the disk. We can find this specific LV using the following command. Notice that the name of the VDI is used here as the argument for the &#8216;grep&#8217; command:</p>
<blockquote><p>lvs | grep <strong>90524af4-5b20-4412-9bfe-f1fe27f220b1 </strong></p>
<p>LV-90524af4-5b20-4412-9bfe-f1fe27f220b1 VG_XenStorage-4aa20fc2-fd92-20c2-c549-bed2597c622b -wi-a-  10.00G</p></blockquote>
<p>We now have our LV path! As you can see, its status is offline. We need to set it to online state. Using both the LV and the VG name, we can do it like that:</p>
<blockquote><p>lvchange -ay /dev/VG_XenStorage-4aa20fc2-fd92-20c2-c549-bed2597c622b/LV-90524af4-5b20-4412-9bfe-f1fe27f220b1</p></blockquote>
<p>Now we can access the volume. We can actually check that the problem is the one we look for, using pygrub:</p>
<blockquote><p>pygrub /dev/VG_XenStorage-4aa20fc2-fd92-20c2-c549-bed2597c622b/LV-90524af4-5b20-4412-9bfe-f1fe27f220b1</p></blockquote>
<p>We should now see the GRUB menu of the VM at question. If you don&#8217;t see any menu, either you have missed a step or used the wrong disk.</p>
<p>The menu should show you all the list of kernels. The default one is the one highlighted, and if it doesn&#8217;t include the word &#8220;xen&#8221; with it, most likely that we have found the problem.</p>
<p>We now need to change to a PV-capable kernel. We will need to access the &#8220;/boot&#8221; partition of the Linux VM, and change GRUB&#8217;s options there.</p>
<p>First we map the disk to a loop device, so we can access its partitions:</p>
<blockquote><p>losetup /dev/loop1 /dev/VG_XenStorage-4aa20fc2-fd92-20c2-c549-bed2597c622b/LV-90524af4-5b20-4412-9bfe-f1fe27f220b1</p></blockquote>
<p>Notice that you need to use the entire path to the LV, that the LV is online, and that loop1 is not in use. If it is, you will have a message saying something like &#8220;LOOP_SET_FD: Device or resource busy&#8221;</p>
<p>Now we need to access its partitions. We will map them using &#8216;kpartx&#8217; to /dev/mapper/ devices. Notice we&#8217;re using the same loop device name:</p>
<blockquote><p>kaprtx -a /dev/loop1</p></blockquote>
<p>Now, new files present themselves in /dev/mapper:</p>
<blockquote><p>ls -la /dev/mapper/<br />
total 0<br />
drwxr-xr-x  2 root root     220 Oct 24 12:39 .<br />
drwxr-xr-x 14 root root   16560 Oct 24 12:31 ..<br />
crw&#8212;&#8212;-  1 root root  10, 62 Sep 29 10:15 control<br />
brw-rw&#8212;-  1 root disk 252,  5 Oct 24 12:39 <strong>loop1p1</strong><br />
brw-rw&#8212;-  1 root disk 252,  6 Oct 24 12:39 <strong>loop1p2</strong><br />
brw-rw&#8212;-  1 root disk 252,  7 Oct 24 12:39 <strong>loop1p3</strong></p></blockquote>
<p>Usually, the first partition represents /boot, so we can now mount it and work on it:</p>
<blockquote><p>mount /dev/mapper/loop1p1 /mnt</p></blockquote>
<p>All we need to do is edit /mnt/grub/menu.lst to match our requirements, and then wrap everything back up:</p>
<blockquote><p>umount /mnt</p>
<p>kpartx -u /dev/loop1</p>
<p>losetup -d /dev/loop1</p></blockquote>
<p>We don&#8217;t have to change the LV to offline, because the XenServer will activate it if it&#8217;s not, however, we could do it, to be on the safe side:</p>
<blockquote><p>lvchange -an /dev/VG_XenStorage-4aa20fc2-fd92-20c2-c549-bed2597c622b/LV-90524af4-5b20-4412-9bfe-f1fe27f220b1</p></blockquote>
<p>Now we can activate the VM, and see it boot successfully.</p>
<p>This whole process takes several minutes the first time, and even less later.</p>
<p>I hope this helps.</p>


<p>No related posts.</p>
<p>Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://run.tournament.org.il/xenserver-internal-error-failure-no-loader-found/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Xen guests cannot serv NFS requests</title>
		<link>http://run.tournament.org.il/xen-guests-cannot-serve-nfs-requirests/</link>
		<comments>http://run.tournament.org.il/xen-guests-cannot-serve-nfs-requirests/#comments</comments>
		<pubDate>Tue, 03 Mar 2009 02:29:39 +0000</pubDate>
		<dc:creator>ez-aton</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Virtualization]]></category>
		<category><![CDATA[bonds]]></category>
		<category><![CDATA[nic]]></category>
		<category><![CDATA[vlan tagging]]></category>
		<category><![CDATA[Xen]]></category>

		<guid isPermaLink="false">http://run.tournament.org.il/?p=430</guid>
		<description><![CDATA[This sounds weird, but I have witnessed it today, and had to work rather hard to figure the cause of the problem.
When using &#8221; Intel Corporation 82575EB Gigabit Network Connection (rev 02)&#8221; (as lspci reports), TCP offload causes problems.
Symptoms:

The host can communicate with the guest flawlessly (including HTTP get for larger than 2.6k files)
Other external [...]


No related posts.

Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.]]></description>
			<content:encoded><![CDATA[<p>This sounds weird, but I have witnessed it today, and had to work rather hard to figure the cause of the problem.</p>
<p>When using &#8221; Intel Corporation 82575EB Gigabit Network Connection (rev 02)&#8221; (as lspci reports), TCP offload causes problems.</p>
<p>Symptoms:</p>
<ul>
<li>The host can communicate with the guest flawlessly (including HTTP get for larger than 2.6k files)</li>
<li>Other external hosts/guests report NFS timeout during mount attempt</li>
<li>Other external hosts/guests take a long while running &#8220;showmount -e&#8221; on the target guest</li>
<li>Pings work flawlessly</li>
<li>HTTP get from external nodes halts at about 2660 bytes, to which it reaches almost immediately</li>
<li>VLAN tagged interfaces on other than the default VLAN (1) do not experience these problems (cause &#8211; unknown to me at the moment).</li>
</ul>
<p>The solution is simple &#8211; disable the offload from the NIC, and be happy. You could do it using the following line:</p>
<blockquote><p>ethtool -K eth0 tx off</p></blockquote>
<p>This should do the trick. It is required only on Dom0, and was tested to work well with my own method of configuring bonds and VLAN tags, as described <a href="http://run.tournament.org.il/xen-networking-bonding-with-vlan-tagging/" target="_blank">in this post</a>.</p>
<p>I was able to find the required hint in <a href="http://www.felipe-alfaro.org/blog/2006/08/21/xen-network-configuration-and-multiple-vlans-ii/" target="_blank">this post</a>, under comment by Alejandro Anadon, and from there, directly to <a href="http://wiki.xensource.com/xenwiki/XenFaq#head-4ce9767df34fe1c9cf4f85f7e07cb10110eae9b7" target="_blank">Xen&#8217;s FAQ site</a> and to the  solution mentioned above.</p>
<p>Due to ETHTOOL_OPTS parameter limitations, I have placed (in an ugly manner, I know) the relevant ethtool commands in /etc/rc.local &#8211; in contradiction to <a href="http://www.dawnstar.id.au/tag/ethtool_opts/" target="_blank">this great article</a> which shows the correct way of doing this action. Seems to be solved since.</p>


<p>No related posts.</p>
<p>Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://run.tournament.org.il/xen-guests-cannot-serve-nfs-requirests/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Xen Networking &#8211; Bonding with VLAN Tagging</title>
		<link>http://run.tournament.org.il/xen-networking-bonding-with-vlan-tagging/</link>
		<comments>http://run.tournament.org.il/xen-networking-bonding-with-vlan-tagging/#comments</comments>
		<pubDate>Thu, 23 Oct 2008 07:30:43 +0000</pubDate>
		<dc:creator>ez-aton</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Virtualization]]></category>
		<category><![CDATA[bonding]]></category>
		<category><![CDATA[bridge device]]></category>
		<category><![CDATA[networking]]></category>
		<category><![CDATA[redhat]]></category>
		<category><![CDATA[script]]></category>
		<category><![CDATA[Xen]]></category>
		<category><![CDATA[xend]]></category>

		<guid isPermaLink="false">http://www.tournament.org.il/run/?p=498</guid>
		<description><![CDATA[The simple scripts in /etc/xen/scripts which manage networking are fine for most usages, however, when your server is using bonding together with VLAN tagging (802.11q) you should consider an alternative.
A PDF document written by Mark Nielsen, GPS Senior Consultant, Red Hat, Inc (I lost the original link, sorry) named &#8220;BOND/VLAN/Xen Network Configuration&#8221; as a service [...]


Related posts:<ol><li><a href='http://run.tournament.org.il/vlan-tagging-with-bonding-network-interface-on-rhel4/' rel='bookmark' title='Permanent Link: Vlan Tagging with bonding network interface on RHEL4'>Vlan Tagging with bonding network interface on RHEL4</a> <small>This is not a simple task, as there are few...</small></li>
<li><a href='http://run.tournament.org.il/bonding-in-redhat-rhel4/' rel='bookmark' title='Permanent Link: Bonding in RedHat RHEL4'>Bonding in RedHat RHEL4</a> <small>This is a rather common knowledge now that on RHEL4...</small></li>
</ol>

Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.]]></description>
			<content:encoded><![CDATA[<p>The simple scripts in /etc/xen/scripts which manage networking are fine for most usages, however, when your server is using bonding together with VLAN tagging (802.11q) you should consider an alternative.</p>
<p>A PDF document written by Mark Nielsen, GPS Senior Consultant, Red Hat, Inc (I lost the original link, sorry) named &#8220;<strong>BOND/VLAN/Xen Network Configuration</strong>&#8221; as a service to the community, game me few insights on the subject. Following one of its <a href="http://www.felipe-alfaro.org/blog/2006/07/21/xen-network-configuration-and-multiple-vlans/" target="_blank">references</a>, I saw a bit more elegant method of doing a bridging setup under RedHat, which takes managing the bridges away from xend, and leaves it at the system level. Lets see how it&#8217;s done on RedHat style Linux distribution.</p>
<p style="padding-left: 30px"><strong>Manage your normal networking configurations</strong></p>
<p>If you&#8217;re using VLAN tagging over bonding, than you should have to setup a bonding device (be it <em>bond0</em>) which has definitions such as this:</p>
<p><em>/etc/sysconfig/network-scripts/ifcfg-eth0 </em>and <em>/etc/sysconfig/network-scripts/ifcfg-eth1</em></p>
<p style="padding-left: 30px">DEVICE=eth0<br />
BOOTPROTO=none<br />
ONBOOT=yes<br />
MASTER=bond0<br />
SLAVE=yes<br />
ISALIAS=no</p>
<p><em>/etc/sysconfig/network-scripts/ifcfg-bond0</em></p>
<p style="padding-left: 30px">DEVICE=bond0<br />
BOOTPROTO=none<br />
BONDING_OPTS=&#8221;mode=1 miimon=100&#8243;<br />
ONBOOT=yes</p>
<p>This is rather stright-forward, and should be rather a default for such a setup. Now comes the more interesting part. Originally, the next configuration part would be bond0.2 and bond0.3 (in my example). <strong>The original configuration would have looked like this</strong> (this is in bold because I tend to fast-read myself, and tend to miss things too often). <strong>This is not how it should look when we&#8217;re done!</strong></p>
<p><em>/etc/sysconfig/network-scripts/ifcfg-bond0.2 </em>(same applies to ifcfg-bond0.3)</p>
<p style="padding-left: 30px">DEVICE=bond0.2<br />
BOOTPROTO=static<br />
IPADDR=192.168.0.2<br />
NETMASK=255.255.255.0<br />
ONBOOT=yes<br />
VLAN=yes</p>
<p style="padding-left: 30px"><strong>Configure bridging</strong></p>
<p>To setup a bridge device for bond0.2, replace the mentioned above ifcfg-bond0.2 with this new <em>/etc/sysconfig/network-scripts/ifcfg-bond0.2</em></p>
<p style="padding-left: 30px">DEVICE=bond0.2<br />
BOOTPROTO=static<br />
ONBOOT=yes<br />
VLAN=yes<br />
BRIDGE=xenbr0</p>
<p>Now, <strong>create a new file</strong> <em>/etc/sysconfig/network-scripts/ifcfg-xenbr0</em></p>
<p style="padding-left: 30px">DEVICE=xenbr0<br />
BOOTPROTO=static<br />
IPADDR=192.168.0.2<br />
NETMASK=255.255.255.0<br />
ONBOOT=yes<br />
TYPE=bridge</p>
<p>Now, on network restart, the bridge will be brought up, holding the right IP address &#8211; all done by initscripts, with no Xen intervention. You will want to repeat the last the &#8220;Configure bridge&#8221; part for any additional bridge you want to be enabled for Xen machines.</p>
<p style="padding-left: 30px"><strong>Don&#8217;t let Xen bring any bridges up</strong></p>
<p>This is the last part of our drill, and it is very important. If you don&#8217;t do it, you&#8217;ll get a nice networking mess. As said before, Xen (community), by default, can&#8217;t handle bondings or vlan tags, so it will attempt to create or modify bridges to eth0 or the likes. Edit <em>/etc/xen/xend-config.sxp</em> and remark any line containing a directive containing starting with &#8220;<em>network-script</em>&#8220;. Such a directive would be, for example</p>
<p>(network-script network-bridge)</p>
<p>Restart xend and restart networking. You should now be able to configure VMs to use xenbr0 and xenbr1, etc (according to your own personal settings).</p>


<p>Related posts:<ol><li><a href='http://run.tournament.org.il/vlan-tagging-with-bonding-network-interface-on-rhel4/' rel='bookmark' title='Permanent Link: Vlan Tagging with bonding network interface on RHEL4'>Vlan Tagging with bonding network interface on RHEL4</a> <small>This is not a simple task, as there are few...</small></li>
<li><a href='http://run.tournament.org.il/bonding-in-redhat-rhel4/' rel='bookmark' title='Permanent Link: Bonding in RedHat RHEL4'>Bonding in RedHat RHEL4</a> <small>This is a rather common knowledge now that on RHEL4...</small></li>
</ol></p>
<p>Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://run.tournament.org.il/xen-networking-bonding-with-vlan-tagging/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Xen VMs performance collection</title>
		<link>http://run.tournament.org.il/xen-vms-performance-collection/</link>
		<comments>http://run.tournament.org.il/xen-vms-performance-collection/#comments</comments>
		<pubDate>Sat, 18 Oct 2008 18:58:43 +0000</pubDate>
		<dc:creator>ez-aton</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Scripting/Programing]]></category>
		<category><![CDATA[Virtualization]]></category>
		<category><![CDATA[cacti]]></category>
		<category><![CDATA[monitor]]></category>
		<category><![CDATA[performance]]></category>
		<category><![CDATA[script]]></category>
		<category><![CDATA[SNMP]]></category>
		<category><![CDATA[vmware]]></category>
		<category><![CDATA[Xen]]></category>

		<guid isPermaLink="false">http://www.tournament.org.il/run/?p=486</guid>
		<description><![CDATA[Unlike VMware Server, Xen&#8217;s HyperVisor does not allow an easy collection of performance information. The management machine, called &#8220;Domain-0&#8243; is actually a privileged virtual machine, and thus &#8211; get its own small share of CPUs and RAM. Collecting performance information on it will lead to, well, collecting performance information for a single VM, and not [...]


No related posts.

Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.]]></description>
			<content:encoded><![CDATA[<p>Unlike VMware Server, Xen&#8217;s HyperVisor does not allow an easy collection of performance information. The management machine, called &#8220;Domain-0&#8243; is actually a privileged virtual machine, and thus &#8211; get its own small share of CPUs and RAM. Collecting performance information on it will lead to, well, collecting performance information for a single VM, and not the whole bunch.</p>
<p>Local tools, such as &#8220;<em>xentop</em>&#8221; allows collection of information, however, combining this with <a href="http://www.cacti.net/" target="_blank">Cacti</a>, or any other SNMP-based collection tool is a bit tricky.</p>
<p>A great solution is provided by Ian P. Christian in his blog post about <a href="http://pookey.co.uk/blog/archives/53-Monitoring-Xen-via-SNMP-update.html" target="_blank">Xen monitoring</a>. He has created a Perl script to collect information. I have taken the liberty to fix several minor things with his permission. The modified scripts are presented below. Name the script (according to your version of Xen) &#8220;<em>/usr/local/bin/xen_stats.pl</em>&#8221; and set it to be executable:</p>
<p><strong>For Xen 3.1</strong></p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left2">Download <a href="http://run.tournament.org.il/wp-content/plugins/wp-codebox/wp-codebox.php?p=216&amp;download=xen_stats.pl">xen_stats.pl</a></span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p2165"><td class="code" id="p216code5"><pre class="perl" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#!/usr/bin/perl -w</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">use</span> strict<span style="color: #339933;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># declare...</span>
<span style="color: #000000; font-weight: bold;">sub</span> trim<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$)</span><span style="color: #339933;">;</span>
<span style="color: #666666; font-style: italic;">#&lt;a href=&quot;/blog/files/xen_cloud.tar.gz&quot; title=&quot;xen_cloud.tar.gz&quot; target=&quot;_blank&quot;&gt;xen_cloud.tar.gz&lt;/a&gt;</span>
<span style="color: #666666; font-style: italic;"># we need to run 2 iterations because CPU stats show 0% on the first, and I'm putting .1 second betwen them to speed it up</span>
<span style="color: #b1b100;">my</span> <span style="color: #0000ff;">@result</span> <span style="color: #339933;">=</span> <a href="http://perldoc.perl.org/functions/split.html"><span style="color: #000066;">split</span></a><span style="color: #009900;">&#40;</span><span style="color: #009966; font-style: italic;">/\n/</span><span style="color: #339933;">,</span> <span style="color: #ff0000;">`xentop -b -i 2 -d.1`</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># remove the first line</span>
<a href="http://perldoc.perl.org/functions/shift.html"><span style="color: #000066;">shift</span></a><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">@result</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<a href="http://perldoc.perl.org/functions/shift.html"><span style="color: #000066;">shift</span></a><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">@result</span><span style="color: #009900;">&#41;</span> <span style="color: #b1b100;">while</span> <span style="color: #0000ff;">@result</span> <span style="color: #339933;">&amp;&amp;</span> <span style="color: #0000ff;">$result</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">!~</span> <span style="color: #009966; font-style: italic;">/^xentop - /</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># the next 3 lines are headings..</span>
<a href="http://perldoc.perl.org/functions/shift.html"><span style="color: #000066;">shift</span></a><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">@result</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<a href="http://perldoc.perl.org/functions/shift.html"><span style="color: #000066;">shift</span></a><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">@result</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<a href="http://perldoc.perl.org/functions/shift.html"><span style="color: #000066;">shift</span></a><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">@result</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<a href="http://perldoc.perl.org/functions/shift.html"><span style="color: #000066;">shift</span></a><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">@result</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #b1b100;">foreach</span> <span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$line</span> <span style="color: #009900;">&#40;</span><span style="color: #0000ff;">@result</span><span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
  <span style="color: #b1b100;">my</span> <span style="color: #0000ff;">@xenInfo</span> <span style="color: #339933;">=</span> <a href="http://perldoc.perl.org/functions/split.html"><span style="color: #000066;">split</span></a><span style="color: #009900;">&#40;</span><span style="color: #009966; font-style: italic;">/[\t ]+/</span><span style="color: #339933;">,</span> trim<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$line</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  <a href="http://perldoc.perl.org/functions/printf.html"><span style="color: #000066;">printf</span></a><span style="color: #009900;">&#40;</span><span style="color: #ff0000;">&quot;name: %s, cpu_sec: %d, cpu_percent: %.2f, vbd_rd: %d, vbd_wr: %d<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">,</span>
    <span style="color: #0000ff;">$xenInfo</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span>
    <span style="color: #0000ff;">$xenInfo</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">2</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span>
    <span style="color: #0000ff;">$xenInfo</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">3</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span>
    <span style="color: #0000ff;">$xenInfo</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">14</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span>
    <span style="color: #0000ff;">$xenInfo</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">15</span><span style="color: #009900;">&#93;</span>
    <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># trims leading and trailing whitespace</span>
<span style="color: #000000; font-weight: bold;">sub</span> trim<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$)</span>
<span style="color: #009900;">&#123;</span>
  <span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$string</span> <span style="color: #339933;">=</span> <a href="http://perldoc.perl.org/functions/shift.html"><span style="color: #000066;">shift</span></a><span style="color: #339933;">;</span>
  <span style="color: #0000ff;">$string</span> <span style="color: #339933;">=~</span> <span style="color: #009966; font-style: italic;">s/^\s+//</span><span style="color: #339933;">;</span>
  <span style="color: #0000ff;">$string</span> <span style="color: #339933;">=~</span> <span style="color: #009966; font-style: italic;">s/\s+$//</span><span style="color: #339933;">;</span>
  <a href="http://perldoc.perl.org/functions/return.html"><span style="color: #000066;">return</span></a> <span style="color: #0000ff;">$string</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

<p><strong>For Xen 3.2 and Xen 3.3</strong></p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left2">Download <a href="http://run.tournament.org.il/wp-content/plugins/wp-codebox/wp-codebox.php?p=216&amp;download=xen_stats.pl">xen_stats.pl</a></span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p2166"><td class="code" id="p216code6"><pre class="perl" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#!/usr/bin/perl -w</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">use</span> strict<span style="color: #339933;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># declare…</span>
<span style="color: #000000; font-weight: bold;">sub</span> trim<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$)</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># we need to run 2 iterations because CPU stats show 0% on the first, and I’m putting .1 second between them to speed it up</span>
<span style="color: #b1b100;">my</span> <span style="color: #0000ff;">@result</span> <span style="color: #339933;">=</span> <a href="http://perldoc.perl.org/functions/split.html"><span style="color: #000066;">split</span></a><span style="color: #009900;">&#40;</span><span style="color: #009966; font-style: italic;">/\n/</span><span style="color: #339933;">,</span> <span style="color: #ff0000;">`/usr/sbin/xentop -b -i 2 -d.1`</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># remove the first line</span>
<a href="http://perldoc.perl.org/functions/shift.html"><span style="color: #000066;">shift</span></a><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">@result</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<a href="http://perldoc.perl.org/functions/shift.html"><span style="color: #000066;">shift</span></a><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">@result</span><span style="color: #009900;">&#41;</span> <span style="color: #b1b100;">while</span> <span style="color: #0000ff;">@result</span> <span style="color: #339933;">&amp;&amp;</span> <span style="color: #0000ff;">$result</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">!~</span> <span style="color: #009966; font-style: italic;">/^[\t ]+NAME/</span><span style="color: #339933;">;</span>
<a href="http://perldoc.perl.org/functions/shift.html"><span style="color: #000066;">shift</span></a><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">@result</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #b1b100;">foreach</span> <span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$line</span> <span style="color: #009900;">&#40;</span><span style="color: #0000ff;">@result</span><span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
        <span style="color: #b1b100;">my</span> <span style="color: #0000ff;">@xenInfo</span> <span style="color: #339933;">=</span> <a href="http://perldoc.perl.org/functions/split.html"><span style="color: #000066;">split</span></a><span style="color: #009900;">&#40;</span><span style="color: #009966; font-style: italic;">/[\t ]+/</span><span style="color: #339933;">,</span> trim<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$line</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <a href="http://perldoc.perl.org/functions/printf.html"><span style="color: #000066;">printf</span></a><span style="color: #009900;">&#40;</span>“name<span style="color: #339933;">:</span> <span style="color: #339933;">%</span><a href="http://perldoc.perl.org/functions/s.html"><span style="color: #000066;">s</span></a><span style="color: #339933;">,</span> cpu_sec<span style="color: #339933;">:</span> <span style="color: #0000ff;">%d</span><span style="color: #339933;">,</span> cpu_percent<span style="color: #339933;">:</span> <span style="color: #339933;">%.</span>2f<span style="color: #339933;">,</span> vbd_rd<span style="color: #339933;">:</span> <span style="color: #0000ff;">%d</span><span style="color: #339933;">,</span> vbd_wr<span style="color: #339933;">:</span> <span style="color: #0000ff;">%d</span><span style="color: #0000ff;">\n</span>“<span style="color: #339933;">,</span>
        <span style="color: #0000ff;">$xenInfo</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span>
        <span style="color: #0000ff;">$xenInfo</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">2</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span>
        <span style="color: #0000ff;">$xenInfo</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">3</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span>
        <span style="color: #0000ff;">$xenInfo</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">14</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span>
        <span style="color: #0000ff;">$xenInfo</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">15</span><span style="color: #009900;">&#93;</span>
        <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #666666; font-style: italic;"># trims leading and trailing whitespace</span>
<span style="color: #000000; font-weight: bold;">sub</span> trim<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$)</span>
<span style="color: #009900;">&#123;</span>
        <span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$string</span> <span style="color: #339933;">=</span> <a href="http://perldoc.perl.org/functions/shift.html"><span style="color: #000066;">shift</span></a><span style="color: #339933;">;</span>
        <span style="color: #0000ff;">$string</span> <span style="color: #339933;">=~</span> <span style="color: #009966; font-style: italic;">s/^\s+//</span><span style="color: #339933;">;</span>
        <span style="color: #0000ff;">$string</span> <span style="color: #339933;">=~</span> <span style="color: #009966; font-style: italic;">s/\s+$//</span><span style="color: #339933;">;</span>
        <a href="http://perldoc.perl.org/functions/return.html"><span style="color: #000066;">return</span></a> <span style="color: #0000ff;">$string</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

<p><strong>Cron settings for Domain-0</strong></p>
<p>Create a file &#8220;<em>/etc/cron.d/xenstat</em>&#8221; with the following contents:</p>
<blockquote><p># This will run xen_stats.pl every minute<br />
*/1 * * * * root /usr/local/bin/xen_stats.pl &gt; /tmp/xen-stats.new &amp;&amp; cat /tmp/xen-stats.new &gt; /var/run/xen-stats</p></blockquote>
<p><strong>SNMP settings for Domain-0</strong></p>
<p>Add the line below to &#8220;<em>/etc/snmp/snmpd.conf</em>&#8221; and then restart the snmpd service</p>
<blockquote>
<pre>extend xen-stats   /bin/cat /var/run/xen-stats</pre>
</blockquote>
<p><strong>Cacti</strong></p>
<p>I reduced Ian Cacti script to be based on a per-server setup, meaning this script gets the host (dom-0) name from Cacti, but cannot support live migrations. I will try to deal with combining live migrations with Cacti in the future.</p>
<p>Download and extract my modified <a href="http://run.tournament.org.il/files/2008/10/xen_cloud.tar.gz">xen_cloud.tar.gz</a> file. Extract it, place the script and config in its relevant location, and import the template into <a href="http://www.cacti.net/" target="_blank">Cacti</a>. It should work like charm.</p>
<p>A note &#8211; the PHP script will work only on PHP5 and above. Works flawlessly on Centos5.2 for me.</p>


<p>No related posts.</p>
<p>Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://run.tournament.org.il/xen-vms-performance-collection/feed/</wfw:commentRss>
		<slash:comments>17</slash:comments>
		</item>
		<item>
		<title>Combining Xen and VMware-Server on the same Physical server</title>
		<link>http://run.tournament.org.il/combining-xen-and-vmware-server-on-the-same-physical-server/</link>
		<comments>http://run.tournament.org.il/combining-xen-and-vmware-server-on-the-same-physical-server/#comments</comments>
		<pubDate>Sat, 23 Feb 2008 12:28:08 +0000</pubDate>
		<dc:creator>ez-aton</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Virtualization]]></category>
		<category><![CDATA[centos]]></category>
		<category><![CDATA[virtual machines]]></category>
		<category><![CDATA[vmware]]></category>
		<category><![CDATA[vmware server]]></category>
		<category><![CDATA[Xen]]></category>

		<guid isPermaLink="false">http://www.tournament.org.il/run-new/?p=181</guid>
		<description><![CDATA[Doesn&#8217;t work. It will work fine up to the step where you actually try to active one of the VMware virtual machines. And then your kernel will panic.
Works fine without Xen kernel (but without Xen, of course). Pity.
Was tested on Centos5.1 64bit.


Related posts:A note about VMware-Server machine security VMware allow setting a virtual machine as [...]


Related posts:<ol><li><a href='http://run.tournament.org.il/a-note-about-vmware-server-machine-security/' rel='bookmark' title='Permanent Link: A note about VMware-Server machine security'>A note about VMware-Server machine security</a> <small>VMware allow setting a virtual machine as a private machine....</small></li>
</ol>

Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.]]></description>
			<content:encoded><![CDATA[<p>Doesn&#8217;t work. It will work fine up to the step where you actually try to active one of the VMware virtual machines. And then your kernel will panic.</p>
<p>Works fine without Xen kernel (but without Xen, of course). Pity.</p>
<p>Was tested on Centos5.1 64bit.</p>


<p>Related posts:<ol><li><a href='http://run.tournament.org.il/a-note-about-vmware-server-machine-security/' rel='bookmark' title='Permanent Link: A note about VMware-Server machine security'>A note about VMware-Server machine security</a> <small>VMware allow setting a virtual machine as a private machine....</small></li>
</ol></p>
<p>Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://run.tournament.org.il/combining-xen-and-vmware-server-on-the-same-physical-server/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
