<?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>Rogierm&#039;s Blog &#187; Linux</title>
	<atom:link href="http://rogierm.redbee.nl/blog/category/linux/feed/" rel="self" type="application/rss+xml" />
	<link>http://rogierm.redbee.nl/blog</link>
	<description>Just another blog with technical stuff</description>
	<lastBuildDate>Mon, 28 Jun 2010 21:04:31 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Storage performance difference between KVM and Xen</title>
		<link>http://rogierm.redbee.nl/blog/2010/06/28/storage-performance-difference-between-kvm-and-xen/</link>
		<comments>http://rogierm.redbee.nl/blog/2010/06/28/storage-performance-difference-between-kvm-and-xen/#comments</comments>
		<pubDate>Mon, 28 Jun 2010 21:04:31 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Storage]]></category>
		<category><![CDATA[Virtualization]]></category>
		<category><![CDATA[cloud]]></category>
		<category><![CDATA[iscsi]]></category>
		<category><![CDATA[kvm]]></category>
		<category><![CDATA[nfs]]></category>
		<category><![CDATA[xen]]></category>

		<guid isPermaLink="false">http://rogierm.redbee.nl/blog/?p=147</guid>
		<description><![CDATA[Several blogs and manuals with examples on kvm or xen setups use NFS as storage backend. Mostly they state that for production use iSCSI is recommended. However there are examples where NFS is part of the architecture, eg. OpenNebula. I tried to find specific statistics on the performance differences between NFS, iSCSI and local storage. [...]]]></description>
			<content:encoded><![CDATA[<p>Several blogs and manuals with examples on kvm or xen setups use NFS as storage backend. Mostly they state that for production use iSCSI is recommended. However there are examples where NFS is part of the architecture, eg. OpenNebula. I tried to find specific statistics on the performance differences between NFS, iSCSI and local storage. During this search I encountered some pointers that NFS and Xen is not a good combination, but never a straight comparison.</p>
<p>I decided to invest some time and setup a small test environment and run some bonnie++ statistics. This is not a scientific designed experiment, but a test to show the differences between the platforms. Two test platforms are setup, 1 with a Xen server (DL360G6) (xen1) and a 12 disk SATA storage server (storage1), and another with a KVM server (DL360G5) (kvm1) and a 2 disk SATA storage server (storage2) . Both servers are connected with a gigabit network. I&#8217;ve also run a test with a 100mb/s network between the kvm1 and storage2 server. For reference I&#8217;ve also done tests with the images on localdisk.</p>
<p>I realize that LVM and iSCSI storage is most efficient, but storage with image files is very convenient and in case of cloud setups sometimes the only option.</p>
<table border="1" cellspacing="0" frame="VOID">
<colgroup>
<col width="391"></col>
<col width="36"></col>
<col width="55"></col>
<col width="43"></col>
<col width="48"></col>
<col width="50"></col>
<col width="48"></col>
<col width="43"></col>
<col width="48"></col>
<col width="43"></col>
<col width="48"></col>
<col width="50"></col>
<col width="52"></col>
<col width="47"></col>
</colgroup>
<tbody>
<tr>
<td width="391" height="17" align="LEFT"></td>
<td width="36" align="LEFT"></td>
<td colspan="6" width="286" align="LEFT">Seq output</td>
<td colspan="4" width="188" align="LEFT">Seq input</td>
<td colspan="2" width="99" align="LEFT">Random</td>
</tr>
<tr>
<td height="17" align="LEFT"></td>
<td align="LEFT"></td>
<td colspan="2" align="LEFT">Per Chr</td>
<td colspan="2" align="LEFT">Block</td>
<td colspan="2" align="LEFT">Rewrite</td>
<td colspan="2" align="LEFT">Per Chr</td>
<td colspan="2" align="LEFT">Block</td>
<td colspan="2" align="LEFT">Seeks</td>
</tr>
<tr>
<td height="17" align="LEFT"></td>
<td align="LEFT">Size</td>
<td align="LEFT">K/sec</td>
<td align="LEFT">%CP</td>
<td align="LEFT">K/sec</td>
<td align="LEFT">%CP</td>
<td align="LEFT">K/sec</td>
<td align="LEFT">%CP</td>
<td align="LEFT">K/sec</td>
<td align="LEFT">%CP</td>
<td align="LEFT">K/sec</td>
<td align="LEFT">%CP</td>
<td align="LEFT">/sec</td>
<td align="LEFT">%CP</td>
</tr>
<tr>
<td height="17" align="LEFT">Xen-guest-via-nfs-tapaio</td>
<td align="LEFT">1G</td>
<td align="RIGHT">3570</td>
<td align="RIGHT">5</td>
<td align="RIGHT">2436</td>
<td align="RIGHT">0</td>
<td align="RIGHT">1366</td>
<td align="RIGHT">0</td>
<td align="RIGHT">26474</td>
<td align="RIGHT">41</td>
<td align="RIGHT">24831</td>
<td align="RIGHT">0</td>
<td align="LEFT">6719.0</td>
<td align="RIGHT">1</td>
</tr>
<tr>
<td height="17" align="LEFT">xen-guest-via-iscsi</td>
<td align="LEFT">1G</td>
<td align="RIGHT">25242</td>
<td align="RIGHT">40</td>
<td align="RIGHT">12071</td>
<td align="RIGHT">1</td>
<td align="RIGHT">15175</td>
<td align="RIGHT">0</td>
<td align="RIGHT">32071</td>
<td align="RIGHT">42</td>
<td align="RIGHT">47742</td>
<td align="RIGHT">0</td>
<td align="LEFT">7331.3</td>
<td align="RIGHT">1</td>
</tr>
<tr>
<td height="17" align="LEFT">kvm-guest-nfs-1gb-net</td>
<td align="LEFT">1G</td>
<td align="RIGHT">8140</td>
<td align="RIGHT">16</td>
<td align="RIGHT">17308</td>
<td align="RIGHT">3</td>
<td align="RIGHT">11864</td>
<td align="RIGHT">2</td>
<td align="RIGHT">40861</td>
<td align="RIGHT">81</td>
<td align="RIGHT">71711</td>
<td align="RIGHT">3</td>
<td align="LEFT">2126.6</td>
<td align="RIGHT">54</td>
</tr>
<tr>
<td height="17" align="LEFT">kvm-guest-nfs-qcow-100mb</td>
<td align="LEFT">1G</td>
<td align="RIGHT">1922</td>
<td align="RIGHT">3</td>
<td align="RIGHT">9874</td>
<td align="RIGHT">1</td>
<td align="RIGHT">3994</td>
<td align="RIGHT">0</td>
<td align="RIGHT">10720</td>
<td align="RIGHT">22</td>
<td align="RIGHT">10441</td>
<td align="RIGHT">0</td>
<td align="LEFT">595.4</td>
<td align="RIGHT">33</td>
</tr>
<tr>
<td height="17" align="LEFT">kvm-guest-nfs-qcow-100mb-2nd</td>
<td align="LEFT">1G</td>
<td align="RIGHT">9735</td>
<td align="RIGHT">21</td>
<td align="RIGHT">2039</td>
<td align="RIGHT">0</td>
<td align="RIGHT">3197</td>
<td align="RIGHT">0</td>
<td align="RIGHT">10729</td>
<td align="RIGHT">22</td>
<td align="RIGHT">10463</td>
<td align="RIGHT">0</td>
<td align="LEFT">685.3</td>
<td align="RIGHT">38</td>
</tr>
<tr>
<td height="17" align="LEFT">kvm-guest-nfs-qcow-100mb-3rd</td>
<td align="LEFT">1G</td>
<td align="RIGHT">5327</td>
<td align="RIGHT">10</td>
<td align="RIGHT">7378</td>
<td align="RIGHT">1</td>
<td align="RIGHT">4421</td>
<td align="RIGHT">0</td>
<td align="RIGHT">10655</td>
<td align="RIGHT">18</td>
<td align="RIGHT">10512</td>
<td align="RIGHT">0</td>
<td align="LEFT">706.3</td>
<td align="RIGHT">39</td>
</tr>
<tr>
<td height="17" align="LEFT"></td>
<td align="LEFT"></td>
<td align="LEFT"></td>
<td align="LEFT"></td>
<td align="LEFT"></td>
<td align="LEFT"></td>
<td align="LEFT"></td>
<td align="LEFT"></td>
<td align="LEFT"></td>
<td align="LEFT"></td>
<td align="LEFT"></td>
<td align="LEFT"></td>
<td align="LEFT"></td>
<td align="LEFT"></td>
</tr>
<tr>
<td height="17" align="LEFT"></td>
<td align="LEFT"></td>
<td align="LEFT"></td>
<td align="LEFT"></td>
<td align="LEFT"></td>
<td align="LEFT"></td>
<td align="LEFT"></td>
<td align="LEFT"></td>
<td align="LEFT"></td>
<td align="LEFT"></td>
<td align="LEFT"></td>
<td align="LEFT"></td>
<td align="LEFT"></td>
<td align="LEFT"></td>
</tr>
<tr>
<td height="17" align="LEFT">xenserver-nfsmount</td>
<td align="LEFT">1G</td>
<td align="RIGHT">41507</td>
<td align="RIGHT">60</td>
<td align="RIGHT">60921</td>
<td align="RIGHT">7</td>
<td align="RIGHT">29687</td>
<td align="RIGHT">1</td>
<td align="RIGHT">33427</td>
<td align="RIGHT">48</td>
<td align="RIGHT">64147</td>
<td align="RIGHT">0</td>
<td align="LEFT">4674.4</td>
<td align="RIGHT">11</td>
</tr>
<tr>
<td height="17" align="LEFT">kvmserver-nfs-1G</td>
<td align="LEFT">20G</td>
<td align="RIGHT">31158</td>
<td align="RIGHT">52</td>
<td align="RIGHT">32044</td>
<td align="RIGHT">17</td>
<td align="RIGHT">10749</td>
<td align="RIGHT">2</td>
<td align="RIGHT">19152</td>
<td align="RIGHT">28</td>
<td align="RIGHT">18987</td>
<td align="RIGHT">1</td>
<td align="LEFT">90.3</td>
<td align="RIGHT">1</td>
</tr>
<tr>
<td height="17" align="LEFT">localdisk-on-nfs-server-cloudtest3</td>
<td align="LEFT">4G</td>
<td align="RIGHT">41926</td>
<td align="RIGHT">65</td>
<td align="RIGHT">43805</td>
<td align="RIGHT">7</td>
<td align="RIGHT">18928</td>
<td align="RIGHT">3</td>
<td align="RIGHT">52943</td>
<td align="RIGHT">72</td>
<td align="RIGHT">56616</td>
<td align="RIGHT">3</td>
<td align="LEFT">222.6</td>
<td align="RIGHT">0</td>
</tr>
</tbody>
</table>
<p>The  conclusion of the tests is that local storage is fastest. NFS storage with Xen is not a good combination. Xen runs best with iSCSI backed storage. KVM with NFS runs significantly better. It is safe to say that if you want to use NFS use it with KVM, not with Xen. In any case iSCSI is always the best option for Xen. I have not yet tested KVM with iSCSI but I expect this to perform better than NFS.</p>
]]></content:encoded>
			<wfw:commentRss>http://rogierm.redbee.nl/blog/2010/06/28/storage-performance-difference-between-kvm-and-xen/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to access libvirtd from remote server</title>
		<link>http://rogierm.redbee.nl/blog/2010/03/02/access-libvirtd-from-remote-server/</link>
		<comments>http://rogierm.redbee.nl/blog/2010/03/02/access-libvirtd-from-remote-server/#comments</comments>
		<pubDate>Mon, 01 Mar 2010 23:42:22 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Virtualization]]></category>
		<category><![CDATA[certificate]]></category>
		<category><![CDATA[kvm]]></category>
		<category><![CDATA[libvirt]]></category>
		<category><![CDATA[libvirtd]]></category>
		<category><![CDATA[openssl]]></category>
		<category><![CDATA[tls]]></category>

		<guid isPermaLink="false">http://rogierm.redbee.nl/blog/?p=125</guid>
		<description><![CDATA[Libvirt is a toolkit to interact with several virtualization platform from a single interface. Considering you can stop and start virtual machines through this API, security is quite important. Libvirt offers several options to give authenticated access from remote machines. By default most distributions disable remote network access for libvirtd. However, I would like to [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.libvirt.org/">Libvirt</a> is a toolkit to interact with several virtualization platform from a single interface. Considering you can stop and start virtual machines through this API, security is quite important. Libvirt offers several options to give authenticated access from remote machines. By default most distributions disable remote network access for libvirtd. However, I would like to access libvirtd on some of my KVM servers from a single management host to gather some information. The documentation on how to set this up is not too good, so I decided to write up a  short how-to. </p>
<p><strong>Step 1: Enable network access for libvirtd</strong><br />
First enable network access for libvirtd on the KVM server(s). On CentOS/RHEL this is done by uncommenting or adding the following line in /etc/sysconfig/libvirtd:<br />
<code><br />
LIBVIRTD_ARGS="--listen"<br />
</code></p>
<p><strong>Step 2: Install a CA on the management server</strong><br />
Install the Perl certificate tools:<br />
<code><br />
yum install openssl-perl<br />
</code><br />
Create Certificate authority:<br />
<code><br />
cd /etc/pki/tls/misc/<br />
./CA.pl -newca<br />
</code><br />
Example output:<br />
<code><br />
 ./CA.pl -newca<br />
CA certificate filename (or enter to create)</p>
<p>Making CA certificate ...<br />
Generating a 1024 bit RSA private key<br />
..........++++++<br />
.............++++++<br />
writing new private key to '../../CA/private/cakey.pem'<br />
Enter PEM pass phrase:<br />
Verifying - Enter PEM pass phrase:<br />
-----<br />
You are about to be asked to enter information that will be incorporated<br />
into your certificate request.<br />
What you are about to enter is what is called a Distinguished Name or a DN.<br />
There are quite a few fields but you can leave some blank<br />
For some fields there will be a default value,<br />
If you enter '.', the field will be left blank.<br />
-----<br />
Country Name (2 letter code) [GB]:XX<br />
State or Province Name (full name) [Berkshire]:XX<br />
Locality Name (eg, city) [Newbury]:XXXXX<br />
Organization Name (eg, company) [My Company Ltd]:XXXXX<br />
Organizational Unit Name (eg, section) []:XXXX<br />
Common Name (eg, your name or your server's hostname) []:CA XXX XXX<br />
Email Address []:XXX</p>
<p>Please enter the following 'extra' attributes<br />
to be sent with your certificate request<br />
A challenge password []:<br />
An optional company name []:<br />
Using configuration from /etc/pki/tls/openssl.cnf<br />
Enter pass phrase for ../../CA/private/cakey.pem:<br />
Check that the request matches the signature<br />
Signature ok<br />
Certificate Details:<br />
        Serial Number:<br />
            d8:95:24:xx:xx:xx:13:9b<br />
        Validity<br />
            Not Before: Feb 25 23:14:08 2010 GMT<br />
            Not After : Feb 24 23:14:08 2013 GMT<br />
        Subject:<br />
            countryName               = XX<br />
            stateOrProvinceName       = XX<br />
            organizationName          = XXXX<br />
            organizationalUnitName    = XXXX<br />
            commonName                = CA XXX XXX<br />
            emailAddress              = XXXXX<br />
        X509v3 extensions:<br />
            X509v3 Subject Key Identifier:<br />
                XXX<br />
            X509v3 Authority Key Identifier:<br />
                keyid:XXXX<br />
                DirName:/C=XX/ST=XX/O=XXX/OU=XXXX/CN=CA XXX XXX/emailAddress=XXX<br />
                serial:XXX</p>
<p>            X509v3 Basic Constraints:<br />
                CA:TRUE<br />
Certificate is to be certified until Feb 24 23:14:08 2013 GMT (1095 days)</p>
<p>Write out database with 1 new entries<br />
Data Base Updated<br />
</code></p>
<p><strong>Step 3: Create CSR&#8217;s</strong><br />
<code><br />
openssl genrsa -des3 -out kvm-server1.tmp<br />
openssl rsa -in kvm-server1.tmp -out kvm-server1.key<br />
openssl genrsa -des3 -out mgmt-host.tmp<br />
openssl rsa -in mgmt-host.tmp -out mgmt-host.key<br />
openssl req -new -key kvm-server1.key -out kvm-server1.csr<br />
openssl req -new -key mgmt-host.key -out mgmt-host.csr<br />
</code></p>
<p><strong>Step 4: Sign the certificates</strong><br />
<code><br />
 openssl ca -config /etc/pki/tls/openssl.cnf -policy policy_anything -out /root/mgmt-host.crt -infiles /root/mgmt-host.csr<br />
 openssl ca -config /etc/pki/tls/openssl.cnf -policy policy_anything -out /root/kvm-server1.crt -infiles /root/kvm-server1.csr<br />
</code><br />
Example output:<br />
<code><br />
Using configuration from /etc/pki/tls/openssl.cnf<br />
Enter pass phrase for /etc/pki/CA/private/cakey.pem:<br />
Check that the request matches the signature<br />
Signature ok<br />
Certificate Details:<br />
        Serial Number:<br />
            d8:95:24:4b:4e:b1:13:9c<br />
        Validity<br />
            Not Before: Feb 25 23:31:40 2010 GMT<br />
            Not After : Feb 25 23:31:40 2011 GMT<br />
        Subject:<br />
            countryName               = XX<br />
            stateOrProvinceName       = XX<br />
            localityName              = XX<br />
            organizationName          = XX<br />
            organizationalUnitName    = XX<br />
            commonName                = mgmt-host.xxx.nl<br />
            emailAddress              = xxxxx<br />
        X509v3 extensions:<br />
            X509v3 Basic Constraints:<br />
                CA:FALSE<br />
            Netscape Comment:<br />
                OpenSSL Generated Certificate<br />
            X509v3 Subject Key Identifier:<br />
                6C:EA:8B:C1:D6:XX:B6:6B:5B:18:02<br />
            X509v3 Authority Key Identifier:<br />
                keyid:C9:36:4A:XXXX:6F:FD:2E:86</p>
<p>Certificate is to be certified until Feb 25 23:31:40 2011 GMT (365 days)<br />
Sign the certificate? [y/n]:y</p>
<p>1 out of 1 certificate requests certified, commit? [y/n]y<br />
Write out database with 1 new entries<br />
Data Base Updated</p>
<p></code></p>
<p><strong>Step 5: Copy over the certificates to the correct location</strong><br />
On the management host (mgmt-host):<br />
<code><br />
mkdir /etc/pki/libvirt<br />
mkdir /etc/pki/libvirt/private<br />
mkdir /etc/pki/libvirt-vnc</p>
<p>cp /root/mgmt-host.key /etc/pki/libvirt/private/clientkey.pem<br />
cp /root/mgmt-host.key /etc/pki/libvirt-vnc/clientkey.pem<br />
cp /root/mgmt-host.crt /etc/pki/libvirt/clientcert.pem<br />
cp /root/mgmt-host.crt /etc/pki/libvirt-vnc/clientcert.pem<br />
</code></p>
<p>Transfer the key and certificate files to the KVM server (kvm-server1). Ideally, you create the key and CSR on the host itself, so you only have to transfer the certificate. Then, copy the certificates and CA to the correct location on the KVM (libvirtd) server:</p>
<p><code><br />
mkdir /etc/pki/libvirt<br />
mkdir /etc/pki/libvirt/private<br />
mkdir /etc/pki/libvirt-vnc</p>
<p>cp kvm-server1.key /etc/pki/libvirt/private/serverkey.pem<br />
cp kvm-server1.key /etc/pki/libvirt-vnc/server-key.pem</p>
<p>cp kvm-server1.crt /etc/pki//libvirt/servercert.pem<br />
cp kvm-server1.crt /etc/pki/libvirt-vnc/server-cert.pem<br />
</code></p>
<p>Make sure the CA generated on the management server is available on the KVM server in the following file:<br />
/etc/pki/CA/cacert.pem</p>
<p><strong>Step 6: Reload libvirtd</strong><br />
<code><br />
/etc/init.d/libvirtd reload<br />
</code></p>
<p><strong>Step 7: Test</strong><br />
With these certificates setup, you should be able to access libvirtd on kvm-server1 from mgmt-host. Use the following command to test:<br />
<code><br />
virsh -c qemu://kvm-server1.xxxx.nl/system<br />
Welcome to virsh, the virtualization interactive terminal.</p>
<p>Type:  'help' for help with commands<br />
       'quit' to quit</p>
<p>virsh #<br />
</code><br />
Use the list command to see a list of running guests on the server. This only works if these guests have also been created via libvirtd. Manually started KVM guests will not show up in this list. </p>
]]></content:encoded>
			<wfw:commentRss>http://rogierm.redbee.nl/blog/2010/03/02/access-libvirtd-from-remote-server/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ONE Management Console show VNC display</title>
		<link>http://rogierm.redbee.nl/blog/2010/02/25/one-management-console-show-vnc-display/</link>
		<comments>http://rogierm.redbee.nl/blog/2010/02/25/one-management-console-show-vnc-display/#comments</comments>
		<pubDate>Thu, 25 Feb 2010 01:39:54 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Virtualization]]></category>
		<category><![CDATA[kvm]]></category>
		<category><![CDATA[opennebula]]></category>
		<category><![CDATA[vnc]]></category>

		<guid isPermaLink="false">http://rogierm.redbee.nl/blog/?p=120</guid>
		<description><![CDATA[I&#8217;ve made some quick changes to ONEMC to show the VNC port in the interface. I&#8217;ve updated the template that onemc creates with a GRAPHICS section. This enables vnc on the quest. As a workaround until ONE can use the VMID in the graphics section, I use a virsh command to get the vncport. To [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve made some quick changes to ONEMC to show the VNC port in the interface. I&#8217;ve updated the template that onemc creates with a GRAPHICS section. This enables vnc on the quest. </p>
<p>As a workaround until ONE can use the VMID in the graphics section, I use a virsh command to get the vncport. To get this working the webserver user should be allowed to execute the virsh command via sudo. Add the following to sudoers:<br />
<code><br />
apache     ALL=(ALL)       NOPASSWD: /usr/bin/virsh *<br />
</code><br />
Also I encountered some problems with the model section in the KVM template so I commented that out as well. </p>
<p>Below the patch and a screenshot listing the vnc ports in ONEMC<br />
<a href="http://rogierm.redbee.nl/blog/wp-content/uploads/2010/02/Picture-64.png"><img src="http://rogierm.redbee.nl/blog/wp-content/uploads/2010/02/Picture-64-300x136.png" alt="ONEMC screenshot" title="ONEMC" width="300" height="136" class="aligncenter size-medium wp-image-121" /></a><br />
<a href='http://rogierm.redbee.nl/blog/wp-content/uploads/2010/02/onemc_funcs.patch.txt'>onemc_funcs.patch</a></p>
]]></content:encoded>
			<wfw:commentRss>http://rogierm.redbee.nl/blog/2010/02/25/one-management-console-show-vnc-display/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ONE EC2 upload error</title>
		<link>http://rogierm.redbee.nl/blog/2009/10/09/one-ec2-upload-error/</link>
		<comments>http://rogierm.redbee.nl/blog/2009/10/09/one-ec2-upload-error/#comments</comments>
		<pubDate>Thu, 08 Oct 2009 23:37:02 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Virtualization]]></category>
		<category><![CDATA[EC2]]></category>
		<category><![CDATA[gem]]></category>
		<category><![CDATA[one]]></category>
		<category><![CDATA[opennebula]]></category>

		<guid isPermaLink="false">http://rogierm.redbee.nl/blog/?p=85</guid>
		<description><![CDATA[I encountered the an error while experimenting with the OpenNebula (ONE) EC2 interface. I tried to upload an image file, to a OpenNebula host running CentOS 5.3 with ONE 1.3.8. After a couple of seconds the command exited with the following error: [rogierm@cloudtest3 ~]$ econe-upload /home/rogierm/centos5.img image /home/rogierm/centos5.img /usr/local/one/lib/ruby/econe/EC2QueryClient.rb:164:in `http_post': server returned nothing (no headers, [...]]]></description>
			<content:encoded><![CDATA[<p>I encountered the an error while experimenting with the OpenNebula (ONE) EC2 interface. I tried to upload an image file, to a OpenNebula host running CentOS 5.3 with ONE 1.3.8. After a couple of seconds the command exited with the following error:<br />
<code><br />
[rogierm@cloudtest3 ~]$ econe-upload /home/rogierm/centos5.img<br />
image /home/rogierm/centos5.img<br />
/usr/local/one/lib/ruby/econe/EC2QueryClient.rb:164:in `http_post': server returned nothing (no headers, no data) (Curl::Err::GotNothingError)<br />
	from /usr/local/one/lib/ruby/econe/EC2QueryClient.rb:164:in `upload_image'<br />
	from /usr/local/one/bin/econe-upload:116<br />
</code></p>
<p>I informed the ONE developers of this issue on their mailing list and Sebastien Goasguen pointed me to the correct solution. There seems to be an error in the curl implementation on CentOS. I installed the multipart-post gem and executed the econe-upload with the (yet undocumented) switch &#8216;-M&#8217;. This fixed the problem. </p>
<p>Install gem:<br />
<code><br />
[root@cloudtest3 ~]# gem install multipart-post<br />
</code></p>
<p>Run the working econe-upload command:<br />
<code><br />
[rogierm@cloudtest3 ~]$ econe-upload -M /home/rogierm/centos5.img<br />
</code></p>
]]></content:encoded>
			<wfw:commentRss>http://rogierm.redbee.nl/blog/2009/10/09/one-ec2-upload-error/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>OpenQRM dropbear communication problem</title>
		<link>http://rogierm.redbee.nl/blog/2009/08/26/openqrm-dropbear-communication-problem/</link>
		<comments>http://rogierm.redbee.nl/blog/2009/08/26/openqrm-dropbear-communication-problem/#comments</comments>
		<pubDate>Wed, 26 Aug 2009 21:12:38 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Virtualization]]></category>
		<category><![CDATA[OpenQRM dropbear ssh]]></category>

		<guid isPermaLink="false">http://rogierm.redbee.nl/blog/?p=74</guid>
		<description><![CDATA[OpenQRM uses dropbear for communication between the OpenQRM server and the appliances. Dropbear is basically a simple version of SSH, so it uses host keys which are cached in /root/.ssh/known_hosts. Dropbear uses a different key than sshd, ssh and dropbear share the known_hosts file and ports are not included in this file. When you ssh [...]]]></description>
			<content:encoded><![CDATA[<p>OpenQRM uses dropbear for communication between the OpenQRM server and the appliances. Dropbear is basically a simple version of SSH, so it uses host keys which are cached in /root/.ssh/known_hosts. Dropbear uses a different key than sshd, ssh and dropbear share the known_hosts file and ports are not included in this file. </p>
<p>When you ssh once into the appliance from the OpenQRM server the ssh hostkey is cached in the known_hosts file. Now if OpenQRM wants to connect to the appliance, dropbear checks the know_hosts file for the cached hostkey. This contains the ssh hostkey instead of the dropbear hostkey, so dropbear stops the connection because the hostkeys don&#8217;t matc which could be caused by a security compromise. </p>
<p>To solve the problem remove the hostkey entry for the host from /root/.ssh/known_hosts. </p>
<p><code><br />
Aug 24 23:24:26 localhost logger: openQRM-cmd-queu: Running command with token 34b3e7ddd93ffa548d34ccea1e4aa7e5 : /usr/lib/openqrm/bin/dbclient -I 0 -K 10 -y -i /usr/lib/openqrm/etc/dropbear/dropbear_rsa_host_key -p 1667 root@192.168.42.235 "/usr/lib/openqrm/bin/openqrm-cmd openqrm_server_set_boot local 1 00:00:5A:11:21:B7 0.0.0.0"<br />
Aug 24 23:24:26 localhost logger: openQRM-cmd-queu: ERROR while running command with token bc7c6de1b59370dd8019bcae2d7bfa45 : /usr/lib/openqrm/bin/dbclient -I 0 -K 10 -y -i /usr/lib/openqrm/etc/dropbear/dropbear_rsa_host_key -p 1667 root@192.168.42.235 "/usr/lib/openqrm/bin/openqrm-cmd openqrm_server_set_boot local 1 00:00:5A:11:21:B7 0.0.0.0"  ----- /usr/lib/openqrm/bin/dbclient: connection to root@192.168.42.235:1667 exited:<br />
Aug 24 23:24:26 localhost logger:<br />
Aug 24 23:24:26 localhost logger: Host key mismatch for 192.168.42.235 !<br />
Aug 24 23:24:26 localhost logger: Fingerprint is md5 65:ca:5b:3b:05:c3:61:6d:fb:75:2f:c0:d2:7e:02:cf<br />
Aug 24 23:24:26 localhost logger: Expected md5 a8:e5:d4:62:36:d2:98:b2:c3:74:a9:0c:d5:d1:56:f9<br />
Aug 24 23:24:26 localhost logger: If you know that the host key is correct you can<br />
Aug 24 23:24:26 localhost logger: remove the bad entry from ~/.ssh/known_hosts<br />
</code></p>
]]></content:encoded>
			<wfw:commentRss>http://rogierm.redbee.nl/blog/2009/08/26/openqrm-dropbear-communication-problem/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Xen: Error: Unable to connect to xend: Name or service not known. Is xend running?</title>
		<link>http://rogierm.redbee.nl/blog/2009/08/26/xen-error-unable-to-connect-to-xend-name-or-service-not-known-is-xend-running/</link>
		<comments>http://rogierm.redbee.nl/blog/2009/08/26/xen-error-unable-to-connect-to-xend-name-or-service-not-known-is-xend-running/#comments</comments>
		<pubDate>Wed, 26 Aug 2009 20:41:59 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Virtualization]]></category>
		<category><![CDATA[xen virtualization resolving]]></category>

		<guid isPermaLink="false">http://rogierm.redbee.nl/blog/?p=72</guid>
		<description><![CDATA[On a new Xen server I encounterd the following error while starting a fully virtualized guest: [root@resource1 xen]# xm create test-vps.cfg Using config file "./test-vps.cfg". VNC= 1 Error: Unable to connect to xend: Name or service not known. Is xend running? This problem was caused by a problem in the name resolving. I solved this [...]]]></description>
			<content:encoded><![CDATA[<p>On a new Xen server I encounterd the following error while starting a fully virtualized guest:<br />
<code><br />
[root@resource1 xen]# xm create test-vps.cfg<br />
Using config file "./test-vps.cfg".<br />
VNC= 1<br />
Error: Unable to connect to xend: Name or service not known. Is xend running?<br />
</code></p>
<p>This problem was caused by a problem in the name resolving. I solved this by adding the hostname and ip address of the server in /etc/hosts<br />
After this change the guest booted without problems. </p>
]]></content:encoded>
			<wfw:commentRss>http://rogierm.redbee.nl/blog/2009/08/26/xen-error-unable-to-connect-to-xend-name-or-service-not-known-is-xend-running/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Exception starting xend ((13, &#8216;Permission denied&#8217;))</title>
		<link>http://rogierm.redbee.nl/blog/2009/08/26/exception-starting-xend-13-permission-denied/</link>
		<comments>http://rogierm.redbee.nl/blog/2009/08/26/exception-starting-xend-13-permission-denied/#comments</comments>
		<pubDate>Wed, 26 Aug 2009 20:27:04 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Virtualization]]></category>
		<category><![CDATA[xen virtualization centos]]></category>

		<guid isPermaLink="false">http://rogierm.redbee.nl/blog/?p=70</guid>
		<description><![CDATA[After a yum upgrade of one of our CentOS 5 Xen server, xend would not start properly. The logs contained the following error messages below. xend-debug.log: Xend started at Wed Aug 26 18:15:57 2009. sysctl operation failed -- need to rebuild the user-space tool set? Exception starting xend: (13, 'Permission denied') xend.log [2009-08-26 18:15:57 3310] [...]]]></description>
			<content:encoded><![CDATA[<p>After a yum upgrade of one of our CentOS 5 Xen server, xend would not start properly. The logs contained the following error messages below.<br />
xend-debug.log:<br />
<code><br />
Xend started at Wed Aug 26 18:15:57 2009.<br />
sysctl operation failed -- need to rebuild the user-space tool set?<br />
Exception starting xend: (13, 'Permission denied')<br />
</code><br />
xend.log<br />
<code><br />
[2009-08-26 18:15:57 3310] ERROR (SrvDaemon:347) Exception starting xend ((13, 'Permission denied'))Traceback (most recent call last):  File "/usr/lib/python2.4/site-packages/xen/xend/server/SrvDaemon.py", line 339, in run    servers = SrvServer.create()  File "/usr/lib/python2.4/site-packages/xen/xend/server/SrvServer.py", line 251, in create    root.putChild('xend', SrvRoot())  File "/usr/lib/python2.4/site-packages/xen/xend/server/SrvRoot.py", line 40, in __init__    self.get(name)  File "/usr/lib/python2.4/site-packages/xen/web/SrvDir.py", line 82, in get    val = val.getobj()  File "/usr/lib/python2.4/site-packages/xen/web/SrvDir.py", line 52, in getobj    self.obj = klassobj()  File "/usr/lib/python2.4/site-packages/xen/xend/server/SrvNode.py", line 30, in __init__    self.xn = XendNode.instance()<br />
  File "/usr/lib/python2.4/site-packages/xen/xend/XendNode.py", line 752, in instance<br />
    inst = XendNode()<br />
  File "/usr/lib/python2.4/site-packages/xen/xend/XendNode.py", line 87, in __init__<br />
    self.other_config["xen_pagesize"] = self.xeninfo_dict()["xen_pagesize"]<br />
  File "/usr/lib/python2.4/site-packages/xen/xend/XendNode.py", line 741, in xeninfo_dict<br />
    return dict(self.xeninfo())<br />
  File "/usr/lib/python2.4/site-packages/xen/xend/XendNode.py", line 685, in xeninfo<br />
    info['xen_scheduler'] = self.xenschedinfo()<br />
  File "/usr/lib/python2.4/site-packages/xen/xend/XendNode.py", line 675, in xenschedinfo<br />
    sched_id = self.xc.sched_id_get()<br />
Error: (13, 'Permission denied')<br />
</code></p>
<p>After some investigation this was quite easy to solve. The yum upgrade updated the kernel and modified the grub.conf. So after the reboot, the new xen kernel booted. However, this kernel did not match the xen tools installed. This is easily fixed by changing the grub.conf to boot the correct xen kernel. See the examples below for the exact change. </p>
<p>The grub.conf after the yum update that caused the problem:<br />
<code><br />
title CentOS (2.6.18-128.7.1.el5xen)<br />
        root (hd0,0)<br />
        kernel /xen.gz-2.6.18-128.7.1.el5<br />
        module /vmlinuz-2.6.18-128.7.1.el5xen ro root=/dev/VolGroup00/LogVol00<br />
        module /initrd-2.6.18-128.7.1.el5xen.img<br />
</code><br />
The changed grub.conf after the yum updated that fixed the problem:<br />
<code><br />
title CentOS (2.6.18-128.7.1.el5xen)<br />
        root (hd0,0)<br />
        kernel /xen.gz-3.3.1<br />
        module /vmlinuz-2.6.18-128.7.1.el5xen ro root=/dev/VolGroup00/LogVol00<br />
        module /initrd-2.6.18-128.7.1.el5xen.img<br />
</code></p>
]]></content:encoded>
			<wfw:commentRss>http://rogierm.redbee.nl/blog/2009/08/26/exception-starting-xend-13-permission-denied/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>disable password aging</title>
		<link>http://rogierm.redbee.nl/blog/2009/08/04/disable-password-aging/</link>
		<comments>http://rogierm.redbee.nl/blog/2009/08/04/disable-password-aging/#comments</comments>
		<pubDate>Tue, 04 Aug 2009 21:26:01 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[password]]></category>
		<category><![CDATA[policy]]></category>
		<category><![CDATA[unix]]></category>

		<guid isPermaLink="false">http://rogierm.redbee.nl/blog/?p=45</guid>
		<description><![CDATA[In general it is a good idea to configure password aging as part of your password/security policy. In some cases however, this might cause unexpected problems. I&#8217;ve seen cases where an expired password prevented a machine from booting. In this specific case this was caused by a service that ran as the user with the [...]]]></description>
			<content:encoded><![CDATA[<p>In general it is a good idea to configure password aging as part of your password/security policy. In some cases however, this might cause unexpected problems. I&#8217;ve seen cases where an expired password prevented a machine from booting. In this specific case this was caused by a service that ran as the user with the expired password. In general you should not run services as a normal user account, but sometimes you just have to deal with things you can&#8217;t change. Generally the documentation states that to disable password aging you have to edit the /etc/shadow file, and remove the part where the password age is stored. This is quite error prone. If you do it this way, be sure to use <code>vipw</code> to prevent errors in this critical file. To disable password aging I recommend just using the command to enable it as well:<br />
<code><br />
# chage -m 0 -M 99999 -E -1 username<br />
</code><br />
Check the before and after:<br />
<code><br />
# chage -l username<br />
Minimum:	7<br />
Maximum:	90<br />
Warning:	7<br />
Inactive:	-1<br />
Last Change:		Jun 26, 2009<br />
Password Expires:	Sep 24, 2009<br />
Password Inactive:	Never<br />
Account Expires:	Never<br />
</code><br />
After disabling password aging:<br />
<code><br />
# chage -l username<br />
Minimum:	0<br />
Maximum:	99999<br />
Warning:	7<br />
Inactive:	-1<br />
Last Change:		Jun 26, 2009<br />
Password Expires:	Never<br />
Password Inactive:	Never<br />
Account Expires:	Never<br />
</code></p>
<p>As a note, please only disable password aging when there is no other way to fix the problem. </p>
]]></content:encoded>
			<wfw:commentRss>http://rogierm.redbee.nl/blog/2009/08/04/disable-password-aging/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
