Adding VMware VMs to GNS3 Topologies | GNS3 Documentation

Adding VMware VMs to GNS3 Topologies | GNS3 Documentation

Adding VMware VMs to GNS3 Topologies | GNS3 Documentation

How to connect vmware to gns3


This document explains how to add vmware virtual machines to gns3 topologies. Although this document discusses the use of vmware virtual machines, you can do something similar with virtualbox.

This document will show you two methods to add a virtual machine to gns3:

  1. manually using a local gns3 installation
  2. using a device and adding the virtual machine to the gns3 virtual machine

vmware limitations in gns3#

vmware vms data is stored outside of gns3. this means that a topology using vmware vm will not be portable on a different computer. if you want a portable topology, you should use qemu.

You cannot run multiple instances of the same vmware vm if you are using vmware player. you need a paid version of vmware to do this.

vmware player# limitation

vmware player version has limitations and if your virtual machine is not in the default directory, sometimes gns3 cannot locate the virtual machine you created.

This issue does not occur with the paid version of vmware because a central database is available for third party applications.

why use vmware?#

some devices are designed to run only on vmware. furthermore, there are times when you may simply prefer to use a desktop virtual machine (and the GUI applications it can provide), rather than use the serial console to work with the virtual machine’s GUI on a terminal. desktop vms respond better in vmware than qemu, simply for technical reasons that are beyond the scope of this document.

what about vmware fusion?#

on macosx, vmware fusion is used instead of vmware workstation. vmware fusion’s user interface is different from vmware workstations, but it works the same way with gns3, so the same principles apply.

add a virtual machine to the vmware workstation (local server)#

If you already have a virtual machine imported to vmware workstation, go to the next section of this document.

download or copy a virtual machine iso to your local computer. in this example, tinycore linux is used. this is a recommended lightweight linux distribution:

iso on local pc:

screenshotIn VMware Workstation, click “Create a New Virtual Machine”:screenshotFollow the VMware Wizard to import create the new virtual machine. In the first step, select Typical and then click Next >:screenshotPoint to the ISO file downloaded and click Next >:screenshotSelect Linux as the Guest operating system and Other Linux 4.x as the Version and then click Next >:screenshotName the VM and change the default Location if you want to. In this example the VM is called TinyCore-Local-VMware and the default Location is used. Then click Next >:screenshotSpecify the amount of disk space required by your virtual machine. In this example only 1 GB is allocated. You can also select “Store virtual disk as a single file”, as this VM will be so small. Then click Next >:screenshotClick Customize Hardware:screenshotCustomize the hardware of the VM as required. In this example only 128 MB of RAM is required for the VM. To do so, click “Memory” in the Virtual Machine settings, type “128” in the dialog box for the amount of memory it will use. Once the required changes have been completed, click Close:screenshotTo complete the VM import, click Finish:screenshotThe VM is now available in VMware Workstation:screenshotPower on the virtual machine in VMware Workstation:screenshotInstall the operating system as required. TinyCore Linux does not require this and is booted to RAM by selecting Boot TinyCore:screenshotComplete any operating system installation setup as required. In this example, TinyCore simply boots up and no configuration is required:screenshotOnce install is completed, shut down the virtual machine by either clicking on the Suspend button in VMware Workstation and select Power Off (shown below), or right-clicking on the tab for the virtual machine (containing its name), select Power, and then Shut Down Guest (not shown):screenshotYou are now ready to integrate the new VM with GNS3.

Add a virtual machine to GNS3 (Local Server)#

once you have installed and configured your virtual machine on vmware workstation, you are ready to integrate the virtual machine with gns3.

start gns3 and create a new project:

screenshotClick Edit and then Preferences:screenshotClick VMware VMs and New, to add a new VMware virtual machine:screenshotYou will be prompted which server type to use, to run this virtual machine. As this article uses the local server, the remote server option is greyed out. Click Next>:screenshotOn the next screen, click on the dropdown:screenshotThe dropdown lists all the available VMware virtual machines available on this computer. Left-click on your new TinyCore-Local-VMware virtual machine to select it:screenshotClick Finish> to complete the import process:screenshotThe new virtual machine is now available in GNS3. Ensure that it is still highlighted, and click Edit to change the VM settings:screenshotClick the Network Tab:screenshotEnsure that “Allow GNS3 to override non custom VMware adapter” is selected, and click OK to finish editing the TinyCore-Local-VMware virtual machine’s properties.

GNS3 will randomly select an available Host-only VMnet to bridge the VMware virtual machine into the GNS3 topology. VMnet 0 (bridged), VMnet 1 (host-only), and VMnet 8 (NAT) are available in VMware by default, but will not be used by GNS3 for this purpose!

