It is currently Thu Nov 15, 2018 8:33 am


All times are UTC




Post new topic Reply to topic  [ 51 posts ]  Go to page 1, 2, 3, 4, 5, 6  Next
Author Message
 Post subject: Installing qemu on 10.8 mountain lion
PostPosted: Sun Nov 11, 2012 12:05 am 
Offline

Joined: Fri Feb 03, 2012 7:16 pm
Posts: 29
Here is a video of me installing the software
http://www.youtube.com/watch?v=ffNWERMUwys&feature=plcp

PROCEDURE BELOW


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)

http://mxcl.github.com/homebrew/

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

ruby -e "$(curl -fsSkL raw.github.com/mxcl/homebrew/go)"

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

https://github.com/downloads/kennethrei ... 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


ftp://ftp.gmplib.org/pub/gmp-5.0.5/gmp-5.0.5.tar.bz2
http://www.mpfr.org/mpfr-current/mpfr-3.1.1.tar.bz2
http://www.multiprecision.org/mpc/downl ... 0.1.tar.gz
http://ftp.heanet.ie/mirrors/gnu/binuti ... .23.tar.gz
http://ftp.heanet.ie/mirrors/gnu/gcc/gc ... .3.tar.bz2
http://ftp.heanet.ie/mirrors/gnu/gcc/gc ... 6.3.tar.gz
http://ftp.heanet.ie/mirrors/gnu/gdb/gdb-7.5.tar.bz2

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
make install
make check
cd ..

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

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


tar xjf binutils-2.23.tar
cd binutils-2.23
./configure --prefix=/usr/local --target=i386-jos-elf --disable-werror
make
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 : http://download.savannah.gnu.org/releases/qemu/

http://download.savannah.gnu.org/releas ... 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
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

http://www.youtube.com/watch?v=IYNxUtEPPZg




Last edited by franco64 on Thu Nov 22, 2012 8:24 pm, edited 10 times in total.

Top
 Profile  
 
 Post subject: Re: running qemu on 10.8 mountain lion
PostPosted: Sun Nov 11, 2012 2:14 am 
Offline
Site Admin

Joined: Sat Oct 11, 2008 1:41 pm
Posts: 2668
Location: Canada
Great news :) Is it stable?

Looking forward for your howto.

Cheers,

_________________
Jeremy, GNS3 Programmer & Benevolent Dictator for Life.


Top
 Profile  
 
 Post subject: Re: running qemu on 10.8 mountain lion
PostPosted: Sun Nov 11, 2012 10:31 am 
Offline

Joined: Fri Feb 03, 2012 7:16 pm
Posts: 29
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.

Image


Top
 Profile  
 
 Post subject: Re: Installing qemu on 10.8 mountain lion
PostPosted: Mon Nov 12, 2012 8:53 pm 
Offline

Joined: Mon Oct 15, 2012 3:35 pm
Posts: 7
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 qemuwrapper.py before starting GNS3?

Thanks!


Top
 Profile  
 
 Post subject: Re: Installing qemu on 10.8 mountain lion
PostPosted: Mon Nov 12, 2012 9:36 pm 
Offline

Joined: Fri Feb 03, 2012 7:16 pm
Posts: 29
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


Top
 Profile  
 
 Post subject: Re: Installing qemu on 10.8 mountain lion
PostPosted: Mon Nov 12, 2012 9:50 pm 
Offline

Joined: Mon Oct 15, 2012 3:35 pm
Posts: 7
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 127.0.0.1:10561: 209-unable to start instance 'ASA1'

Thanks!


Top
 Profile  
 
 Post subject: Re: Installing qemu on 10.8 mountain lion
PostPosted: Sat Nov 17, 2012 2:04 am 
Offline

Joined: Fri Feb 03, 2012 7:16 pm
Posts: 29
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.


Top
 Profile  
 
 Post subject: Re: Installing qemu on 10.8 mountain lion
PostPosted: Mon Nov 19, 2012 6:23 pm 
Offline

Joined: Mon Oct 15, 2012 3:35 pm
Posts: 7
Well...I can't seem to get it to work in GNS3. Your directions worked fine. I already had Macports installed with all the software...in 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"

Thanks.


Top
 Profile  
 
 Post subject: Re: Installing qemu on 10.8 mountain lion
PostPosted: Mon Nov 19, 2012 9:57 pm 
Offline

Joined: Fri Feb 03, 2012 7:16 pm
Posts: 29
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.

Image

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.

Image


Top
 Profile  
 
 Post subject: Re: Installing qemu on 10.8 mountain lion
PostPosted: Wed Nov 21, 2012 4:27 pm 
Offline

Joined: Mon Oct 15, 2012 3:35 pm
Posts: 7
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 qemuwrapper.py, 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.




Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 51 posts ]  Go to page 1, 2, 3, 4, 5, 6  Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group

phpBB SEO