Setting Up vJunos Images in GNS3

The vJunos family - including vJunos-router, vJunos-switch, and vJunosEvolved are virtual QEMU images that run the  Junos OS. These images significantly reduce the time needed to build and configure physical testing environments. As a result, network engineers can create complex lab topologies almost instantly.

Moreover, vJunos is ideal for training, demonstrations, and control-plane validation. The vJunos Lab images are completely free for non-production environments, and they have no time restrictions. This freedom makes vJunos a robust choice for long-term learning and continuous testing.

However, remember that vJunos Labs are not designed for production use. They are intended only for configuration validation and low-traffic simulations. Consequently, Juniper Networks does not provide commercial JTAC support for these virtual lab images.

You can download the required QCOW2 disk images for QEMU directly from Juniper’s official portal:

In this guide, we show how to integrate these images into GNS3, creating a fast and intuitive graphical lab setup.

1. Import vJunos Images

Importing the downloaded QCOW2 image files into GNS3 is the required first step.

  1. Navigate to File -> Image Management.
  2. Click Upload and select the path to your image file.

Once the process is complete, the vJunos images will be ready for use in the Image Management window.

Figure 1 - vJunos Images in Image Management

2. Create QEMU VM

Next, define a custom QEMU VM template for the vJunos device.

  1. Go to Edit -> Preferences -> Qemu VMs.
  2. Click New.
  3. Assign at least 5300 MB RAM and 4 CPU Cores. Crucially, 4 CPU cores are required; fewer cores may prevent the GigabitEthernet interfaces (ge-0/0/x) from being presented correctly in Junos OS.

Figure 2 - vJunos Qemu VM General Settings

3. NIC Settings

Setting the correct Network Interface Card (NIC) type is vital for stability and performance.

  1. Within the VM template settings, select the NIC type: virtio-net-pci. This specific driver offers the highest compatibility and best performance with Junos virtual environments running on QEMU.

Figure 3 - NIC virtio-net-pci for vJunos Qemu

4. QEMU Advanced Parameters

To guarantee stability and correct hardware emulation, specify advanced QEMU parameters. This step is necessary for specialized virtual devices.

  1. Specify the CPU model as IvyBridge and enable VMX. QEMU must accurately emulate the CPU for the guest system.
  2. VMX (vmx=on): This setting enables Intel's hardware virtualization (VT-x) for the emulated CPU. This is often required for the operation of certain core Junos functionalities within the VM.

Figure 4 - vJunos Qemu VM Advanced Settings

5. Image Running and Initial Configuration

After connecting and starting your device, begin the initial configuration steps. The default login is root with no password.

Interface Mapping

NICs added in GNS3 map directly to Junos interfaces:

  • The first NIC is the management interface: fxp0. It connects the vJunos instance to the management network.
  • The second NIC is ge-0/0/0 the third is ge-0/0/1, and so on.

Initial Access and CLI

After the boot process completes, access the console:

root@:~ # cli

Stopping Auto Image Upgrade

Upon startup, the system generates continuous log messages related to the Automatic Image Upgrade feature. This feature attempts to fetch an image via DHCP (Figure 5)

Figure 5 - Auto Image Upgrade Messages

Disable these messages to avoid console spam, especially in a lab setting:

root> configure
root# delete chassis auto-image-upgrade

Final Commit Preparation

A root password is required before any configuration changes can be saved. This is a mandatory security step enforced by Junos OS.

root# set system root-authentication plain-text-password
root# commit

Conclusion

We have successfully prepared and configured your vJunos virtual devices for operation within GNS3. By defining the QEMU parameters correctly, we have guaranteed a stable platform for our virtual lab.

The resulting virtual machines are now ready for immediate deployment in complex training scenarios using Juniper's Junos OS. This complete process provides a solid foundation for any future Junos-based projects.

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.