How to Emulate a Raspberry Pi on Your PC

Christian Cawley 09-12-2015

Fancy a $30 computer but not sure you want to take the risk? You’re not a cheapskate, you’re just being wise. And getting a good preview look at what you’re going to buy is pretty simple. Rather than buy a Raspberry Pi and be disappointed, why not try the QEMU emulator to get a feel for it first?


What Is QEMU?

You’ve probably heard of emulation. It essentially enables us to run software on systems where it would otherwise be incompatible. Windows itself has emulation built in, in the form of compatibility mode.


Virtual machines are the default option these days for anyone wanting to try out a new operating system without upsetting their delicate digital life. VMware and VirtualBox are often recommended to anyone wanting to try Linux for the first time (our VirtualBox guide How to Use VirtualBox: User's Guide With VirtualBox you can easily install and test multiple operating systems. We'll show you how to set up Windows 10 and Ubuntu Linux as a virtual machine. Read More is particularly useful), for instance, or with a desire to access an older version of Windows. It’s even possible to run some older versions of Mac OS X in a virtual machine.

What virtual machines like VMware Player Run Multiple Operating Systems At Once With VMware Player We’ve lavished attention on VirtualBox here at MakeUseOf, and for good reason. However, VirtualBox isn’t your only option for creating and using free virtual machines. VMware Player, VMware’s free product, is every bit as good... Read More and VirtualBox have in common is that they create a virtualized hardware environment based on the 32-bit and 64-bit architecture What Is 64-bit Computing? The packaging of a computer or computer hardware is crowded with technical terms and badges. One of the more prominent ones is 64-bit. Read More . While this makes them ideal for other forms of OS emulation/virtualization, it means that any operating system that runs on ARM chipsets cannot be installed and tested.

This is where QEMU comes in. Because Quick EMUlator emulates ARM chipsets – such as that found in the Raspberry Pi – we can use it to create a virtualized Pi on our PC.


Manual Setup vs Packaged

We have a couple of options open to us if we want to use QEMU. The first is by far away the easiest, and requires us to download this single QEMU package, which features everything we need to launch Raspbian in Windows.

If you fancy getting your fingers dirty, however, and have no qualms about digging out older versions of Raspbian (as you probably know, the latest version of Raspbian is Jessie 5 Ways New Raspbian Jessie Makes Raspberry Pi Even Easier to Use Following the release of Debian Jessie in July, the Raspberry Pi community has been blessed with a new release of the Raspbian variant, based on the "parent" distro. Read More ), you might take a look at this guide, which shows you how to configure QEMU manually for emulation of Raspbian Wheezy (this solution also requires the ARM build of the Linux kernel). Note that this is a long, drawn out, error-prone method, and features several changes to configuration files. If this is your cup of tea, carry on!

Using the QEMU Raspbian Package

For simplicity’s sake, we’re going to use the QEMU Raspbian package from Sourceforge, which you will find at Once downloaded, unzip to your HDD – perhaps to C:/QEMU – and open. Inside the qemu subfolder, you’ll find three files.

Double-click run.bat to get started. A virtualized Raspberry Pi will appear, with Raspbian Wheezy booting up. This may take a while to complete, but should go pretty much as illustrated in this video.


Once complete, Raspbian will boot straight into raspi-config Optimize The Power Of Your Raspberry Pi With Raspbian As befits a man with too much tech on his hands, I’ve been playing with my Raspberry Pi recently, configuring the device so that it works to its fullest potential. It continues to run as... Read More , a configuration tool for the Raspberry Pi. It isn’t advisable to go over the top with the options on offer here, as this can lead to stability problems. In particular, avoid using the update option or using any of the usual Raspberry Pi update or upgrade instructions where possible.

Note that this configuration tool can be relaunched at any point from a command prompt using

sudo raspi-config

When you’re done, use the arrow keys to select Finish, then tap Enter. From here, you’ll be sent to the command line, where you can either try out some basic Linux commands (try ls to list the items in the current directory, for instance) or enter startx to launch the GUI.



