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 GNS3So - 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 [ 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 [ 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 [ 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.shThis 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.1Press
<esc>Press
:wq<enter> IMPORTANTNow save this for the next reboot with the command:
filetool.sh backup9. 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"