it is important that any new host-only vmnet created for gns3 have the default dhcp disabled!

The following is a screenshot of the virtual network editor (vne) in vmware workstation pro, showing additional host-only vmnets (vmnets 2-7 and 9-19), for illustrative purposes. vne is not available for vmware workstation player users.

screenshot(notice that VMnets 2 – 7 are Host-only, and have their own local DHCP servers disabled. That is important!!)

VMware Workstation Players (and VMware Workstation Pro users) can use a script included with GNS3 (named gns3vmnet) to automatically create and configure the additional VMnets necessary.

on windows, this executable is located in the default gns3 installation directory:

screenshot(You may need to create an exemption/exclusion in your anti-virus software to allow this executable to run. This process varies, so consult the documentation of the anti-virus suite you use for instructions.)

To have GNS3 automatically create the necessary Host-only VMnets for you (using the aforementioned gns3vmnet file), click on VMware -> Advanced local settings, and then click on the Configure button:

screenshot(If necessary, you can have GNS3 remove the host-only VMnets it created by clicking the Reset button, instead).

Once completed, click Click OK to complete the integration.

screenshotCreate a GNS3 Topology#

Once you have integrated the new virtual machine with GNS3, you can now create topologies that contain the new VM.

to create a new gns3 topology, select a device group in the devices toolbar by clicking the end devices

buttonscreenshotThe new virtual machine is now available to be added to a GNS3 topology:screenshotDrag and drop the selected node (device) to the GNS3 Workspace. An instance of the node becomes available in the Workspace. In this example, the TinyCore PC is now available:screenshotDrag and drop another node into the GNS3 Workspace. For this article, a router will be added to the GNS3 workspace. The devices available will depend on your GNS3 configuration:screenshotClick the Toolbar Device button again to collapse the group:screenshotClick the Add a Link button to start adding links to your topology. The mouse cursor will change to indicate that links can be added:screenshotClick on the TinyCore-Local-VMware~1 virtual machine in your topology, to display its available interfaces. In this example Ethernet0 is available (the available interfaces will be device dependant):screenshotClick the interface and then select another device in the topology to connect the interface to. In this example Ethernet 0 on TinyCore-Local-VMware was selected and the link was joined to the FastEthernet0/0 interface of R1:screenshotClick the Add a Link button to stop adding links. The mouse cursor will change back to normal to indicate that you have stopped adding links:screenshotClick the Show/Hide interface labels button on the GNS3 Toolbar to display interface labels in your topology:screenshotThis will display the connected interfaces of both devices:screenshotYou are now ready to power on your network devices. Click the Start/Resume button on the GNS3 Toolbar to start up your network devices:screenshotGNS3 indicates that the devices have been powered on by turning the interface connectors from red to green:screenshot

To access the serial console of the router (or any other additional nodes you may have in your topology), click the Console All button in the Toolbar to launch your select terminal emulator. The below example uses Solar-PuTTY, as it’s included in the Windows GNS3 All-in-one installer from, and is set to be the default terminal emulator (you’re free to select a different terminal emulator. There are instructions available in this article showing how to do so).

screenshotBe advised that Solar-PuTTY is not included by default if the GNS3 AIO installer was downloaded from Github (regular PuTTY will be included instead).

Solar-PuTTY is available for free on SolarWinds website here.

if you have downloaded solar-putty from solarwinds, it will be in a .zip file. unzip that file, copy the solar-putty executable to the gns3 installation directory. this article (the same one linked to the previous one) shows how to change the default terminal emulator that gns3 will use.

let’s go back to the tinycore-local-vmware virtual machine running on the vmware workstation GUI:

screenshotIn this example, R1 is configured as follows:

Configure the VM with an IP address in the same subnet. In TinyCore, this is done by first selecting the Control Panel:

screenshotClick Network:screenshotConfigure the relevant IP addressing information and click Apply and then Exit:screenshotIn this example the following settings have been used:

Click Apply to save the network configuration of this VM.

screenshotClick Exit to close the Network Configuration pop-up window, and then click on the X in the upper-right corner of the TinyCore Control Panel to close it:screenshotClick on the Terminal icon at the bottom of the TinyCore GUI to open a terminal:screenshot

(a terminal is now open) Ping R1 from the TinyCore PC:

screenshotResult: The New TinyCore PC can ping the GNS3 router R1.

Congratulations! You have integrated a new VMware virtual machine with GNS3.

Addendum: If you’re curious to see which of those new host-only vmnets this particular VM is using, click edit VM settings on the vmware workstation:

Related Articles

Leave a Reply

Your email address will not be published. Required fields are marked *

Back to top button