<?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>Kevin Deldycke &#187; qcow</title> <atom:link href="http://kevin.deldycke.com/tag/qcow/feed/" rel="self" type="application/rss+xml" /><link>http://kevin.deldycke.com</link> <description>Free software engineer &#38; wannabe videomaker</description> <lastBuildDate>Fri, 03 Feb 2012 19:08:27 +0000</lastBuildDate> <language>en</language> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=3.3.1</generator> <item><title>How-to grow any Qemu system image</title><link>http://kevin.deldycke.com/2007/04/how-to-grow-any-qemu-system-image/</link> <comments>http://kevin.deldycke.com/2007/04/how-to-grow-any-qemu-system-image/#comments</comments> <pubDate>Sun, 08 Apr 2007 15:10:56 +0000</pubDate> <dc:creator>Kev</dc:creator> <category><![CDATA[English]]></category> <category><![CDATA[gparted]]></category> <category><![CDATA[Linux]]></category> <category><![CDATA[qcow]]></category> <category><![CDATA[Qemu]]></category> <category><![CDATA[system]]></category> <category><![CDATA[windows]]></category><guid isPermaLink="false">http://kevin.deldycke.com/2007/04/how-to-grow-any-qemu-system-image/</guid> <description><![CDATA[Qemu images can&#8217;t be growed. In this example I will show you a little hack to grow a 6GiB qcow image to a 10GiB image. Beware: these operations can take a lot of time to perform and require lots of &#8230; <a href="http://kevin.deldycke.com/2007/04/how-to-grow-any-qemu-system-image/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description> <content:encoded><![CDATA[<p>Qemu images can&#8217;t be growed. In this example I will show you a little hack to grow a 6GiB <code>qcow</code> image to a 10GiB image. Beware: these operations can take a lot of time to perform and require lots of free space.</p><p>First, convert your <code>qcow</code> image to a plain raw file:</p><pre class="brush: bash; title: ; notranslate">
qemu-img convert system.qcow -O raw system.raw
</pre><p>Then, create a dummy file (filled with zeros) of the size of extra space you want to add to your image. In this case, 4GiB (=10GiB &#8211; 6GiB):</p><pre class="brush: bash; title: ; notranslate">
dd if=/dev/zero of=zeros.raw bs=1024k count=4096
</pre><p>Fearlessly, add your extra space to your raw system image:</p><pre class="brush: bash; title: ; notranslate">
cat system.raw zeros.raw &gt; big10G.raw
</pre><p>After that you can boot qemu to verify that added free space is available:</p><pre class="brush: bash; title: ; notranslate">
qemu -hda big10G.raw
</pre><p>Here is an real case example of what you can see in a qemu image on which Windows XP was installed:<br /> <a href="http://kevin.deldycke.com/wp-content/uploads/2007/04/growed-image1.png"><img src="http://kevin.deldycke.com/wp-content/uploads/2007/04/growed-image1-300x233.png" alt="" title="Windows XP in Qemu - Primary Disk Extra Free Space" width="300" height="233" class="aligncenter size-medium wp-image-3010" /></a></p><p>Now, to grow your primary partition, I suggest you to download a Live CD like <a href="http://gparted.sourceforge.net/livecd.php">gparted Live CD</a> or <a href="http://www.sysresccd.org">System Rescue CD</a>, and boot on the <code>.iso</code> file with qemu:</p><pre class="brush: bash; title: ; notranslate">
qemu -hda big10G.raw -cdrom gparted-livecd-0.3.4-5.iso -boot d
</pre><p>This will allow you to grow and manipulate all your partitions safely thanks to <a href="http://www.gnu.org/software/parted/index.shtml">parted</a> and other open source system tools.</p><p>Finally you can convert back your <code>raw</code> image to a <code>qcow</code> one to not waste space:</p><pre class="brush: bash; title: ; notranslate">
qemu-img convert big10G.raw -O qcow growed-system.qcow
</pre><p>That&#8217;s all !</p><p>By the way, I think it&#8217;s possible to perform the second and third step of this how-to in a single operation using <code>dd</code> only.</p><p><u>Update</u>: I missed it, but this issue is also described in the FAQ from the <a href="http://kidsquid.com/cgi-bin/moin.cgi">unofficial #qemu wiki</a> (look at &#8220;<a href="http://kidsquid.com/cgi-bin/moin.cgi/FrequentlyAskedQuestions#head-b46370d3ad030e6c1712338f0e5112228c51212a">How do I resize a disk image?</a>&#8221; question).</p> ]]></content:encoded> <wfw:commentRss>http://kevin.deldycke.com/2007/04/how-to-grow-any-qemu-system-image/feed/</wfw:commentRss> <slash:comments>16</slash:comments> </item> </channel> </rss>
<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk: basic
Page Caching using disk: enhanced
Database Caching 2/8 queries in 0.004 seconds using apc
Object Caching 507/507 objects using apc

Served from: kevin.deldycke.com @ 2012-02-08 04:05:36 -->
