Add Qemu Host in GNS3.



By: Jaakko Rautanen      

Version history of this document:
v1.1 Added instructions for console connection
v1.0 Published


Qemu image of Microcore Linux 2.10, is small linux image ready to be used in GNS3 and which includes ssh, iptables, iproute, tcpdump and IPv6 support. It is quite well integrated and doesn't require much tuning.


Download Microcore Linux Qemu image

Microcore Linux 2.10 image can be downloaded separately from GNS3 web site.

Setup image for Qemu host

  • Go to Edit | Preferences | Qemu | Qemu Host
  • Setup new image with following properties
    Identifier: MicrocoreBinary image: local path to linux-microcore-2.10.imgMemory: 64 MBNIC: e1000Qemu options: -no-acpi
  • Press Save and just added image will appear into Qemu Host images list

Create topology and drop Qemu host on workspace

Here is the topology used in this tutorial. One directly connected subnet between host and router and one "remote" network in the Lo0 interface of R1 so that default route can be verified.

Add devices on workspace and connect link between them. If you want to get IP-addresses on the diagram use Add a note tool for that.

Start and Configure R1

Here are configurations of R1 used in this example.
Current configuration : 946 bytes
upgrade fpd auto
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
hostname R1
logging message-counter syslog
enable password cisco
aaa new-model
aaa authentication login SSH-LOGIN local
aaa session-id common
ip source-route
ip cef
ip domain name
no ipv6 cef
multilink bundle-name authenticated
username cisco password 0 cisco
log config
interface Loopback0
ip address
interface FastEthernet0/0
ip address
duplex half
ip forward-protocol nd
no ip http server
no ip http secure-server
line con 0
stopbits 1
line aux 0
stopbits 1
line vty 0 4
password cisco
login authentication SSH-LOGIN
transport input telnet ssh

Remember to type crypto key generate command in config mode to get SSH enabled.

Start Qemu host and assign ip address and default gateway

  • Start Qemu Host by right clicking and pressing Start button Qemu window will open
  • Assign IP address for eth0 interface using command:
sudo su
ifconfig eth0 netmask up
  • To verify what ip address eth0 interface has use following command
ifconfig eth0
  • You can also set hostname to host using hostname command:
hostname Qemu1

Try to reach directly connected network

  • Try to ping router ( stop by pressing CRTL + C.


Setup default gateway to reach remote networks

Try to ping the Loopback interface of R1. It's not answering because of host doesn't know any route to it. To see routing table in linux use route command. To add default route use again route command. After adding default route towards R1 you can reach remote networks.


Using telnet and SSH

You can use Qemu host as telnet and SSH client when connection to R1 for example.



Making IP-address and default gateway persistent

By default when added using ifconfig and route commands IP-address and default gateway do not remain during reboot.

  • To make settings persistent do following:

sudo su
vi /opt/
  • Add follwing lines to the file:
hostname Qemu1
ifconfig eth0
route add default gw
  • Save file:
    • Press Esc
    • Type :wq!

  • Run following command:
/usr/bin/ backup

Now you can reboot the router and settings will remain.

Running multiple host simultaneously

Currently you can't run multiple Microcore host simultaneuosly. GNS3 Development team is trying to resolve this issue...

Using console connection

As you might have noticed there is Qemu window appears after starting Qemu host. However, you have also option to use normal console connection with PuTTY or some other telnet application. To get this working you have to have correct Qemu image. Currently you can download one from here:

Special Thanks to Jaakko Rautanen for making this tutorial .

Happy simulations using Qemu! :)

Share your views...

21 Respones to "Add Qemu Host in GNS3."

Faizan Saeed said...

my ping is not working properly with this topology...

ping successful
ping successful

ping notsuccessfull

what is the reason behind this....i am using tiny-core image for Qemu host and 2621 for router....

February 11, 2011 at 6:16 PM
Manj said...

nice tut good one thanx

February 23, 2011 at 4:22 PM
Haze_i386 said...

its not working

April 29, 2011 at 8:14 PM
Arsalan Baig said...

thnx 4 sharing but unable to perform this, can you plz elaborate it further.

To make settings persistent do following:

sudo su
vi /opt/

Add follwing lines to the file:

hostname Qemu1
ifconfig eth0
route add default gw

Save file:
Press Esc
Type :wq!

Run following command:

/usr/bin/ backup

May 4, 2011 at 11:33 PM
Bipin said...

The route command does not work. After using the command "
route add default gw", it gives an error message. Please see below for more details:

:~$route add default gw

route: SIOCADDRT: Operation not permitted.

How to solve this problem? Can anyone help?

May 11, 2011 at 7:16 PM
n00b said...

bookmarked... I always find myself coming back here in order to get the silly syntax correct... Thanks for the post!

June 26, 2011 at 5:58 AM
Viksync1 said...

pls let me know where can i get a QEMU host for windows 7.
Thanks .

October 23, 2011 at 6:54 AM
Stefanninel said...

the best article

thank you

November 7, 2011 at 2:46 PM
Vlandatabase said...

Thank you! Do you have also steps for JUNOS in GNS3? Can't make it a success. Thanks again.

November 27, 2011 at 5:26 PM
guest said...

very helpful


December 2, 2011 at 8:10 PM
Big_ben said...

thanks. best tutorial

January 19, 2012 at 4:17 PM
Ramesh said...

/usr/bin/ backup not working, it show invalid device

February 16, 2012 at 11:52 PM
Hishan said...

This is great I love it.

March 13, 2012 at 10:16 PM
anonymous said...

thanx for taking the time and sharing..helped me quite a bit!

March 25, 2012 at 10:26 AM
Sales said...

run multiple hots on Windows .

April 6, 2012 at 2:39 PM
Everest said...

what is password?

May 20, 2012 at 9:09 PM
Rajeewa said...

Really Nicely work Linux also user friendly ,nice article 

June 14, 2012 at 11:59 AM
Ksrawat88 said...

working fine thankssss

June 19, 2012 at 9:46 AM
Matingara said...

on my qemu image i needed to type:

/usr/bin/  -b

to back up the config.

 -- Joel

July 3, 2012 at 12:48 PM
Eop3297 said...

 mother fuck*

August 11, 2012 at 6:53 PM
sk abdul said...

Thanks alot for the post. I was new to linux and your post helped me lot create a topology smoothly.

January 8, 2013 at 12:22 AM

Post a Comment



Our Partners

DISCLAIMER: This site does not store any files on its server. I only index and link to content provided by other sites. All the files are from internet. In case of any query/objection regarding copyright or privacy, please inform me at Contact me and leave your comment here. I will immediately respond to you.