<?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; Qemu</title> <atom:link href="http://kevin.deldycke.com/tag/qemu/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>Enttec DMX-USB firmware upgrade with Qemu</title><link>http://kevin.deldycke.com/2009/05/enttec-dmx-usb-firmware-upgrade-with-qemu/</link> <comments>http://kevin.deldycke.com/2009/05/enttec-dmx-usb-firmware-upgrade-with-qemu/#comments</comments> <pubDate>Thu, 14 May 2009 19:55:57 +0000</pubDate> <dc:creator>Kev</dc:creator> <category><![CDATA[English]]></category> <category><![CDATA[dmx]]></category> <category><![CDATA[enttec]]></category> <category><![CDATA[firmware]]></category> <category><![CDATA[Hardware]]></category> <category><![CDATA[lighting]]></category> <category><![CDATA[lights]]></category> <category><![CDATA[Linux]]></category> <category><![CDATA[Qemu]]></category> <category><![CDATA[stage lightning]]></category> <category><![CDATA[USB]]></category><guid isPermaLink="false">http://kevin.deldycke.com/?p=359</guid> <description><![CDATA[A year ago, I brought a Enttec Pro USB/DMX widget. Since then, a new firmware was released. If it doesn&#8217;t fix any critical bug to me, I still have to upgrade it (don&#8217;t mind asking why&#8230; ). And to make &#8230; <a href="http://kevin.deldycke.com/2009/05/enttec-dmx-usb-firmware-upgrade-with-qemu/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description> <content:encoded><![CDATA[<p>A year ago, I brought a <a href="http://www.enttec.com/dmxusb.php">Enttec Pro USB/DMX widget</a>. Since then, a new firmware was released. If it doesn&#8217;t fix any critical bug to me, I still <em>have to</em> upgrade it (don&#8217;t mind asking why&#8230; <img src='http://kevin.deldycke.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> ). And to make things fun (read &#8220;dangerous&#8221;), I choose to do it with Qemu.</p><p>This article explains how I upgraded the firmware of my Enttec DMX/USB widget under linux thanks to Qemu.</p><p>First, plug your device in one of your computer&#8217;s USB port. We need to get the hardware UID of the widget. We can do so as root in a linux terminal:</p><pre class="brush: bash; title: ; notranslate">
cat /proc/bus/usb/devices
</pre><p>This command output a big mess in which you should find a block of lines separated by two blank lines (one above and one below) corresponding to your USB device. It&#8217;s easy to spot, as it contain the <code>ENTTEC</code> string. Mine look like this:</p><pre class="brush: bash; title: ; notranslate">
T:  Bus=02 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#=  2 Spd=12  MxCh= 0
D:  Ver= 2.00 Cls=00(&gt;ifc ) Sub=00 Prot=00 MxPS= 8 #Cfgs=  1
P:  Vendor=0403 ProdID=6001 Rev= 6.00
S:  Manufacturer=ENTTEC
S:  Product=DMX USB PRO
S:  SerialNumber=ENQXXXXX
C:* #Ifs= 1 Cfg#= 1 Atr=a0 MxPwr=300mA
I:* If#= 0 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=ftdi_sio
E:  Ad=81(I) Atr=02(Bulk) MxPS=  64 Ivl=0ms
E:  Ad=02(O) Atr=02(Bulk) MxPS=  64 Ivl=0ms
</pre><p>What we are looking for is the vendor&#8217;s ID and the product&#8217;s ID, that&#8217;s all Qemu needs to talk to the device. This is found on the line starting with <code>P:</code>. For me:</p><ul><li>Vendor ID: <code>0403</code></li><li>Products ID: <code>6001</code></li></ul><p>With this information, we can launch Qemu and bind it to the device. Assuming you already have a Qemu image containing a working version of windows XP, the command looks like this:</p><pre class="brush: bash; title: ; notranslate">
qemu -m 512 -usb -usbdevice host:0403:6001 -hda ./qemu-win-xp-with-freestyler.qcow
</pre><p>Alternatively, you can &#8220;hotplug&#8221; the USB device once inside Qemu. This can be done by calling the <a href="http://www.nongnu.org//qemu/qemu-doc.html#SEC11">Qemu interactive shell</a> by pressing <code>Ctrl + Alt + 2</code> simultaneously. Then, to hotplug the USB device, type:</p><pre class="brush: bash; title: ; notranslate">
usb_add host:0403:6001
</pre><p>If you&#8217;re as unlucky as I am, you&#8217;ll get this error message:</p><pre class="brush: bash; title: ; notranslate">
Could not add USB device 'host:0403:6001'
</pre><p>Which is doubled by the following message from your legacy console:</p><pre class="brush: bash; title: ; notranslate">
/proc/bus/usb/002/002: Permission denied
</pre><p>The latter point to the restrictive access rights on our device, which can be fixed by:</p><pre class="brush: bash; title: ; notranslate">
chmod -R a+rw /proc/bus/usb/002/002
</pre><p><a href="http://kevin.deldycke.com/wp-content/uploads/2009/05/qemu-usb-console.png"><img src="http://kevin.deldycke.com/wp-content/uploads/2009/05/qemu-usb-console-300x192.png" alt="qemu-usb-console" title="qemu-usb-console" width="300" height="192" class="aligncenter size-medium wp-image-623" /></a></p><p>Instead, if you get the following error message:</p><pre class="brush: bash; title: ; notranslate">
usb_host: device already grabbed
</pre><p>It probably mean that your linux kernel has already identified the device when you plugged in and has loaded some drivers. To unload them and free the device, I had to do:</p><pre class="brush: bash; title: ; notranslate">
lsmod
rmmod dmx_usb
rmmod ftdi_sio
</pre><p>At last, you can check under the emulated Windows that your Enttec widget is recognized by windows:</p><p><a href="http://kevin.deldycke.com/wp-content/uploads/2009/05/enttec-usb-dmx-widget-on-windows-xp-through-qemu.png"><img src="http://kevin.deldycke.com/wp-content/uploads/2009/05/enttec-usb-dmx-widget-on-windows-xp-through-qemu-300x231.png" alt="enttec-usb-dmx-widget-on-windows-xp-through-qemu" title="enttec-usb-dmx-widget-on-windows-xp-through-qemu" width="300" height="231" class="aligncenter size-medium wp-image-627" /></a></p><p>And finally you&#8217;re free to upgrade (at your own risks) your widget&#8217;s firmware with the tools available on Enttec&#8217;s official website:</p><p><a href="http://kevin.deldycke.com/wp-content/uploads/2009/05/enttec-dmx-usb-widget-firmware-upgrade-on-windows-xp-through-qemu.png"><img src="http://kevin.deldycke.com/wp-content/uploads/2009/05/enttec-dmx-usb-widget-firmware-upgrade-on-windows-xp-through-qemu-300x231.png" alt="enttec-dmx-usb-widget-firmware-upgrade-on-windows-xp-through-qemu" title="enttec-dmx-usb-widget-firmware-upgrade-on-windows-xp-through-qemu" width="300" height="231" class="aligncenter size-medium wp-image-628" /></a></p><p>FYI, all these operations where performed on a Mandriva 2008.1, Qemu 0.9.0 and linux kernel 2.6.24.</p> ]]></content:encoded> <wfw:commentRss>http://kevin.deldycke.com/2009/05/enttec-dmx-usb-firmware-upgrade-with-qemu/feed/</wfw:commentRss> <slash:comments>1</slash:comments> </item> <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> <item><title>Qemu 0.9 for Mandriva 2007</title><link>http://kevin.deldycke.com/2007/03/qemu-09-for-mandriva-2007/</link> <comments>http://kevin.deldycke.com/2007/03/qemu-09-for-mandriva-2007/#comments</comments> <pubDate>Fri, 30 Mar 2007 13:45:28 +0000</pubDate> <dc:creator>Kev</dc:creator> <category><![CDATA[kqemu]]></category> <category><![CDATA[Linux]]></category> <category><![CDATA[Mandriva]]></category> <category><![CDATA[Qemu]]></category> <category><![CDATA[Repository]]></category> <category><![CDATA[RPM]]></category> <category><![CDATA[urpmi]]></category><guid isPermaLink="false">http://kevin.deldycke.com/2007/03/qemu-09-for-mandriva-2007/</guid> <description><![CDATA[I&#8217;ve just backported qemu 0.9 to Mandriva 2007. This release include the kqemu 1.3.0pre11 kernel module, which was released under the GPL some weeks ago. As usual, this package is available in my RPM repository.]]></description> <content:encoded><![CDATA[<p>I&#8217;ve just backported <a href="http://fabrice.bellard.free.fr/qemu/">qemu</a> 0.9 to Mandriva 2007. This release include the <a href="http://lwn.net/Articles/220807/">kqemu 1.3.0pre11 kernel module, which was released under the GPL some weeks ago</a>.</p><p>As usual, this package is <a href="http://kevin.deldycke.com/static/repository/mandriva/2007.0/i586/">available in my RPM repository.</a></p> ]]></content:encoded> <wfw:commentRss>http://kevin.deldycke.com/2007/03/qemu-09-for-mandriva-2007/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Why kqemu doesn&#8217;t do its job ?</title><link>http://kevin.deldycke.com/2006/07/why-kqemu-doesnt-do-its-job/</link> <comments>http://kevin.deldycke.com/2006/07/why-kqemu-doesnt-do-its-job/#comments</comments> <pubDate>Fri, 28 Jul 2006 21:39:19 +0000</pubDate> <dc:creator>Kev</dc:creator> <category><![CDATA[Linux]]></category> <category><![CDATA[Qemu]]></category><guid isPermaLink="false">http://kevin.deldycke.com/2006/07/28/why-kqemu-doesnt-do-its-job/</guid> <description><![CDATA[I was using qemu for more than 1 year, but I only noticed today that kqemu, which is supposed to speed qemu up, was not working on my machine: there was absolutely no differences with or without kqemu. I finally &#8230; <a href="http://kevin.deldycke.com/2006/07/why-kqemu-doesnt-do-its-job/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description> <content:encoded><![CDATA[<p>I was using <a href="http://fabrice.bellard.free.fr/qemu/">qemu</a> for more than 1 year, but I only noticed today that <a href="http://fabrice.bellard.free.fr/qemu/qemu-accel.html">kqemu</a>, which is supposed to speed qemu up, was not working on my machine: there was absolutely no differences with or without kqemu.</p><p>I finally found the reason on the qemu website FAQ: <a href="http://kidsquid.com/cgi-bin/moin.cgi/FrequentlyAskedQuestions#head-909015808a3a29b67ccbb65c8b089017d5cd97aa">Why has kqemu not improved the speed of qemu on my Linux system?</a>.</p><p>So, if you are using my kqemu RPM for Mandriva 2006, don&#8217;t forget to add the following line in your <code>/etc/fstab</code> file:</p><blockquote><p><code>tmpfs    /dev/shm    tmpfs    defaults    0  0</code></p></blockquote><p>Then reboot your OS to enjoy the speed up !</p> ]]></content:encoded> <wfw:commentRss>http://kevin.deldycke.com/2006/07/why-kqemu-doesnt-do-its-job/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Mandriva 2006.0 rpms: amarok, qemu, kqemu and baghira updated.</title><link>http://kevin.deldycke.com/2006/04/mandriva-20060-repository-amarok-qemu-kqemu-and-baghira-updated/</link> <comments>http://kevin.deldycke.com/2006/04/mandriva-20060-repository-amarok-qemu-kqemu-and-baghira-updated/#comments</comments> <pubDate>Sun, 23 Apr 2006 21:39:08 +0000</pubDate> <dc:creator>Kev</dc:creator> <category><![CDATA[Amarok]]></category> <category><![CDATA[baghira]]></category> <category><![CDATA[KDE]]></category> <category><![CDATA[Linux]]></category> <category><![CDATA[Mandriva]]></category> <category><![CDATA[Qemu]]></category> <category><![CDATA[RPM]]></category><guid isPermaLink="false">http://kevin.deldycke.com/2006/04/23/mandriva-20060-repository-amarok-qemu-kqemu-and-baghira-updated/</guid> <description><![CDATA[I updated the baghira rpm with the 24/02/2006 CVS version. This version correct a very annoying bug I had with the previous RPM. Now Kpdf doesn&#8217;t freeze anymore. I also added newer version of qemu and kqemu v0.7.2 I found &#8230; <a href="http://kevin.deldycke.com/2006/04/mandriva-20060-repository-amarok-qemu-kqemu-and-baghira-updated/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description> <content:encoded><![CDATA[<p>I updated the baghira rpm with the 24/02/2006 CVS version. This version correct a very annoying bug I had with the previous RPM. Now Kpdf doesn&#8217;t freeze anymore.</p><p>I also added newer version of qemu and kqemu v0.7.2 I found on <a href="http://fasmz.org/~pterjan/rpm/">P.Terjan repository</a> and Amarok 1.4beta2 from the <a href="http://www.gkmweb.com/amarok/2006.0/1.4-beta/">gkmweb.com repository</a>.</p> ]]></content:encoded> <wfw:commentRss>http://kevin.deldycke.com/2006/04/mandriva-20060-repository-amarok-qemu-kqemu-and-baghira-updated/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Qemu: How-To Share Network Access with the Ghest OS</title><link>http://kevin.deldycke.com/2005/06/qemu-how-to-share-network-access-with-the-ghest-os/</link> <comments>http://kevin.deldycke.com/2005/06/qemu-how-to-share-network-access-with-the-ghest-os/#comments</comments> <pubDate>Sat, 04 Jun 2005 19:20:13 +0000</pubDate> <dc:creator>Kev</dc:creator> <category><![CDATA[English]]></category> <category><![CDATA[iptables]]></category> <category><![CDATA[Linux]]></category> <category><![CDATA[Network]]></category> <category><![CDATA[Qemu]]></category><guid isPermaLink="false">http://kevin.deldycke.com/2005/06/qemu-how-to-share-network-access-with-the-ghest-os/</guid> <description><![CDATA[Create a file /etc/qemu-ifup that contain: Don&#8217;t forget to give it execution permissions: Start qemu with the following parameters: Setup the network in your ghest OS in qemu: Test the visibility of the guest OS from the host OS: Test &#8230; <a href="http://kevin.deldycke.com/2005/06/qemu-how-to-share-network-access-with-the-ghest-os/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description> <content:encoded><![CDATA[<p><a href="http://kevin.deldycke.com/wp-content/uploads/2005/06/photo_f3.png"><img src="http://kevin.deldycke.com/wp-content/uploads/2005/06/photo_f3-150x150.png" alt="Qemu Network Sharing" title="Qemu Network Sharing" width="150" height="150" class="alignleft size-thumbnail wp-image-550" /></a></p><p>Create a file <code>/etc/qemu-ifup</code> that contain:</p><pre class="brush: bash; title: ; notranslate">
#!/bin/sh
sudo modprobe tun
sudo /sbin/ifconfig $1 up 10.0.2.2 netmask 255.255.255.0 broadcast 10.0.2.255

