6 Adding a Virtual Machine to GNS3
Mathew J. Heath Van Horn, PhD
GNS3 is unique in that it is an emulator rather than a simulator, unlike Cisco’s Packet Tracer. With GNS3, you can add any VM you create in VirtualBox and use it within the GNS3 environment. The purpose of this lab is to give you experience in creating GNS3 appliances using VMs.
Phase 0 – Professional Alignment
Enterprise networks are composed of interconnected systems that must communicate reliably across physical and virtual infrastructures. In this chapter, you will integrate a virtual machine into your GNS3 environment, developing the skills needed to deploy, connect, and validate endpoint systems within an enterprise network simulation.
DCWF Work Roles
The knowledge and skills developed in this chapter align with the following Department of Defense Cyber Workforce Framework (DCWF) work roles:
- 511 – Network Operations Specialist
- 531 – Systems Administrator
- 441 – Network Services Specialist
NICE Work Roles
This chapter supports competencies associated with the following NICE Workforce Framework for Cybersecurity work roles:
- Network Operations Specialist
- Systems Administrator
- Network Services Specialist
Professional Skills
By completing this chapter, you will begin developing the ability to:
- Integrate virtual machines into enterprise network simulation environments.
- Configure virtual network interfaces and connectivity.
- Validate communication between endpoints and network infrastructure.
- Manage virtual machine resources within GNS3.
- Troubleshoot connectivity and configuration issues in virtual environments.
- Prepare endpoint systems for enterprise networking and cybersecurity laboratories.
What You’ll Be Able to Do
After completing this chapter, you should be able to:
- Import and configure a virtual machine for use within GNS3.
- Connect a virtual machine to routers, switches, and other network devices.
- Configure virtual network adapters to support laboratory exercises.
- Verify communication between the virtual machine and other devices in the topology.
- Troubleshoot common virtual machine integration and connectivity issues.
- Prepare a fully integrated endpoint for use in subsequent enterprise networking labs.
Learning Objectives
- Create GNS3 appliances using VirtualBox VMs
Prerequisites
- Oracle VirtualBox installed with at least one functional VM
- Setting up a GNS3 environment
Deliverables
- None – this is a preparatory lab for other labs
Resources
Contributors and testers
- Enzo Gonzalez
- Violet Barton
Phase I – Adding a Virtual Machine to GNS3
This is pretty straightforward. In this lab, we use a Windows Server VM as an example; however, any VM you create in VirtualBox can be used.

- Open VirtualBox and choose a VM you want to import into GNS3. You can use the TinyCore Linux VM if you like. In this example, we are using a Windows Server VM
- Start GNS3
- Create a new lab
- On the GNS3 menu, navigate to Edit and then Preferences

Figure 1 – Adding VirtualBox VMs to GNS3 - Select VirtualBox VMs, and you will see a list of VirtualBox VMs (if any) already added to GNS3
- Select new at the bottom of the window

Figure 2 – Adding new VirtualBox VMs to GNS3 - Make sure the radio button for running the VM on my local computer is selected, and click on Next

Figure 3 – Radio button selected - You will now see a window with a drop-down box to select any of the VMs that are loaded in VirtualBox; in this example, we will select Windows Server 2022 for GNS3

Figure 4 – Adding Windows Server 2022 - Click Finish
- To edit the properties of the VM, click edit on the bottom left of the window
- Here you can change things such as the default symbol, device name, RAM, etc
- In the Network tab, make sure to check the Allow GNS3 to use any configured VirtualBox adapter option box
- When you are finished, make sure you click Apply or risk the VM not being added
- Click OK
- Click on the all devices button, and you can now see our VM added to the appliance list

Figure 5 – Screenshot of the VM showing in GNS3 Workspace 
Figure 5a – zoom - You can drag the recently added VM to the GNS3 Workspace and start it

Figure 6 – Drag the new VirtualBox object to the GNS3 Workspace 
Figure 6a – zoom - When the VM starts, it will run outside of GNS3, so look for it on your toolbar as a VM

