It is currently Fri Jul 19, 2019 8:21 am


All times are UTC




Post new topic Reply to topic  [ 19 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: How to install Qemu on MAC OSX 10.6 & 10.7
PostPosted: Tue Feb 14, 2012 1:28 pm 
Offline

Joined: Fri Feb 03, 2012 7:16 pm
Posts: 29
Hi

I have seem to fixed this issues that was reported.

Here is how to install qemu on 10.6

Prerequisites is to have apple xcode installed on your machine please download this from apple https://developer.apple.com/technologies/tools/

There are many instructions around but just follow

http://blog.gns3.net/2009/10/olive-juniper/2/ under Qemu compilation and patching on Mac OS X

when you get to this point and downloaded the macosx.patch

wget http://downloads.sourceforge.net/gns-3/ ... h?download

then do

- go to the qemu-0.11.0 folder and rename the qemu-0.11.0-macosx.patch?download to qemu-0.11.0-macosx.patch then in terminal again

patch -p1 -i qemu-0.11.0-macosx.patch

when you get to this point and downloaded the qemu-0.11.0-olive.patch

wget http://downloads.sourceforge.net/gns-3/ ... h?download

then do

- go to the qemu-0.11.0 folder and rename the qemu-0.11.0-olive.patch?download to qemu-0.11.0-olive.patch then in terminal again

patch -p1 -i qemu-0.11.0-olive.patch

./configure --disable-aio --disable-kvm --disable-kqemu --disable-sdl --target-list=i386-softmmu

make

If you get an issues with compiling and get the following

CC vnc-tls.o
In file included from vnc.h:80,
from vnc-tls.c:27:
vnc-tls.h:31:27: warning: gnutls/gnutls.h: No such file or directory
vnc-tls.h:32:25: warning: gnutls/x509.h: No such file or directory
In file included from vnc.h:80,
from vnc-tls.c:27:
vnc-tls.h:60: error: expected specifier-qualifier-list before ‘gnutls_session_t’
vnc-tls.c:39: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘dh_params’
vnc-tls.c: In function ‘vnc_tls_initialize’:
vnc-tls.c:48: warning: implicit declaration of function ‘gnutls_global_init’
vnc-tls.c:52: warning: implicit declaration of function ‘gnutls_dh_params_init’
vnc-tls.c:52: error: ‘dh_params’ undeclared (first use in this function)
vnc-tls.c:52: error: (Each undeclared identifier is reported only once
vnc-tls.c:52: error: for each function it appears in.)
vnc-tls.c:54: warning: implicit declaration of function ‘gnutls_dh_params_generate2’
vnc-tls.c: At top level:
vnc-tls.c:67: error: expected ‘)’ before ‘transport’
vnc-tls.c:84: error: expected ‘)’ before ‘transport’

then copy the gnutls folder located in opt/local/include/ into the qemu-011.0 folder

make
sudo make install

this should then install qemu when clicking on the test button

Image

as you can see from the picture qemu and qemu-img is set

/usr/local/bin/

now that you have done this you must run qemuwrapper first before you start gns3

Assuming that you have gns3 in your applications folder go to terminal and run the following

python /Applications/GNS3.app/Contents/Resources/qemuwrapper.py

you will see terminal say

Qemu Emulator Wrapper (version 0.8.2)
Copyright (c) 2007-2011 Thomas Pani & Jeremy Grossmann

Qemu path (qemu) is valid
Qemu-img path (qemu-img) is valid
Qemu TCP control server started (port 10525).
Listening on all network interfaces


leave it running

Start gns3

when you place an ASA, Juniper etc image you will get the following warning

Image

just click OK and ignore

I setup a ASA and router just to show connectivity

Image

Hope this helps

10.7 Install

To get 10.7 working this is a little different. I followed the following post

https://sites.google.com/a/ovnetworks.com/index/blog/qemujunosonosx1073

I have to admit alot of this stuff I did not follow. I did the following

Then, download Qemu 0.14.1 from this page : http://download.savannah.gnu.org/releases/qemu/
and patch it with 0.14.1 patches on this link download/file.php?id=859

sudo tar xjf qemu-0.14.1.tar.gz
sudo rm xjf qemu-0.14.1-gns3_patches.tgz

sudo mv qemu-0.14.1_* qemu-0.14.1
cd qemu-0.14.1

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

You have also to copy the "gnutls" folder in your Qemu folder :

/opt/local/include/gnutls

Now, configure Qemu with the following options :

sudo ./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 :

sudo make
sudo make install

After that, you can check that Qemu works and loads a Junos image :

sudo qemu -L . -m 512 -hda junos.img -serial telnet:127.0.0.1:1001,server,nowait,nodelay -localtime


he also mentioned about the JUNOS image which I was unable to get to work. If anyone was able to be a working bios.bin image if you could PM or paste a link to download that would be great :)

Jeremy NOTE

