Create and import a VMware virtual machine in GNS3

Create and import a VMware virtual machine in GNS3

I. Presentation

In this tutorial, we will explain all the steps to create and import a virtual machine in GNS3. The virtual machine will be created under VMware Workstation. To be more precise, we will create the virtual machine, install the system in this case Windows in this example, before seeing how to configure GNS3 in order to import this new VMware VM.

Previously, we saw how to set up GNS3 on Windows and how to create a first Cisco switch. Today, we are going further by adding a virtual machine to our lab.

If you need to download GNS3:

II. Creation of the virtual machine

After starting VMware Workstation, we will click on “ Create a New Virtual Machine », this will start the virtual machine creation wizard.

VMware Workstation - GNS3 - Create VM - Step 1

We will create a virtual machine using the recommendation offered by VMWare Workstation. We will keep the option ” Typical » and we will move on by clicking on the button « Next ».

VMware Workstation - GNS3 - Create VM - Step 2

In the next step, we select the ISO of the system we want to install using the “ Browse “. Once the ISO has been selected, in this case a Windows 10, we will click on the ” Next to go to the next step.

Then we will indicate a username and password, then we will click on the button “ Next “. This is the user account that will be created in Windows as well as the password to open the session.

We will then confirm that we will not use ” Windows Product Key ».

After giving a name to our machine and choosing a location for the files. In this example, the files are in the default location.

We will then choose the size of our disk, we will leave the other options by default.

We will check the configuration of the virtual machine, once this configuration has been validated, we will click on the ” Finish “. By default, the option ” Power on this virtual machine after creation is checked, this will have the effect of starting the machine, after having clicked on the button Finish ».

Once the virtual machine has been created, we must launch it and proceed with the installation of Windows 10, following the traditional process.

III. Configuration de GNS3

In GNS3 we will go to the menu “ Edit ” then ” Preference ».

We will go to the side menu “ VMWare » then we will select the tab « Advanced Local Settings “. We will need as many VMnet interface » than virtual machine to import into GNS3. In this example, we will create 5 VMNets from 2 to 6.

In the drop-down lists we will select the first and the last VMNet, then we will click on the button “ Configure “. A command prompt launches and creates the network adapters on the main machine that hosts the GNS3 platform. We will confirm the creation of this network map by clicking on the ” Apply » then on « OK ».

IV. Import a VMware VM into GNS3

Now that the virtual machine installation is complete, we will shut it down and modify the virtual machine settings by changing the network adapter to a VMNET that was created in GNS3.

In the context menu of the virtual machine, we will select ” Power ” then ” Power off ».

Once the virtual machine is off, we will go to the virtual machine settings, clicking on the option “ Edit virtual machine settings ».

We will select ” Network Adaptater ” in the section ” Hardware » then in the right part we will opt for the option « Custom » and we will select a VMNet created in GNS3 (remember the list of VMNET2 to VMNET6). In this example, VMNET2.

We can, but it remains optional, remove ” Floppy », « USB Controller », « Sound Card », « Printer “. To do this, we will only have to select the material to be deleted and click on the ” Remove “. Once we have modified the parameters, we will validate the changes by clicking on the ” OK ».

The configuration of the virtual machine will therefore be as follows:

Our machine is now ready to import into GNS3. In GNS3, we will go to the drop-down menu “ Edit ” then ” Preference ».

In the side menu we will select “ VMware VMs » then we will click on the button « New ».

This will launch the virtual machine import wizard. The first step, we will indicate where the virtual machine will be executed. In a basic configuration, we have no choice but torun virtual machine on local machine. We will click on the button so on the button “ Next ».

In the drop-down list, we will select the virtual machine that we want to importnamely our “Win10″ VM, then we will confirm our choice by clicking on ” Finish ».

Back in the virtual machine list window, we can modify the virtual machine settings. We can, for example, edit icon for our template. To access the virtual machine modification form, we will click on the “ Edit ».

We have access to the model modification form. If we want to modify the icon of our virtual machine, in front of the field ” Symbol “, we will click on the button ” Browse… ».

We will have the option of using a custom icon by selecting the option “ Use Custom Symbol or we can use “ Symbols library », it is this second option that we are going to use to illustrate this example. We will look for an icon, for example “ client » then we will validate by clicking on the button « OK ».

After having validated our choice, we find ourselves on the window on the parameters of the virtual machine. We will click on the button “ OK » to validate the modification.

Back to the window VMware VM templates “, we can click on ” Apply » then on « OK ».

We will have access to our VM in the side menu “ End Devices ».

V. Testing the virtual machine

We will drag the virtual machine onto the workspace and we will start the virtual machine. This allows it to be integrated into our lab.

We will also add a Switch, we will use an image from IOSvL2 CISCO (we saw in the previous episode how to import this image). In the SWITCH section of GNS3 we will slide our switch and then we will start it via “Start“.

We will then link the two devices using the “ LINK ”, we will click on the Windows 10 icon, we will select the virtual machine interface. We will then click on the SWITCH icon, then we select the Gig 0/0 interface.

We will start the equipment present in the GNS3 workspace. The red squares of the interfaces will then become green circles, the virtual machine must launch.

To access the virtual machine, we will need to go to VMWare Workstation.

We will modify the network configuration within the Windows 10 operating system of the VM. We will access the window “ Execute » of our virtual machine using the keyboard shortcut [WINDOWS] + [R]. We will open the network configuration console “ ncpa.cpl ».

We are going to modify the parameters of the network configuration. From the context menu we will select the option “ properties ».

We will then go to the properties “ Protocoles Internet version 4 (TCP/IPv4) ».

After checking the option ” Use the following IP address », we will assign an IP address and a subnet mask. We will validate by clicking on the button “ OK ».

Back on the map properties window, we can click on the “ Close ».

To define an IP address on the “VLAN1” interface of the switch, the configuration to apply will be as follows:

Switch#configure terminal
Enter configuration commands, one per line.  End with CNTL/Z.
Switch(config)#interface vlan 1
Switch(config-if)#ip address
Switch(config-if)#no shutdown

From the Windows command prompt, we will test the communication between the PC and the switch. Of course, the same network segment must be used, here “” for communication to be possible between the two hosts.

VI. Conclusion

Thanks to this tutorial, you are able to create a virtual machine in VMware Workstation and integrate it into a test environment under GNS3! This procedure can be adapted to other operating systems, whether Windows or Linux, and allow you to create a complete lab with computers, servers and network equipment.

Administration Réseau,VMware,gns3,Réseau,

#Create #import #VMware #virtual #machine #GNS3

Leave a Comment

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