Installing qemu on 10.8 mountain lion
Page 1 of 6

Author:  franco64 [ Sun Nov 11, 2012 12:05 am ]
Post subject:  Installing qemu on 10.8 mountain lion

Here is a video of me installing the software


right here is the write up for what I did to get this to work

Install Xcode from app store (when writing this i was using 4.5.2).

-- If you do not have an itunes account create one and then click on the app store and search for Xcode.

Once you have downloaded and installed Xcode you will need to install the command tools.

-- To install the command tools

So run Xcode and and then go to xcode/preferences/downloads/

and click on install for command line tools. Once installed quit Xcode

-- Now install Homebrew

Then install Homebrew (which is much better than macports)

go to the terminal (located in Applications/Utilities/Terminal) and paste

ruby -e "$(curl -fsSkL"

once you get the following in terminal do what they have mentioned to do brew doctor

and you should then see

Your system is raring to brew.

Then I installed GCC for mac ... 0.7-v2.pkg

Now I must point out that I have issues when i have installed the GCC-10.7-v2.pkg file where the command line tools needed to be installed again. If you open xCode again and make sure that command line tools is actually installed otherwise you will have issues later.

Once you have done this then we are ready to download the files for Qemu

Create a folder on the desktop (PLEASE NOTE do not put spaces for a folder name just name a folder like qemu etc on the desktop) and download the following and place the files into that folder ... 0.1.tar.gz ... .23.tar.gz ... .3.tar.bz2 ... 6.3.tar.gz

now in terminal browse to the folder you created with all these files

e.g cd /Users/franco/Desktop/qemu

and now do the following below in terminal

tar xjf gmp-5.0.5.tar.bz2
cd gmp-5.0.5
./configure --prefix=/usr/local/
make install
make check
cd ..

tar xjf mpfr-3.1.1.tar.bz2
cd mpfr-3.1.1
./configure --prefix=/usr/local/
make install
cd ..

tar xjf mpc-1.0.1.tar
cd mpc-1.0.1
./configure --prefix=/usr/local/
make install
cd ..

tar xjf binutils-2.23.tar
cd binutils-2.23
./configure --prefix=/usr/local --target=i386-jos-elf --disable-werror
make install
cd ..

Now if you type "i386-jos-elf-objdump -i" (without quotes) in terminal you should get and output

# Should produce output like:
# BFD header file version (GNU Binutils) 2.23
# elf32-i386
# (header little endian, data little endian)
# i386...

tar xzf gcc-core-4.6.3.tar
tar xjf gcc-g++-4.6.3.tar.bz2
cd gcc-4.6.3
mkdir build # GCC will not compile correctly unless you build in a separate directory
cd build

../configure --prefix=/usr/local --target=i386-jos-elf --disable-werror --disable-libssp --disable-libmudflap --with-newlib --without-headers --enable-languages=c,c++ CC=/usr/bin/gcc-4.2 CPP=/usr/bin/cpp-4.2 CXX=/usr/bin/g++-4.2 LD=/usr/bin/gcc-4.2

make all-gcc # This will take some time
make install-gcc
make all-target-libgcc
make install-target-libgcc
cd ../..

Now if you type "i386-jos-elf-gcc -v" (without quotes) in terminal you should get and output

# Should produce output like:
# Using built-in specs.
# COLLECT_GCC=i386-jos-elf-gcc
# COLLECT_LTO_WRAPPER=/usr/local/libexec/gcc/i386-jos-elf/4.6.3/lto-wrapper
# Target: i386-jos-elf

tar xjf gdb-7.5.tar.bz2
cd gdb-7.5
./configure --prefix=/usr/local --target=i386-jos-elf --program-prefix=i386-jos-elf- --disable-werror
make all # This will take some time
make install
cd ..

-- Now you will need to install qemu from brew

brew install qemu

Now as we have installed gmp before it will give an error put the following into terminal

brew link --overwrite gmp

brew install qemu

Now download Qemu 0.14.1 from this page : ... 4.1.tar.gz

and patch it with 0.14.1 patches on this link download/file.php?id=859

Place these two folders where you wish but I will put them in the same place as the other files

Open terminal and goto that location

tar xzf qemu-0.14.1.tar
mv qemu-0.14.1-gns3_patches.tar qemu-0.14.1
cd qemu-0.14.1
tar xjf qemu-0.14.1-gns3_patches.tar

--now put each indivdual patch command into terminal (one at a time not all at the same time)

patch -p1 -i qemu-0.14.1_hw_e1000_c.patch
patch -p1 -i qemu-0.14.1_block_raw-win32_c.patch
patch -p1 -i qemu-0.14.1_Makefile_objs.patch
patch -p1 -i qemu-0.14.1_net_c.patch
patch -p1 -i qemu-0.14.1_net_h.patch
patch -p1 -i qemu-0.14.1_net_udp_c.patch
patch -p1 -i qemu-0.14.1_net_udp_h.patch