I think it might be a good idea to update the http://blog.gns3.net/2009/10/olive-juniper/2/ and add these extra steps for people that are having issues




Last edited by franco64 on Tue Mar 27, 2012 4:44 pm, edited 11 times in total.

Top
 Profile  
 
 Post subject: Re: Install Qemu on MAC OSX 10.6 & 10.7
PostPosted: Wed Feb 15, 2012 7:37 pm 
Offline

Joined: Wed Feb 15, 2012 7:33 pm
Posts: 2
Hi franco,

I did everything you described in your post, the ASA is working fine but that's only without any connection. If I connect a port to a router it won't startup. Do you know what's going on?

Krgds,
I


Top
 Profile  
 
 Post subject: Re: How to install Qemu on MAC OSX 10.6 & 10.7
PostPosted: Thu Feb 16, 2012 11:29 am 
Offline

Joined: Fri Feb 03, 2012 7:16 pm
Posts: 29
Hi Mylex

I have updated the instructions again and seem to have it working fine with pings. Sorry for the issues but hope this now helps


Top
 Profile  
 
 Post subject: Re: How to install Qemu on MAC OSX 10.6
PostPosted: Fri Feb 17, 2012 10:05 am 
Offline

Joined: Tue Jun 15, 2010 3:19 pm
Posts: 32
Hi Franco,

Thanks for your guide.

I'm hoping you might be able to help me , I'm trying to build qemu on lion but I had to install xcode 4.3 from the appstore and it doesn't seem to come with gcc. Every time I run
./configure --disable-aio --disable-kvm --disable-kqemu --disable-sdl --target-list=i386-softmmu
I get "ERROR: "gcc" either does not exist or does not work" and so can't progress with the rest of the guide.

Is there any way round this? can I use your built qemu for lion?

Any help would be much appreciated.

Rochey


Top
 Profile  
 
 Post subject: Re: How to install Qemu on MAC OSX 10.6
PostPosted: Mon Feb 20, 2012 4:36 am 
Offline

Joined: Thu Dec 15, 2011 8:39 pm
Posts: 14
Hey Franco thanks for the guide. I was able to compile the 2 files and do a test successfully. Problem is every time i try to start a qemu host it crashes with the following report. Just wondering if your or anyone else has seen this problem. Thanks


Process: qemu [7277]
Path: /Users/USER/Documents/*/qemu
Identifier: qemu
Version: ??? (???)
Code Type: X86-64 (Native)
Parent Process: Python [7271]

Date/Time: 2012-02-19 22:32:47.815 -0600
OS Version: Mac OS X 10.7.3 (11D50b)
Report Version: 9

Interval Since Last Report: 1125622 sec
Crashes Since Last Report: 28
Per-App Crashes Since Last Report: 19
Anonymous UUID: BC47A815-3E4B-4996-A3AB-3B06CFB77097

Crashed Thread: 0 Dispatch queue: com.apple.main-thread

Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: KERN_INVALID_ADDRESS at 0x0000000100000028

VM Regions Near 0x100000028:
-->
__TEXT 000000010b965000-000000010bb03000 [ 1656K] r-x/rwx SM=COW /Users/USER/Documents/*

Application Specific Information:
objc[7277]: garbage collection is OFF


Top
 Profile  
 
 Post subject: Re: How to install Qemu on MAC OSX 10.6
PostPosted: Fri Feb 24, 2012 8:47 am 
Offline

Joined: Fri Feb 24, 2012 8:40 am
Posts: 3
hello,
i have some problems trying to install junos on mac os lion 10.7.3
every time i run the command : qemu -m 512 -hda olive-base.img -cdrom 4.11-RELEASE-i386-miniinst.iso -boot d -localtime i get the error : segmentation fault : 11.

can someone please help.
i created the olive base image and store it in qemu-0.11.0 folder.

thanks


Top
 Profile  
 
 Post subject: Re: How to install Qemu on MAC OSX 10.6 & 10.7
PostPosted: Thu Apr 12, 2012 2:21 pm 
Offline

Joined: Tue Apr 10, 2012 6:52 pm
Posts: 6
Hello, following your great guide i've installed successfully qemu and ASA image on my MBA with lion.
Anyway i've an issue with ASA connectivity: when i connect an interface to a router (for example) i'm not able to ping.. what should i check ?

Thank you so much,
N.


Top
 Profile  
 
 Post subject: Re: How to install Qemu on MAC OSX 10.6 & 10.7
PostPosted: Wed Jul 04, 2012 1:00 pm 
Offline

Joined: Wed Jul 04, 2012 12:47 pm
Posts: 1
Hi,

tried to apply your procedure to install Qemu on MAC OSX 10.6.8.

python /Applications/GNS3.app/Contents/Resources/qemuwrapper.py
Qemu Emulator Wrapper (version 0.8.2)
Copyright (c) 2007-2011 Thomas Pani & Jeremy Grossmann

Unable to start Qemu: [Errno 2] No such file or directory
Path to Qemu seems to be invalid, please check. Current path is qemu

I attached the termial output.

Can someone help me with this.

Thanks
MG


Attachments:
terminal output.pdf [63.9 KiB]
Downloaded 274 times
Top
 Profile  
 
 Post subject: Re: How to install Qemu on MAC OSX 10.6
PostPosted: Thu Jul 26, 2012 8:55 am 
Offline

Joined: Thu Jul 26, 2012 8:49 am
Posts: 1
DallasRican wrote:
Hey Franco thanks for the guide. I was able to compile the 2 files and do a test successfully. Problem is every time i try to start a qemu host it crashes with the following report. Just wondering if your or anyone else has seen this problem. Thanks


Process: qemu [7277]
Path: /Users/USER/Documents/*/qemu
Identifier: qemu
Version: ??? (???)
Code Type: X86-64 (Native)
Parent Process: Python [7271]

