It is currently Tue Feb 07, 2012 5:32 pm


All times are UTC




Post new topic Reply to topic  [ 8 posts ] 
Author Message
 Post subject: Has anyone got qemu to run on a Mac?
PostPosted: Tue Apr 27, 2010 7:52 pm 
Offline

Joined: Fri Mar 05, 2010 11:33 am
Posts: 509
Location: Australia
I need help to get qemu running on my mac - OSX 10.6 (Snow Leopard)

UPDATE 2010/08/18 I've found a workaround - see my response below - the one posted 18 Aug 2010

* I've downloaded and installed Mac Ports
* I've installed qemu

Code:
$ which qemu
/opt/local/bin/qemu
$ which qemu-img
/opt/local/bin/qemu-img

$ cd /opt/GNS3/qemuwrapper/
$ ls -lh
total 3464
-rwxr-xr-x  1 me  staff   109B 27 Feb 11:20 make-qemuwrapper-exe.py
drwxr-xr-x  8 me  staff   272B 27 Apr 20:27 pemu_public_bin2008-03-04
-rwxr-xr-x  1 me  staff   848K 27 Feb 11:20 pemubin.py
-rwxr-xr-x  1 me  staff   847K 27 Apr 20:27 pemubin.pyc
-rwxr-xr-x  1 me  staff    26K 27 Feb 11:20 qemuwrapper.py


My Preferences show (Note the failed test):
Attachment:
File comment: GNS3 Preferences
Screen shot 2010-04-28 at 05.12.18 AM.png
Screen shot 2010-04-28 at 05.12.18 AM.png [ 96.37 KiB | Viewed 2620 times ]


Yet if I run from the console it seems to start OK:
Code:
$ ./qemuwrapper.py
Qemu Emulator Wrapper (version 0.3)
Copyright (c) 2007-2009 Thomas Pani & Jeremy Grossmann

Qemu TCP control server started (port 10525).


I fist suspected some rights issue, because when I try and use the ellipsis to find the qemu file, the filename is greyed out and can't be selected. However, I have made myself the owner of /opt/local (and applied to enclosed items) and similarly given group everyone Read & Write access to /opt/local and enclosed items. Still the dialogue won't let me select the file:
Attachment:
File comment: Trying to add qemu file
Screen shot 2010-04-28 at 05.36.54 AM.png
Screen shot 2010-04-28 at 05.36.54 AM.png [ 58.1 KiB | Viewed 2207 times ]


Can anyone help?





_________________
RedNectar
http://rednectar.net
@rednectarchris
GNS3 WorkBench-a VMware image of Ubuntu with GNS3 and VPCS installed and a collection of exercises/labs


Last edited by rednectar on Wed Aug 18, 2010 7:54 pm, edited 2 times in total.

Top
 Profile  
 
 Post subject: Re: Has anyone got qemu to run on a Mac?
PostPosted: Wed Jul 07, 2010 1:23 pm 
did you find a solution to this issue because I get the same problem with version 0.7.2 on mac os x 10.6.4.

I can execute qemuwrapper.py manually but not from gns3 ??

many thks


Top
  
 
 Post subject: Re: Has anyone got qemu to run on a Mac?
PostPosted: Tue Jul 13, 2010 12:16 pm 
Offline

Joined: Fri Mar 05, 2010 11:33 am
Posts: 509
Location: Australia
vblondel,

No I haven't been able to get it working yet - I too have tried on 0.7.2 with the same (lack of) success.

_________________
RedNectar
http://rednectar.net
@rednectarchris
GNS3 WorkBench-a VMware image of Ubuntu with GNS3 and VPCS installed and a collection of exercises/labs


Top
 Profile  
 
 Post subject: Re: Has anyone got qemu to run on a Mac?
PostPosted: Tue Jul 27, 2010 9:13 pm 
Offline
Site Admin

Joined: Sat Oct 11, 2008 1:41 pm
Posts: 798
Did you try with the DMG? because there is pemubin.py missing in it.

_________________
Jeremy
GNS3 Staff


Top
 Profile  
 
 Post subject: Re: Has anyone got qemu to run on a Mac?
PostPosted: Sat Jul 31, 2010 7:30 pm 
I added the pemubin.py to the resource directory of the DMG... Does not seem to help. I can command line execute qemu, but the wrapper seems to have issues. If I launch the image first from command line, then the test works and i can begin using it for a single device. The session


Top
  
 
 Post subject: Re: Has anyone got qemu to run on a Mac?
PostPosted: Wed Aug 18, 2010 11:40 am 
Offline

Joined: Fri Mar 05, 2010 11:33 am
Posts: 509
Location: Australia
I've finally found a workaround!

I simply run qmwrapper BEFORE adding a qemu host in GNS3 (thanks for the tip freddiep) - and of course follow the other documented methods in other posts especially the mammoth read at Contribution to create a virtual host for GNS3

So - in full:
1. Download one of the microcore images - linux-microcore-2.10.img works but if you want fancy there are others floating around.

2. Download and install Macports and qemu - I can't remember how I did this it was so long ago but I seem to have qemu version 0.12.3 installed (I'll update if I remember)

3. Setup your GNS3 preferences:
Attachment:
Screen shot 2010-08-18 at 20.12.41 PM.png
Screen shot 2010-08-18 at 20.12.41 PM.png [ 104.74 KiB | Viewed 2661 times ]