Now you’re in control of the Raspbian desktop interface, where you’ll be able to gain familiarity with the various tools that come packaged with the Pi’s favored operating system, such as the basic building-block development tool for children, Scratch.

It’s time to have a play!

Emulation vs Buying a Raspberry Pi

Raspberry Pi’s are extremely affordable, so why would anyone want to spend their time using an emulator?

Well, several reasons spring to mind. First, using QEMU to run a virtualized Raspberry Pi environment lets you try out Raspbian without all of the messing around that is involved with writing a disk image to SD How to Install an Operating System on a Raspberry Pi Here's how to install an OS on your Raspberry Pi and how to clone your perfect setup for quick disaster recovery. Read More . While NOOBs is a better approach How NOOBS For Raspberry Pi Can Help First Time Users There is something about the Raspberry Pi that might just put people off: until now, setting it up has not been particularly user friendly. NOOBS aims to change that! Read More , neither is a fast setup, so virtualization gives anyone wanting to dip a toe in the pie, as it were, a quick chance to do so.



Second, a virtual Raspberry Pi offers the chance to gauge how the various apps will run, as well as enable debugging and troubleshooting on your standard PC. This might be useful to children using Scratch or other development tools. Making screenshots on the Raspberry Pi is simple enough, but exporting them can be tricky – virtualization circumvents that. It’s also good practice to test a new operating system in a virtualized environment Testing A New Operating System? Stay Secure With A Virtual Machine Read More .

Finally, why do we do anything on a computer? Raspberry Pi fans love to play, and tinker, and this is just another way of looking at things. It may not feature a physical computer, but it can be a time saver, and a bit of a game changer in some scenarios. If you’re a Raspberry Pi owner, it’s certainly worth having access to QEMU – you never know when you might need a virtual Raspberry Pi running.

Have you tried a virtualized Raspberry Pi with QEMU? Did you run into any trouble with it? Tell us in the comments.

Related topics: Linux, Raspberry Pi, Virtualization.

Affiliate Disclosure: By buying the products we recommend, you help keep the site alive. Read more.

Whatsapp Pinterest

Leave a Reply

