Friday, August 5, 2011

Building QEMU for GNS3 under OSX

I have GNS.74 and wanted to run qemu to put hosts on network simulations.  I found I had to maunally start qemuwrapper with:

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


Which initially worked - I could add qemu hosts (with the 3.4 qemu images from gns3.net), start them, and get a qemu console.  However, I found that once I added a router to the topology, I could not start or restart qemu hosts - a qemu console window would just appear and vanish too quickly to see anything.  GNS3, conveniently, logs little to nothing.  Up to this point, I had installed qemu 0.14.1 via brew, so I uninstalled it.  Then I set out to build qemu with the UDP Multicast patch. I downloaded qemu-0.13, downloaded the udp-multicast patch, and patched the multicast patch file after putting it in the untarred/ungzipped qemu directory:

patch -p1 -i qemu-0.13.0-mcast-udp.patch

Then configged it:

./configure --disable-kvm --enable-cocoa --disable-sdl --target-list=i386-softmmu

then just make, sudo make install (okay I did sudo make -n install to see what make would do first)

I also got an IPv6 qemu image so I could do IPv6.  This is a 4shared.com link, so it may die of old age in future.  As of this post, (Aug 5, 2011) it worked.

That did the trick.  Qemuwrapper still has to be manually started, but now qemu hosts start up right alongside routers in a topology.

No comments:

Post a Comment