Don't worry that the test failed - that's where I got hung up, in my solution this is irrelevant (although it would be nice if it did work)

4. And your settings for the Qemu host
Attachment:
Screen shot 2010-08-18 at 20.22.37 PM.png
Screen shot 2010-08-18 at 20.22.37 PM.png [ 83.71 KiB | Viewed 2572 times ]

As you can see - I have downloaded a few variations of the microcore image - the 2.10 is the smallest and can fit in 64M (although it does kill some process on startup so it can fit)

5. Start qemuwrapper from a terminal session:
Code:
macropidia:qemuwrapper chriswelsh$ ./qemuwrapper.py
Qemu Emulator Wrapper (version 0.3.2)
Copyright (c) 2007-2009 Thomas Pani & Jeremy Grossmann

Qemu TCP control server started (port 10525).


6. Drag a Qemu host onto your palate. You will see a message saying "Qemu is already running on port 10525, it will not be shutdown when you quit GNS3"
don't worry about the message - just click OK

7. Start your host

You will see:
a) some output on your console where you ran qemuwrapper
Code:
Connection from ('127.0.0.1', 60825)
Connection from ('127.0.0.1', 60850)
Shutdown in progress...
Shutdown completed.
Qemu path is now /usr/local/bin/qemu
Qemu-img path is now /usr/local/bin/qemu-img
!! QEMU1.console = 3000
!! QEMU1.netcard = e1000
!! QEMU1.image = /opt/GNS3/LinuxMicrocore/linux-microcore-2.10.img
!! QEMU1.ram = 32
!! QEMU1.options = -no-acpi
    command: ['/usr/local/bin/qemu', '-m', '32', '/opt/GNS3/Project/Working/QEMU1/FLASH', '-hdb', '/opt/GNS3/Project/Working/QEMU1/SWAP', '-net', 'nic,vlan=0,macaddr=00:00:ab:08:85:00,model=e1000', '-net', 'nic,vlan=1,macaddr=00:00:ab:bc:06:01,model=e1000', '-net', 'nic,vlan=2,macaddr=00:00:ab:23:ef:02,model=e1000', '-net', 'nic,vlan=3,macaddr=00:00:ab:96:4f:03,model=e1000', '-net', 'nic,vlan=4,macaddr=00:00:ab:9c:77:04,model=e1000', '-net', 'nic,vlan=5,macaddr=00:00:ab:c7:84:05,model=e1000', '-serial', 'telnet::3000,server,nowait', '-no-acpi']
Warning: vlan 0 is not connected to host network
Warning: vlan 1 is not connected to host network
Warning: vlan 2 is not connected to host network
Warning: vlan 3 is not connected to host network
Warning: vlan 4 is not connected to host network
Warning: vlan 5 is not connected to host network
    pid: 72928
Renicing to 19


and b) a new console window where the qemu host is running
Attachment:
Screen shot 2010-08-18 at 20.38.32 PM.png
Screen shot 2010-08-18 at 20.38.32 PM.png [ 15.29 KiB | Viewed 2198 times ]


8. (Nearly done) Now you can give your qemu host an IP address by entering these commands in the qemu console (a more detailed article is Using Microcore Linux in GNS3)

Method1: Temporary IP address
sudo su
ifconfig eth0 10.0.1.2/24
route add default gw 10.0.1.1


Method2: Permanent IP address
sudo su
vi /opt/bootlocal.sh


This fires up the vi editor - if you don't know how to use it just do this:
Press o (That opens up a line below the first line ready to type the following)
hostname Qemu1
ifconfig eth0 10.0.1.2/24
route add default gw 10.0.1.1

Press <esc>
Press :wq<enter>

IMPORTANT
Now save this for the next reboot with the command:
filetool.sh backup

9. Make sure your project has the "Save nvrams and other disk files" option checked AND you save your project if you want your Qemu host to have an IP address next time

That's it - the image has 6 ethernet interfaces, so you can configure eth1 - 5 the same way presumably.

Notes:
When you quit GNS3, qemuwrapper will still be running - hit CTRL+c to kill it if you like, or just leave it running.
If you leave qemuwrapper running, next time you start GNS3 and load a project that uses qemu, you will get the message saying "Qemu is already running on port 10525, it will not be shutdown when you quit GNS3"

_________________
RedNectar
http://rednectar.net
@rednectarchris
GNS3 WorkBench-a VMware image of Ubuntu with GNS3 and VPCS installed and a collection of exercises/labs


Top
 Profile  
 
 Post subject: Re: Has anyone got qemu to run on a Mac?
PostPosted: Wed Sep 01, 2010 3:18 pm 
I went and just downloaded the source and executed it from there. Once you have done the macports install, the dmg is kind of superfluous. Then you can execute gns3 from the source directory and launch everything just fine. I tried to create my own dmg out of it, and I get the same issues. There's something about the way it packs things that really messes with it.


Top
  
 
 Post subject: Re: Has anyone got qemu to run on a Mac?
PostPosted: Thu Jan 05, 2012 10:47 pm 
Offline

Joined: Thu Jan 05, 2012 10:44 pm
Posts: 1
Folks I really need your help, can you please forward me the files qemu and qemu-img, I´ve tried everything to make a Qemu PC work on GNS3 on my MAC (Lion).

do I need to compile (build) those files from terminal?

Thanks your help is much appreciated.






Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 8 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 0 guests


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