{"id":45,"date":"2007-04-19T01:38:46","date_gmt":"2007-04-18T23:38:46","guid":{"rendered":"http:\/\/blogs.igalia.com\/berto\/2007\/04\/19\/qemu-in-five-minutes\/"},"modified":"2007-04-19T01:38:46","modified_gmt":"2007-04-18T23:38:46","slug":"qemu-in-five-minutes","status":"publish","type":"post","link":"https:\/\/blogs.igalia.com\/berto\/2007\/04\/19\/qemu-in-five-minutes\/","title":{"rendered":"QEMU in five minutes"},"content":{"rendered":"<p>Some friends have been asking me how to use <a href=\"http:\/\/www.qemu.org\/\">QEMU<\/a>. While there are many other virtualization packages (such as <a href=\"http:\/\/www.virtualbox.org\/\">Virtual Box<\/a>, <a href=\"http:\/\/kvm.sourceforge.net\/\">KVM<\/a> or the non-free <a href=\"http:\/\/www.vmware.com\/products\/player\/\">VMware Player<\/a>), QEMU has been around for a while, it&#8217;s already packaged in Debian stable and it&#8217;s <em>really easy to use<\/em>.<\/p>\n<p>Moreover, the (optional) kernel accelerator <em>kqemu<\/em> has been released under the GPL a couple of months ago, so it&#8217;s a good moment to give QEMU a try.<\/p>\n<p>Let&#8217;s see the basic usage:<\/p>\n<ul>\n<li>Install QEMU.<br \/>\n<tt>$ apt-get install qemu<\/tt>\n<\/li>\n<li>Create a hard disk image. It&#8217;s 2 GB in this example, but don&#8217;t worry about the size of the file, it will grow dinamically as you write data to it.<br \/>\n<tt>$ qemu-img create -f qcow hd.img 2G<\/tt>\n<\/li>\n<li>Install things in your new hard disk image. You can boot from a CD-ROM, or an ISO image, a floppy&#8230;<br \/>\n<tt>$ qemu -hda hd.img -cdrom \/dev\/cdrom -boot d<\/tt><br \/>\n<tt>$ qemu -hda hd.img -cdrom cdimage.iso -boot d<\/tt><br \/>\n<tt>$ qemu -hda hd.img -fda \/dev\/fd0 -boot a<\/tt><br \/>\n<tt>$ qemu -hda hd.img -fda floppy.img -boot a<\/tt>\n<\/li>\n<li>Once the system is installed in your virtual hard disk, you can boot directly from it:<br \/>\n<tt>$ qemu -hda hd.img<\/tt>\n<\/li>\n<li>Or you can forget about hard disks and just use a bootable CD:<br \/>\n<tt>$ qemu -cdrom livecd.iso<\/tt>\n<\/li>\n<\/ul>\n<p>And that&#8217;s it! QEMU has built-in SMB, TFTP, DNS and DHCP servers. Everything in user space, so you don&#8217;t need special permissions nor additional configuration: no kernel modules, no tun\/tap interfaces&#8230; <em>nothing!<\/em>. I said it was very easy to use, didn&#8217;t I? \ud83d\ude09<\/p>\n<p>Of course there&#8217;s a lot more, but you won&#8217;t need it for the basic usage.<\/p>\n<p>If you&#8217;re too lazy to install an operating system inside QEMU, you can download a <a href=\"http:\/\/www.oszoo.org\/wiki\/index.php\/Category:OS_images\">hard disk image built by someone else<\/a>. Note that QEMU can read the VMware disk format, so you&#8217;ve got a <a href=\"http:\/\/www.vmware.com\/vmtn\/appliances\/directory\/\">really big collection of images ready to work<\/a>.<\/p>\n<p>And if you want a bit more, you can compile the <a href=\"http:\/\/packages.debian.org\/unstable\/misc\/kqemu-source\">kqemu kernel accelerator<\/a>, which will make QEMU run faster.<\/p>\n<p>Now I can remember the old times when I first installed Debian&#8230;<br \/>\n<a class=\"imagelink\" href=\"http:\/\/blogs.igalia.com\/berto\/files\/2007\/04\/qemu-bo.jpg\" title=\"Debian bo inside QEMU\"><img decoding=\"async\" src=\"http:\/\/blogs.igalia.com\/berto\/files\/2007\/04\/qemu-bo.thumbnail.jpg\" alt=\"Debian bo inside QEMU\" \/><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Some friends have been asking me how to use QEMU. While there are many other virtualization packages (such as Virtual Box, KVM or the non-free VMware Player), QEMU has been around for a while, it&#8217;s already packaged in Debian stable and it&#8217;s really easy to use. Moreover, the (optional) kernel accelerator kqemu has been released [&hellip;]<\/p>\n","protected":false},"author":8,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3,9,10,12],"tags":[],"class_list":["post-45","post","type-post","status-publish","format-standard","hentry","category-english","category-gpul","category-igalia","category-free-software"],"_links":{"self":[{"href":"https:\/\/blogs.igalia.com\/berto\/wp-json\/wp\/v2\/posts\/45","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blogs.igalia.com\/berto\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blogs.igalia.com\/berto\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.igalia.com\/berto\/wp-json\/wp\/v2\/users\/8"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.igalia.com\/berto\/wp-json\/wp\/v2\/comments?post=45"}],"version-history":[{"count":0,"href":"https:\/\/blogs.igalia.com\/berto\/wp-json\/wp\/v2\/posts\/45\/revisions"}],"wp:attachment":[{"href":"https:\/\/blogs.igalia.com\/berto\/wp-json\/wp\/v2\/media?parent=45"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.igalia.com\/berto\/wp-json\/wp\/v2\/categories?post=45"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.igalia.com\/berto\/wp-json\/wp\/v2\/tags?post=45"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}