# IP masquerade
sudo echo &quot;1&quot; &gt; /proc/sys/net/ipv4/ip_forward
sudo /sbin/iptables -N nat
sudo /sbin/iptables -t nat -F
sudo /sbin/iptables -t nat -A POSTROUTING -s 10.0.2.15 -j MASQUERADE
sudo /sbin/iptables -t nat -A POSTROUTING -d 10.0.2.15 -o $1
</pre><p>Don&#8217;t forget to give it execution permissions:</p><pre class="brush: bash; title: ; notranslate">
chmod 755 /etc/qemu-ifup
</pre><p>Start qemu with the following parameters:</p><pre class="brush: bash; title: ; notranslate">
qemu /home/kevin/qemu-mdk10.1.img -n /etc/qemu-ifup
</pre><p>Setup the network in your ghest OS in qemu:</p><pre class="brush: bash; title: ; notranslate">
ifconfig eth0 10.0.2.15
route add default gw 10.0.2.2
</pre><p>Test the visibility of the guest OS from the host OS:</p><pre class="brush: bash; title: ; notranslate">
[root@localhost kevin]# ping 10.0.2.15
PING 10.0.2.15 (10.0.2.15) 56(84) bytes of data.
64 bytes from 10.0.2.15: icmp_seq=1 ttl=64 time=2.96 ms
64 bytes from 10.0.2.15: icmp_seq=2 ttl=64 time=0.295 ms
64 bytes from 10.0.2.15: icmp_seq=3 ttl=64 time=0.296 ms

