<?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>Somewhere out there! &#187; Kvm</title>
	<atom:link href="http://stateless.geek.nz/category/virtualisation/kvm/feed/" rel="self" type="application/rss+xml" />
	<link>http://stateless.geek.nz</link>
	<description></description>
	<lastBuildDate>Tue, 14 Feb 2012 11:00:37 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>Lucid libvirt</title>
		<link>http://stateless.geek.nz/2011/12/13/lucid-libvirt/</link>
		<comments>http://stateless.geek.nz/2011/12/13/lucid-libvirt/#comments</comments>
		<pubDate>Tue, 13 Dec 2011 01:23:07 +0000</pubDate>
		<dc:creator>Nicholas Lee</dc:creator>
				<category><![CDATA[Kvm]]></category>
		<category><![CDATA[libvirt]]></category>
		<category><![CDATA[qemu]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://stateless.geek.nz/?p=873</guid>
		<description><![CDATA[Lucid does not seem to work well with libvirt/kvm, there are several bugs that seem to be fixed in Maverick but not in Lucid. From syslog: Re: [libvirt] FYI, &#8220;Unable to create cgroup for &#8230;&#8221; This is a bug in systemd. It periodically scans all mounted cgroups and deletes any directories which don&#8217;t contain any [...]]]></description>
			<content:encoded><![CDATA[<p>Lucid does not seem to work well with libvirt/kvm, there are several bugs that seem to be fixed in Maverick but not in Lucid.</p>
<p>From syslog:</p>
<pre class="brush: bash; title: ; notranslate">
error : qemuSetupCgroup:1955 : Unable to create cgroup for DOMAIN: No such file or directory
error : qemuRemoveCgroup:2045 : internal error Unable to find cgroup for DOMAIN#012
</pre>
<p><a href="http://www.redhat.com/archives/libvir-list/2011-April/msg00153.html">Re: [libvirt] FYI, &#8220;Unable to create cgroup for &#8230;&#8221;</a></p>
<blockquote><p>This is a bug in systemd. It periodically scans all mounted cgroups<br />
and deletes any directories which don&#8217;t contain any attached processes.<br />
Needless to say this breaks libvirt, and possibly other apps, which<br />
don&#8217;t expect 3rd parties to be deleting their directories.</p>
<p>  <a href="https://bugzilla.redhat.com/show_bug.cgi?id=678555">https://bugzilla.redhat.com/show_bug.cgi?id=678555</a></p></blockquote>
<p>Best solution for this that I&#8217;ve found on lucid is: <a href="https://bugzilla.redhat.com/show_bug.cgi?id=696218">Bug 696218 &#8211; Unable to create cgroup: No such file or directory</a></p>
<blockquote><p>I was able to solve it by modifying the configuration in the file<br />
/etc/libvirt/qemu.conf:
</p></blockquote>
<pre class="brush: bash; title: ; notranslate">
 cgroup_controllers = [ ]
</pre>
<p><a href="https://bugs.launchpad.net/ubuntu/+source/libvirt/+bug/579584">setgid, setuid needed by /etc/apparmor.d/abstractions/libvirt-qemu</a></p>
<pre class="brush: diff; title: ; notranslate">
=== modified file 'apparmor.d/abstractions/libvirt-qemu'
--- apparmor.d/abstractions/libvirt-qemu 2010-04-30 15:33:20 +0000
+++ apparmor.d/abstractions/libvirt-qemu 2010-05-12 17:26:56 +0000
@@ -8,6 +8,8 @@
   capability dac_override,
   capability dac_read_search,
   capability chown,
+ capability setgid,
+ capability setuid,
</pre>
<p><a href="https://bugs.launchpad.net/ubuntu/+source/libvirt/+bug/599910">Libvirt/kvm permissions/ownership issue on upgrade from Karmic to Lucid</a> and <a href="http://ubuntuforums.org/showthread.php?t=1703744">error: operation failed: failed to retrieve chardev info in qemu with &#8216;indev&#8217;</a></p>
<pre class="brush: bash; title: ; notranslate">libvirtError: internal error unable to start guest: libvir: QEMU
error : cannot set ownership</pre>
<p> or
<pre class="brush: bash; title: ; notranslate"> error: operation failed: failed to retrieve chardev info in qemu with 'indev'</pre>
<p>Add the following to /etc/libvirt/qemu.conf:</p>
<pre class="brush: bash; title: ; notranslate">
# The user ID for QEMU processes run by the system instance
#user = &quot;libvirt-qemu&quot;
user = &quot;root&quot;

# The group ID for QEMU processes run by the system instance
group = &quot;kvm&quot;
</pre>
<p><a href="https://bugs.launchpad.net/ubuntu/lucid/+source/libvirt/+bug/578527">map serial port throws &#8220;chardev: opening backend &#8220;tty&#8221; failed&#8221;</a></p>
<p>There seems to be a problem with the apparmor profile of libvirt (see bug #54579). After adding the line to /etc/apparmor.d/abstractions/libvirt-qemu and reloading the profile it worked for me.</p>
<pre class="brush: bash; title: ; notranslate">
/dev/ttyS* rw,
</pre>
<p>Few other links:</p>
<ul>
<li><a href="https://bugzilla.redhat.com/show_bug.cgi?id=666130">Bug 666130 &#8211; Cgroups cause libvirt to be unable to start virtual machines</a></li>
<li><a href="http://libvirt.org/drvqemu.html#securityselinux">SELinux basic confinement</a> &#8211; also some cgroup details</li>
<li><a href="http://berrange.com/posts/2009/12/03/using-cgroups-with-libvirt-and-lxckvm-guests-in-fedora-12/">Using CGroups with libvirt and LXC/KVM guests in Fedora 12</a></li>
<li><a href="https://bugs.launchpad.net/ubuntu/+source/libvirt/+bug/577264">libvirt started after cgred &#8211; cgroup not working correctly</a></li>
<li><a href="https://bugs.launchpad.net/ubuntu/+source/libcgroup/+bug/644669">cgred should be started before libvirt-bin</a></li>
<li><a href="http://ubuntuforums.org/showthread.php?t=1638708">[SOLVED] Virt-manager picks wrong qcow2/raw format for new VMs (No bootable device.)</a>	</li>
<li><a href="http://jkyamog.blogspot.com/2010/07/lxc-on-ubuntu-1004-lucid-lynx.html">LXC on Ubuntu 10.04 Lucid Lynx</a> &#8211; some cgroup notes.</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://stateless.geek.nz/2011/12/13/lucid-libvirt/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>kvm vs qemu-kvm vs kvm-kmod</title>
		<link>http://stateless.geek.nz/2009/10/16/kvm-vs-qemu-kvm-vs-kvm-kmod/</link>
		<comments>http://stateless.geek.nz/2009/10/16/kvm-vs-qemu-kvm-vs-kvm-kmod/#comments</comments>
		<pubDate>Thu, 15 Oct 2009 21:01:10 +0000</pubDate>
		<dc:creator>Nicholas Lee</dc:creator>
				<category><![CDATA[Kvm]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://stateless.geek.nz/?p=710</guid>
		<description><![CDATA[Ubuntu recently change their package names for kvm.  This comment posted on qemu-0.11.0 Released provides an explanation: qemu-kvm includes features and fixes from upstream qemu and so takes its naming scheme from upstream qemu. You can think of it as qemu optimized for kvm. Note too that qemu-kvm does not include the kernel module but only [...]]]></description>
			<content:encoded><![CDATA[<p>Ubuntu recently change their package names for kvm.  This comment posted on <a href="http://www.linux-kvm.com/content/qemu-0110-released#comment-686">qemu-0.11.0 Released</a> provides an explanation:</p>
<blockquote>
<p style="margin-top: 0em; margin-right: 0px; margin-bottom: 1.5em; margin-left: 0px; line-height: 17px; padding: 0px;"><strong>qemu-kvm includes features and fixes from upstream qemu and so takes its naming scheme from upstream qemu.</strong> You can think of it as qemu optimized for kvm. Note too that qemu-kvm does not include the kernel module but only the userspace and considered to be stable.</p>
<p style="margin-top: 0em; margin-right: 0px; margin-bottom: 1.5em; margin-left: 0px; line-height: 17px; padding: 0px;"><strong>kvm-xx on the other hand is the development branch of kvm and not considered to be stable.</strong> It&#8217;s naming scheme is arbitrary and it also takes features from upstream qemu.</p>
</blockquote>
<p style="margin-top: 0em; margin-right: 0px; margin-bottom: 1.5em; margin-left: 0px; line-height: 17px; padding: 0px;">&#8230;</p>
<blockquote>
<p style="margin-top: 0em; margin-right: 0px; margin-bottom: 1.5em; margin-left: 0px; line-height: 17px; padding: 0px;">kvm-kmod is different to kvm-xx. You can think of kvm-kmod as a subset of the kvm-xx. <strong>KVM-xx = userspace + kernel where kvm-kmod is the kernel part of it and qemu-kvm is the userspace part (the guest process itself)</strong>. You can apply the kvm-kmod to any distro version or linux version.. it&#8217;s just the kernel driver. However, without the userspace part, you can&#8217;t do much with it.</p>
</blockquote>
]]></content:encoded>
			<wfw:commentRss>http://stateless.geek.nz/2009/10/16/kvm-vs-qemu-kvm-vs-kvm-kmod/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>kvm disk performance with different backends</title>
		<link>http://stateless.geek.nz/2009/10/13/kvm-disk-performance-with-different-backends/</link>
		<comments>http://stateless.geek.nz/2009/10/13/kvm-disk-performance-with-different-backends/#comments</comments>
		<pubDate>Mon, 12 Oct 2009 23:16:11 +0000</pubDate>
		<dc:creator>Nicholas Lee</dc:creator>
				<category><![CDATA[Kvm]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[benchmark]]></category>
		<category><![CDATA[disk]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://stateless.geek.nz/?p=696</guid>
		<description><![CDATA[Here  some results from testing I did in August 2009 on  KVM with the three different disk image drivers. First a single disk system running Ubuntu x64 9.04: QCOW2: /dev/vda: Timing cached reads: 9836 MB in 2.00 seconds = 4923.22 MB/sec Timing buffered disk reads: 1050 MB in 3.00 seconds = 349.92 MB/sec RAW: /dev/vda: Timing cached [...]]]></description>
			<content:encoded><![CDATA[<p>Here  some results from testing I did in August 2009 on  KVM with the three different disk image drivers. First a single disk system running Ubuntu x64 9.04:</p>
<p><span id="more-696"></span></p>
<p><code> QCOW2:<br />
/dev/vda:<br />
Timing cached reads:   9836 MB in  2.00 seconds = 4923.22 MB/sec<br />
Timing buffered disk reads:  1050 MB in  3.00 seconds = 349.92 MB/sec</code></p>
<p><code>RAW:<br />
/dev/vda:<br />
Timing cached reads:   10118 MB in  2.00 seconds = 5064.57 MB/sec<br />
Timing buffered disk reads:  1054 MB in  3.00 seconds = 351.32 MB/sec</code></p>
<p><code> </code></p>
<p><code>LVM<br />
/dev/vda:<br />
Timing cached reads:   9328 MB in  2.00 seconds = 4668.90 MB/sec<br />
Timing buffered disk reads:  202 MB in  3.00 seconds =  67.26 MB/sec</code></p>
<p><code>qcow2,488M,61454,88,288839,43,61540,14,45880,57,445361,57,13550.6,99,16,+++++,+++,+++++,+++,+++++,+++,+++++,+++,+++++,+++,+++++,+++<br />
raw  ,488M,54972,86,54393,16,60636,17,68490,84,442091,43,6685.1,97,16,+++++,+++,+++++,+++,+++++,+++,+++++,+++,+++++,+++,+++++,+++<br />
lvm  ,488M,58248,90,62764,17,58271,19,64677,83,455263,38,7912.3,96,16,+++++,+++,+++++,+++,+++++,+++,+++++,+++,+++++,+++,+++++,+++</code></p>
<p><code>QCOW2<br />
Version 1.03c       ------Sequential Output------ --Sequential Input- --Random-<br />
-Per Chr- --Block-- -Rewrite- -Per Chr- --Block-- --Seeks--<br />
Machine        Size K/sec %CP K/sec %CP K/sec %CP K/sec %CP K/sec %CP  /sec %CP<br />
vm2            488M 61454  88 288839  43 61540  14 45880  57 445361  57 13551  99<br />
------Sequential Create------ --------Random Create--------<br />
-Create-- --Read--- -Delete-- -Create-- --Read--- -Delete--<br />
files  /sec %CP  /sec %CP  /sec %CP  /sec %CP  /sec %CP  /sec %CP<br />
16 +++++ +++ +++++ +++ +++++ +++ +++++ +++ +++++ +++ +++++ +++<br />
vm2,488M,61454,88,288839,43,61540,14,45880,57,445361,57,13550.6,99,16,+++++,+++,+++++,+++,+++++,+++,+++++,+++,+++++,+++,+++++,+++</p>
<p>RAW</p>
<p>Version 1.03c       ------Sequential Output------ --Sequential Input- --Random-<br />
-Per Chr- --Block-- -Rewrite- -Per Chr- --Block-- --Seeks--<br />
Machine        Size K/sec %CP K/sec %CP K/sec %CP K/sec %CP K/sec %CP  /sec %CP<br />
vm2            488M 54972  86 54393  16 60636  17 68490  84 442091  43  6685  97<br />
------Sequential Create------ --------Random Create--------<br />
-Create-- --Read--- -Delete-- -Create-- --Read--- -Delete--<br />
files  /sec %CP  /sec %CP  /sec %CP  /sec %CP  /sec %CP  /sec %CP<br />
16 +++++ +++ +++++ +++ +++++ +++ +++++ +++ +++++ +++ +++++ +++<br />
vm2,488M,54972,86,54393,16,60636,17,68490,84,442091,43,6685.1,97,16,+++++,+++,+++++,+++,+++++,+++,+++++,+++,+++++,+++,+++++,+++</p>
<p></code></p>
<p><code>LVM<br />
Version 1.03c       ------Sequential Output------ --Sequential Input- --Random-<br />
-Per Chr- --Block-- -Rewrite- -Per Chr- --Block-- --Seeks--<br />
Machine        Size K/sec %CP K/sec %CP K/sec %CP K/sec %CP K/sec %CP  /sec %CP<br />
vm2            488M 58248  90 62764  17 58271  19 64677  83 455263  38  7912  96<br />
------Sequential Create------ --------Random Create--------<br />
-Create-- --Read--- -Delete-- -Create-- --Read--- -Delete--<br />
files  /sec %CP  /sec %CP  /sec %CP  /sec %CP  /sec %CP  /sec %CP<br />
16 +++++ +++ +++++ +++ +++++ +++ +++++ +++ +++++ +++ +++++ +++<br />
vm2,488M,58248,90,62764,17,58271,19,64677,83,455263,38,7912.3,96,16,+++++,+++,+++++,+++,+++++,+++,+++++,+++,+++++,+++,+++++,+++<br />
</code></p>
<p>Then a <a href="http://spreadsheets.google.com/ccc?key=0Am-tdsutQAFCdDd1MFVBQ19pNUhUbTBRYm5pUXU1elE&amp;hl=en">spreadsheet</a> with a large set of test using Ubuntu x64 9.04 host  with two ES SATA disks and LVM over raid1/md.</p>
]]></content:encoded>
			<wfw:commentRss>http://stateless.geek.nz/2009/10/13/kvm-disk-performance-with-different-backends/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Redhat and KVM</title>
		<link>http://stateless.geek.nz/2008/09/05/redhat-and-kvm/</link>
		<comments>http://stateless.geek.nz/2008/09/05/redhat-and-kvm/#comments</comments>
		<pubDate>Fri, 05 Sep 2008 02:54:12 +0000</pubDate>
		<dc:creator>Nicholas Lee</dc:creator>
				<category><![CDATA[Kvm]]></category>
		<category><![CDATA[Xen]]></category>
		<category><![CDATA[Virtualisation]]></category>

		<guid isPermaLink="false">http://stateless.geek.nz/?p=576</guid>
		<description><![CDATA[Redhat has acquired Qumranet the developers of KVM. Will be interesting to see how this plays out in the Linux virtualisation world. I haven&#8217;t tried KVM yet as I&#8217;ve been too busy and Xen is more mature &#8211; but many of the accounts I&#8217;ve read seem to indicate that for Linux its performance is very [...]]]></description>
			<content:encoded><![CDATA[<p>Redhat has acquired <a href="http://www.redhat.com/promo/qumranet/">Qumranet</a> the developers of <a href="http://kvm.qumranet.com/">KVM</a>. Will be interesting to see how this plays out in the Linux virtualisation world. </p>
<p>I haven&#8217;t tried KVM yet as I&#8217;ve been too busy and Xen is more mature &#8211; but many of the accounts I&#8217;ve read seem to indicate that for Linux its performance is very good maybe better in some cases than Xen.  Management is another issue, but that is just a matter of time and development enegry.</p>
<p>From <a href="http://lwn.net/Articles/296896/">lwn</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://stateless.geek.nz/2008/09/05/redhat-and-kvm/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