Your email address will not be published. Required fields are marked *

  1. ameya joshi
    June 7, 2018 at 8:12 am

    how to deal with GPIO pins while emulating on virtual box

  2. Jim Barfield
    March 3, 2018 at 9:31 pm

    This tutorial worked 100%. Took about 2 hrs. to download and setup.
    I have a Pi3 with the 7" screen and it is great - but I like using the QEMU setup for easy testing, and then I can feel confident changes to the actual Pi will work.
    This tutorial was a real time saver- Thanks!
    ps/ It boots faster in QEMU on my laptop than it does in real life.
    Also wifi works instantly- which on the real device you have to have an ethernet cable to download drivers before wifi will work.
    NOTE: You cannot transfer your setup from QEMU to a Pi SD card very easily - QEMU is for testing only before making changes to a production Pi (IMHO)
    Thanks Again MUD!!!! Love you guys and gals :)

    • Anusnymous
      February 14, 2019 at 2:40 am

      I have to admit that I agree with your cock sucking comment

  3. Tj
    March 21, 2017 at 7:07 am

    Can QEMU work on an android?
    And can we do some programming on this virtual raspberry pi in QEMU?
    In fact i wanted to see if i can make out a device with my own specifications on a raspberry pi. Will i be able to test it out on this?
    Please suggest me.
    Thanks in advance.

    • Christian Cawley
      March 21, 2017 at 10:02 am

      This might be the place to look:

      I cannot vouch for its support, however, only that it exists...

    • Kobus
      October 19, 2017 at 2:28 pm

      To be honest, if you use this emulator to evaluate the performance and acceptance of the RPi before you buy .... sad to say, but it is an extremely limiting experience that will put many people off. I used my i7 laptop with 16GB RAM and 2 TB disk to try the emulator out for a school. With only 1 x CPU simulated running at 100% just looking for files for an extended period than a minute from within Squeak just to discover not all files were installed... Rather ask one of your friends with a RPI to demonstrate it to you to help you make up your mind. I will demo this to the Schoolmaster and Science teacher before they start loading the emulator on their laptops, as this is an emulation of the very first RPi A - the RPi 3B running the Debian Stretch version outperforms the emulator by far.
      Good concept though .... not a good experience ...

  4. George
    November 25, 2016 at 6:50 am

    Is there any way to simulate peripherals and GPIO access in the virtualized raspberry pi with QEMU?
    Or do I have to program virtual peripherals on my own? I'm not afraid to do it, it's just a bit time-consuming and I have a hard deadline fast approaching.
    Along those lines, does anyone know the hexadecimal, ( e.g.: "0x800040a2" ) volatile addresses for the peripherals like the UART, I2C, etc. on Raspberry Pi?
    Also, I love that the g++ compiler made its way into Raspberry Pi. Made me a very happy programmer! Had to download VIM though.

  5. Patricio
    October 28, 2016 at 11:26 pm

    This is just awesome! Thanks for putting this together.

  6. Vivek
    October 27, 2016 at 12:43 pm

    Why inside QEMU, my mouse pointer is not controllable, even after adjusting the speed and sensitivity...!

    • George
      November 25, 2016 at 6:53 am

      Try pressing "ctrl" and "alt" simultaneously. If you are running QEMU in the command line, it will not give you a pointer for the mouse. It's one of those Linux things, but if you want to get used to it, you'll find learning to navigate a computer using command lines is superior.

  7. Yomi
    July 30, 2016 at 8:38 am

    Hello, I need your help. I am not a programmer, so I'm not familiar with all the programming terms. I have an application ( more like compressed files) that is supposed to run on the Raspberry Pi only. I would like to check out the application on Qemu before I make orders for the Raspberry Pi. The instruction from the programmer is to extract the files on an sdk, insert into the Raspberry Pi and start it up. The game will install and run on its own. I have installed qemu and it works well, but I don't seem to be able to figure out how to start the application on qemu as I have extracted the files on a USB that is connected to my PC. Please help

    • Christian Cawley
      July 31, 2016 at 6:44 pm

      You can buy a Raspberry Pi for as little as $5.

      QEMU doesn't currently accept virtualised physical storage from your host PC.

      • Yomi
        July 31, 2016 at 8:12 pm

        Thank you for your response. Please, can you tell me where I can get the device online. For the price you stated or that range. I'm in Nigeria and this device is not available here. Hence, I'll have to make an order online. Thanks

      • Phil
        August 4, 2016 at 10:51 pm

        Sure it can, if you are running Linux, qemu will happily accept /dev/sda* or /dev/mmcblk0* or /dev/cdrom* or even /dev/loop* as a device. Of course using an already mounted drive is a bad idea, and you will need to be root probably, but it works fine.

        • Christian Cawley
          August 5, 2016 at 8:14 am

          I stand corrected! Not sure it's that simple in Windows?

      • Bobby Kozak
        January 15, 2017 at 9:09 pm

        Where have you seen a Pi for that cheap?
        Even the 'knock-off' Oranges are x4 that.

        • Christian Cawley
          January 16, 2017 at 1:02 pm

          Specifically, the Raspberry Pi Zero:

          Mine was free on a magazine. So where? A newsagents :)

        • Kobus
          October 19, 2017 at 2:30 pm

          Just ensure you get the Zero with wireless else it will put you back some more.

  8. Nirav
    July 29, 2016 at 7:23 am

    Hi, can i emulate raspbian using vm virtual box ? i dont want to download QEMU

    • Christian Cawley
      July 29, 2016 at 7:37 am

      At present no, as VirtualBox doesn't emulate ARM architectures. This is why we use QEMU.

      • Nirav Patel
        July 29, 2016 at 7:40 am

        Thanks, will try it using QEMU.

  9. Asher Caswell
    July 3, 2016 at 4:07 pm

    Is it possible to access the files from the Pi through windows? If not then how do I transfer files between the VM and my normal computer? Thanks

    • markh
      July 26, 2016 at 5:56 pm

      openssh-server on the PI and filezilla on your pc

  10. Derry
    June 12, 2016 at 9:27 am

    In Qemu emulator can install LAMPP Web Server and WordPress ?
    I need for learn.

  11. Abbyy
    June 7, 2016 at 3:23 am

    Can anyone give the link for QEMU Raspbian package download?
    The file is corrupted, can't extract it.

    • Christian Cawley
      June 7, 2016 at 1:11 pm

      Just tried downloading it, no problem extracting. Probably server issues or a bandwidth problem perhaps?

      • Anonymous
        June 7, 2016 at 1:37 pm

        Okay, will try again. Thanks Christian!

        • Christian Cawley
          June 7, 2016 at 2:50 pm

          Happy to help!

  12. Luis Eehs
    May 16, 2016 at 10:35 pm

    hello someone can tell me what is the password?

    • Christian Cawley
      May 17, 2016 at 6:38 am

      It should be the standard pi/raspberry usernamepasssword combination, as per the Raspberry Pi image download page.

  13. NotArobotDudes
    May 3, 2016 at 10:00 am

    Why is the comments so messed up? :P

    • Christian Cawley
      May 3, 2016 at 11:50 am

      In what way?

  14. Leon H
    April 20, 2016 at 7:07 am

    Any idea how I can install Mono on this? Can you point me what Mono build will work on this? Are Xamarin builds work?

  15. julian
    January 18, 2016 at 7:21 pm

    hello friend, thanks in advance for this.

    ive been having a little issue with the keys when trying to write a code, i cant find the proper keys to write symbols like

    : / =, i try to write them but the idle shows me another characters, i tried to configure it in the idle settingsl, i switched it to IDE classic windows but i still have the same problem

    any suggestions?

    • JavierBC
      May 14, 2016 at 12:04 pm

      It seems that the keyboard layout is misconfigured. Using the console you can change it typing "sudo raspi-config" and then go into "Internationalisation options".
      You can change it in the GUI (usually LXDE) but I haven't used it so much so I don't remember the exact steps.

  16. Anonymous
    December 9, 2015 at 10:26 pm

    The comments at SourceForge indicate that should work. The bigger problem I now see is that there is no way to connect it to anything on the PC. You just get a deaf, dumb and blind RPi installation except for internet connectivity. While that can be useful for establishing an initial environment it's not very useful for any kind of development. There should be a way to connect to the PC USB and sound system. alsa starts but there's no way to map the gozintas and gozoutas.

    I got it started and taken to the Raspi-config screen. Hint: to get off that screen arrow up to the top entry and arrow right to get to the bottom selections.

    Seems to be working fine with the GUI. I can't find anything like a package manager to obtain applications, however.

    And I can find no place to enter a URL in the midori browser.

    • Anonymous
      December 9, 2015 at 10:29 pm

      This comment system is screwed up. My last comment was supposed to be in response to Christian and "this" means writing the .img file containing the system as you may have customized it to a SD card suitable for booting a real Pi.

  17. Anonymous
    December 9, 2015 at 7:36 pm

    This didn't work me the bat file launches for a second and then auto closes tried running as admin but still the same.

    • Christian Cawley
      December 9, 2015 at 8:03 pm

      What version of Windows are you using?

    • Anonymous
      March 26, 2016 at 2:49 am

      Make sure you run the right .bat file because there are two of them, one of them will not work... use the one inside the qemu folder ?

    • Patricio
      October 28, 2016 at 11:29 pm

      It happened to me as well. I executed the run.bat inside the qemu folder, not the one that's on the root folder of the extracted file. Then you can edit the one on the root folder to point to the one inside the qemu directory.

  18. Anonymous
    December 9, 2015 at 7:31 pm

    With this can you export what you have created/modified such that it can be written to an SD card to boot on the Raspberry PI so that it has the same config and installed packages as the emulated system?

    • Christian Cawley
      December 9, 2015 at 8:05 pm

      I'm not sure this is possible, sadly. However, the .img file is in the qemu subfolder, so you could try it out...