Figure 7 – Looking at the toolbar for the VM - That’s it. Remember, you can do this for any functional virtual machine (VM) in VirtualBox. However, VMs use much more resources than the emulated devices within GNS3. So, if you add ten Windows 11 VMs, you will overload your host machine’s processor pretty fast
Phase II – Installing other types of Virtual Machines (VM)
Not all Virtual Machines need to run in VirtualBox. Some can be run in the GNS3 VM through QEMU or Docker. QEMU stands for Quick EMUlator and is free software that runs various guest operating systems. It is typically used in Linux environments as a Virtual Machine Manager for Linux’s KVM Type 1 hypervisor. Docker is a set of products that run software in containers without requiring an Operating System.
Since these options use the GNS3 VM, you may run out of resources allocated to it. If you add many of these devices, make sure to add RAM and Cores to the GNS3 VM in VirtualBox before starting the GNS3 environment, or it may crash!
- Start your GNS3 environment
- Open the “All devices” menu on the left side
- At the bottom, click on “+New Template”

Figure 8 – Click on new template - Select the radio button for “Install an appliance from the GNS3 server,” then click on next

Figure 9 – Make a selection - Click “Update from online registry” at the bottom of the new window

Figure 10 – Update from online registry NOTE: This update is pretty good, but it lags behind the appliance downloads on the GNS3 Appliance page.
- We are going to install some lightweight guest operating systems
- Chromium
- Select the arrow next to guests to expand what is available
- Select Chromium for Docker from the list

Figure 11 – Expand the list - Click the “Install” button
- Leave the default selection and select “Next”

Figure 12- Select the server and press next - Read the usage notes and then click “Finish”

Figure 13 – Read the usage notes and click finish - You will get a pop-up saying it has been successfully added – press OK

Figure 14 – success pop-up - You can now see that Chromium has been added to your devices

Figure 15 – Chromium is now on our list - Test the template
- Start a new project
- From the “All Devices” menu, drag the NAT cloud to the new project
- When prompted to choose a server, click the drop-down and select “GNS3 VM” – press OK
- Drag the Chromium device to the new project
- Connect the two devices with a network cable

Figure 17 – Function Check - Right-click on the Chromium Device and click on configure

Figure 18 – Check network settings - Edit the network configuration at the bottom

Figure 19 – Check more network settings - Remove the comment command (#) to enable DHCP

Figure 20 – enable DHCP - Click on Save
NOTE: You can only access the network configuration when the device is off and has been added to the GNS3 environment.
- Edit the network configuration at the bottom
- Click on Apply, then click on OK
- Start the Chromium VM in GNS3
- Right-click on the device and select “console”
- The VNC viewer will open, and you can surf the web like normal

Figure 21 – surf the web
- Firefox on Tiny Core Linux
NOTE: Many of the screenshots are similar to those in the Chromium installation and have been omitted from this section, so read carefully!
- Select the arrow next to guests to expand what is available
- Select Firefox for Qemu from the list

Figure 22 – select Firefox version - Click the “Install” button
- Leave the default selection and select “Next”
- Leave the Qemu binary alone and click “Next”
- On the required files menu
- Use the arrows to highlight the version you want
- Click the download button

Figure 23 – select Firefox version - It will open a webpage and start downloading the image file
- Wait for the download to finish
- Click on the import button and select the location where the image file was downloaded

Figure 24 – select the file you downloaded - Click “Open”
- It will now say “Ready to install”
- Highlight the version that is ready to install and click on “next”
- When asked if you want to install, click on “Yes”
- Review the usage notes and click on “Finish”
- You will get a pop-up saying it has been successfully added – press OK
- You can now see that Firefox has been added to your devices
- Test the template
- Drag the Firefox device to the new project
- Delete the network cable going to the Chromium VM
- Connect the NAT cloud to the Firefox VM
- Start the Firefox VM
- Right-click on the device and select “console”
- The VNC viewer will open, and you can surf the web like normal

Figure 25 – mouse settings and browser test
- Chromium
NOTE: Sometimes VNC Viewer and TinyCore don’t play well together, and the mouse cursor doesn’t line up between the metal machine and the VM. You can set the mouse speed in the VM’s control panel to 1 instead of 3, which should help.
Career Connection
Integrating systems into existing network infrastructures is a routine responsibility for network administrators and systems administrators. Whether deploying new workstations, testing applications, validating security controls, or troubleshooting connectivity problems, IT professionals regularly connect and verify virtual and physical systems before they are placed into production. The skills developed in this chapter mirror the deployment and integration processes used in enterprise data centers, cloud environments, and cybersecurity laboratories.
End of Lab