- Now configure Qemu with the following

./configure --prefix=/usr/local --disable-sdl --enable-cocoa --disable-docs --target-list="i386-softmmu x86_64-softmmu" --cc=/usr/bin/gcc-4.2 --host-cc=/usr/bin/gcc-4.2

Compile and Install :

make install

Now Qemu is now built in /usr/local/bin/

Open gns3 program / preferences/ qemu / and put the following

Path to qemu: /usr/local/bin/qemu-system-x86_64
Path to qemu-img: /usr/local/bin/qemu-img

Hope this helps

Also a video of me using qemu in 10.8 gns3

Author:  grossmj [ Sun Nov 11, 2012 2:14 am ]
Post subject:  Re: running qemu on 10.8 mountain lion

Great news :) Is it stable?

Looking forward for your howto.


Author:  franco64 [ Sun Nov 11, 2012 10:31 am ]
Post subject:  Re: running qemu on 10.8 mountain lion

It seems to be very stable. There is an issue where you will start each ASA or Junos one at a time but still very stable.

here is another screen shot where I have a Junos running "I prefer running juniper via virtual box anyway" sooo much quicker on boot up but this was the case on all qemu versions in 10.6/10.7 but it still runs.


Author:  bigdawg [ Mon Nov 12, 2012 8:53 pm ]
Post subject:  Re: Installing qemu on 10.8 mountain lion

Hello franco,

I added your qemu files to my GNS3 and I get "Failed to start qemu" when I click on the Test Settings.

Any idea?

So, we don't need to start the python script before starting GNS3?


Author:  franco64 [ Mon Nov 12, 2012 9:36 pm ]
Post subject:  Re: Installing qemu on 10.8 mountain lion

Sorry but this does annoy me when people do not read the whole post

You will see when i click on the test button it will fail. Do not worry about this

I even shown a picture of this

Author:  bigdawg [ Mon Nov 12, 2012 9:50 pm ]
Post subject:  Re: Installing qemu on 10.8 mountain lion

Quick Update...ok I didn't copy the files to the Images was the problem. So, now I have it exactly the same way you do...but when I try to start my ASA like you do in the video with a right mouse click, nothing happens. If I click on the Green start icon I'll get the error, "Issues have been detected...." ASA1: error from server 209-unable to start instance 'ASA1'


Author:  franco64 [ Sat Nov 17, 2012 2:04 am ]
Post subject:  Re: Installing qemu on 10.8 mountain lion

Hey guys just want some feedback if people are following the instructions clearly and ok and is working on there machines.

I hope to do a video and post on youtube with the install process.

Author:  bigdawg [ Mon Nov 19, 2012 6:23 pm ]
Post subject:  Re: Installing qemu on 10.8 mountain lion

Well...I can't seem to get it to work in GNS3. Your directions worked fine. I already had Macports installed with all the fact, previously, I had used Macports to also install the latest version of qemu. But, I compiled a new qemu .14 plus the patches...all your commands worked and the GNS3 in preferences test also passes.

But when I try to start GNS3 it fails. I start it by first, launching qemuwrapper (qemu path pointing to /usr/local/bin/qemu). Start ASA and I get "Qemu has exited with return code -11"


Author:  franco64 [ Mon Nov 19, 2012 9:57 pm ]
Post subject:  Re: Installing qemu on 10.8 mountain lion

Can i suggest one thing. Do you have vmware fusion and if yes create a virtual machine of 10.8 clean install and do my process and see if it works.

my concern is macports is a mess when they install files and the beauty with homebrew is that contains the files into a specific location Celluar folder in /usr/local/

I did this on a complete clean machine nothing external installed (no macports installed) and worked fine on two machines here and also different spec machines as well. I think it might be best to do a video of the complete install but what i have done does work.

Could i have anyone confirm this

When i start qemu I do get and error saying that they qemu is not configured correctly but that does not concern me. You mentioned that it was configured correctly on your version.


which might lead me to think that the qemu you are using is the wrong one and you mention that you have had this installed before.


Author:  bigdawg [ Wed Nov 21, 2012 4:27 pm ]
Post subject:  Re: Installing qemu on 10.8 mountain lion

Hi Franco,

I am using the qemu 0.14.1 plus patches like you. Downloaded them from your links. Yes, I get exactly the same message when doing the Test as you have in your screenshot. So, let's break this down:

1.) First, we need to open up Terminal and lauch, correct?
2.) Then we launch GNS3
3.) Then we add an ASA to the map.
4.) Then we start ASA, correct?

It is here, at step 4, when I start the ASA I get the error.

I can try hombrew...I haven't yet.

Page 1 of 6 All times are UTC
Powered by phpBB® Forum Software © phpBB Group