--- 10.0.2.15 ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2000ms
rtt min/avg/max/mdev = 0.295/1.185/2.965/1.258 ms
</pre><p>Test the visibility of the host from the guest:</p><pre class="brush: bash; title: ; notranslate">
[root@localhost root]# ping 10.0.2.2
PING 10.0.2.2 (10.0.2.2) 56(84) bytes of data.
64 bytes from 10.0.2.2: icmp_seq=1 ttl=64 time=1.08 ms
64 bytes from 10.0.2.2: icmp_seq=2 ttl=64 time=0.433 ms
64 bytes from 10.0.2.2: icmp_seq=3 ttl=64 time=0.383 ms

--- 10.0.2.2 ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2001ms
rtt min/avg/max/mdev = 0.383/0.634/1.087/0.321 ms
</pre>]]></content:encoded> <wfw:commentRss>http://kevin.deldycke.com/2005/06/qemu-how-to-share-network-access-with-the-ghest-os/feed/</wfw:commentRss> <slash:comments>6</slash:comments> </item> <item><title>Qemu commands</title><link>http://kevin.deldycke.com/2005/06/qemu-commands/</link> <comments>http://kevin.deldycke.com/2005/06/qemu-commands/#comments</comments> <pubDate>Sat, 04 Jun 2005 13:34:01 +0000</pubDate> <dc:creator>Kev</dc:creator> <category><![CDATA[English]]></category> <category><![CDATA[CLI]]></category> <category><![CDATA[Linux]]></category> <category><![CDATA[Qemu]]></category><guid isPermaLink="false">http://kevin.deldycke.com/2006/10/some-qemu-commands/</guid> <description><![CDATA[Some useful command to help running and setup qemu&#8230; Create an empty compressed 10 Go disk image (in qcow2 format): Boot on your machine&#8217;s CD-Rom in qemu with previous disk image as primary HDD: Same as above but with a &#8230; <a href="http://kevin.deldycke.com/2005/06/qemu-commands/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description> <content:encoded><![CDATA[<p>Some useful command to help running and setup qemu&#8230;</p><ul><li>Create an empty compressed 10 Go disk image (in <code>qcow2</code> format):</p><pre class="brush: bash; title: ; notranslate">
qemu-img create -f qcow2 /home/kevin/qemu-disk-image.qcow 10G
</pre></li><li>Boot on your machine&#8217;s CD-Rom in qemu with previous disk image as primary HDD:<pre class="brush: bash; title: ; notranslate">
qemu -cdrom /dev/cdrom -hda /home/kevin/qemu-disk-image.qcow -boot d
</pre></li><li>Same as above but with a CD-Rom <code>iso</code> image:<pre class="brush: bash; title: ; notranslate">
qemu -cdrom /home/kevin/ubuntu.iso -hda /home/kevin/qemu-disk-image.qcow -boot d
</pre></li><li>Boot the previously created disk image:<pre class="brush: bash; title: ; notranslate">
qemu /home/kevin/qemu-disk-image.qcow
</pre></li><li>Convert <code>qcow</code> image to a <code>raw</code> image:<pre class="brush: bash; title: ; notranslate">
qemu-img convert /home/kevin/qemu-disk-image.qcow -O raw /home/kevin/qemu-disk-image.raw
</pre></li><li>Mount a RAW disk image:<pre class="brush: bash; title: ; notranslate">
mount -o loop,offset=32256 /home/kevin/qemu-disk-image.raw /media/qemu/
</pre></li><li>Mount a <code>qcow2</code> disk image via the <code>nbd</code> protocol (don&#8217;t forget to install the <code>nbd-client</code> package):<pre class="brush: bash; title: ; notranslate">
modprobe nbd max_part=63
qemu-nbd -c /dev/nbd0 /home/kevin/qemu-disk-image.qcow2
mount /dev/nbd0p1 /media/qemu
</pre></li><li>To run a x86_64 guest system on a 32-bit host, simply use <code>qemu-system-x86_64</code> binary command instead of <code>qemu</code>.</li></ul> ]]></content:encoded> <wfw:commentRss>http://kevin.deldycke.com/2005/06/qemu-commands/feed/</wfw:commentRss> <slash:comments>4</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/36 queries in 0.013 seconds using apc
Object Caching 861/936 objects using apc

Served from: kevin.deldycke.com @ 2012-02-08 09:57:13 -->