Date/Time: 2012-02-19 22:32:47.815 -0600
OS Version: Mac OS X 10.7.3 (11D50b)
Report Version: 9

Interval Since Last Report: 1125622 sec
Crashes Since Last Report: 28
Per-App Crashes Since Last Report: 19
Anonymous UUID: BC47A815-3E4B-4996-A3AB-3B06CFB77097

Crashed Thread: 0 Dispatch queue: com.apple.main-thread

Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: KERN_INVALID_ADDRESS at 0x0000000100000028

VM Regions Near 0x100000028:
-->
__TEXT 000000010b965000-000000010bb03000 [ 1656K] r-x/rwx SM=COW /Users/USER/Documents/*

Application Specific Information:
objc[7277]: garbage collection is OFF


Hello, I am having exactly the same problem under 10.7.3 . I tried with qemu 0.11 and now 0.14. Both gave me the error above. I replaced the Freebsd iso, but that did not make any difference either.
Everything else went just fine. (configure/make/install). Also testing the qemuwrapper in GSN3 gave me the ok.
I know this post is from a while back so I was wondering if there has been a solution found in the mean while because I am unable to build an img because of this problem.
Thanks.


Top
 Profile  
 
 Post subject: Re: How to install Qemu on MAC OSX 10.6 & 10.7
PostPosted: Thu Jul 26, 2012 11:46 pm 
Offline

Joined: Thu Jul 26, 2012 11:19 pm
Posts: 143
Location: U.K.
I have built and installed the latest QEMU 1.1.1 on OSX from the sources. This version has UDP tunnelling built in so no patching required. AFACS the command syntax for -net,nic is different to the earlier patched version which is called from qemuwrapper.py - I'm referencing Brezular's article at http://brezular.wordpress.com/2011/04/02/gns3-qemu-troubleshooting/ so this may have changed?

QEMU 1.1.1 compiles cleanly on OSX 10.6.8 - http://rubenerd.com/qemu-1-macosx/ was a useful pointer. I just built everything.
Code:
macbookpro:~ nickb$ uname -a
Darwin NBmacbookpro 10.8.0 Darwin Kernel Version 10.8.0: Tue Jun  7 16:33:36 PDT 2011; \
root:xnu-1504.15.3~1/RELEASE_I386 i386
macbookpro:~ nickb$ gcc --version
i686-apple-darwin10-gcc-4.2.1 (GCC) 4.2.1 (Apple Inc. build 5666) (dot 3)
Copyright (C) 2007 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.



cd /usr/local/src
tar jxvf qemu-1.1.1-1.tar.bz2
sudo -s

# cd /usr/local/src/qemu-1.1.1-1
# ./configure \
--enable-cocoa
--target-list=i386-softmmu,alpha-softmmu \
--audio-drv-list=coreaudio \
--audio-card-list=ac97,adlib,sb16 \
--disable-vnc

# make
# make install
# make clean distclean


QEMU can be found at /usr/local/bin/qemu-system-i386 and /usr/local/bin/qemu-system-x86_64.

I loaded up a Microcore appliance in QEMU. I've configured a startup script so it's easier to read the command line switches:
Code:
qemu-system-x86_64  \
-cpu pentium2 \
-m 128 \
-net nic,vlan=0,macaddr=00:aa:00:18:6c:00,model=e1000 \
-net socket,vlan=0,udp=127.0.0.1:30002,localaddr=127.0.0.1:20002 \
-serial telnet::4444,server \
-nographic \
-daemonize \
-hda linux-microcore-3.8.2.img

This is saved as microcore.sh and started by $sh microcore.sh

The corresponding connection in the .net file is
Code:
NIO_udp:30002:127.0.0.1:20002

connect this to a router ethernet interface or switch port.

I must confess at this point I'm not using GNS3, I'm using Dynagen/Dynamips and creating my .net files by hand.



_________________
GNS3 0.8.4 running on Windows 8.1
GNS3 0.8.4 running on CentOS 6.5


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 19 posts ]  Go to page 1, 2  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