Recently, my license for Cisco VIRL expired and I wanted to test alternatives to have a lab on my laptop.
I got used to install the client and the server parts of VIRL on my laptop, to not have to worry about connectivity when I want to do a lab or a demo to a colleague or a customer. With the exceptional opportunities of the different cloud solutions actually, this is probably not the best solution, but it suits me well for a small lab and I’d like to continue to have this possibility.
So, as an alternative to Cisco VIRL, I had two obvious choices: GNS3 or EVE-NG.
For running one of the three solutions (including VIRL) on a laptop under Windows 10, it is recommended and documented to use VMware Workstation. But have a problem here, I use Microsoft Hyper-V for other VMs tests, as well as for Docker for Windows. And VMware Workstation does not coexist well with Microsoft Hyper-V on the same machine. For example, to start a VM under VMware workstation when Hyper-V start as a service, I must first stop Hyper-V, do a reboot, and then I can start the VM under VMware. Not really sexy.
So, I searched a documentation or a blog post about how to install and run GNS3 or EVE-NG under Hyper-V. Because, after all, this is just an Ubuntu server running on a VM.
For GNS3, I found a pretty good blog, here: https://cisco.zacandsarah.com/node/1
And after two hours I could run my first simulation without any problem. (Note: this blog does not respond from time to time, and currently it seems down).
Then, I wanted to test the same with EVE-NG. In this case, did not find any documentation or post of someone who has already installed it under Hyper-V. I threw a bottle to the sea (Twitter) and got a promising answer that EVE-NG has been successfully installed on Microsoft Azure (see it on YouTube here, a great videos from @theLANtamer). So, I thought, let’s try on Hyper-V!
1. Ubuntu installation
Some basic prerequisites:
- Your laptop must have Hyper-V already installed and a vSwitch already created with Internet access.
- The system requirements for EVE-NG are here: http://www.eve-ng.net/documentation/installation/system-requirement
- The system requirements for Ubuntu server and the installation guide are here: https://tutorials.ubuntu.com/tutorial/tutorial-install-ubuntu-server?_ga=2.142146226.1499346393.1542550531-1914365158.1542019603#0
- For information, I made this install with a Lenovo T450s laptop with Windows 10 pro and 12GB of RAM. So, I assigned 8GB of RAM and 4vCPU to the server. This is probably the minimum to run IOU/IOL and Dynamips images, and insufficient for topology with CSR1000V and/or Nexus-9k. Of course, you must adapt these values according to your own hardware.
Let’s create the VM under Hyper-V and make the Ubuntu install:
- Download Ubuntu 16.04.5 LTS ISO: http://releases.ubuntu.com/16.04/ubuntu-16.04.5-server-amd64.iso
- Create a new VM under Hyper-V:
- Click on “New Virtual Machine” on Hyper-V
- Name: EVE-NG (you can use any other name, but we will need this name after for a PowerShell change to activate Intel VT-x or AMD-V, so avoid special characters)
- Generation 2
- Startup Memory: I have 12GB on my laptop, so I assigned 8GB, but it depends on your own machine. With dynamic memory enabled.
- Networking: use a vSwitch already existing, connected to the Internet. You must have Internet access during the installation, for the updates.
- Hard-Disk: create a virtual hard-disk, I assigned 300GB. It’s a lot but if you have many images on EVE-NG, you don’t need to resize the disk later. So up to you.
- Install the operating system from a bootable image file: and specify the Ubuntu ISO image you just downloaded.
- Click next, then finish. Hyper-V will now create your VM.
- Once created, on Hyper-V, select your VM, right-click and choose Settings…
- Go under Security and disable Secure Boot. Otherwise the boot with the ISO will not start:
- Go under Processor and increase the number of virtual processors, according to your hardware.
- Click OK.
- Connect to the VM and start it. The Ubuntu installation will start, with this message:
(Click on the image to see it full-size)
- Ubuntu Setup:
- Install Ubuntu Server (just hit enter)
- Language: English
- Location: United States
- Configure keyboard: Choose your keyboard or use automatic detection. Having the right keyboard will help you to type correctly the password later.
- If the network of your vSwitch have DHCP, the installation continue automatically, if not please setup IP/mask/GW and DNS IPs manually
- Hostname: eve-ng
- Domain name: anything you want, or example.com
- Full name of user: anything makes you happy
- Username of your account: user (this will be used first time login in to Ubuntu)
- Password: enter password, confirm enter password again
- Use weak password: YES (you will see it only if you entered a weak password above)
- Encrypt your home directory: NO
- Configure Clock: if your DNS IP is set right, time zone is set automatically
- Partition disks: use entire disk and setup LVM
- Partition disks: As you have only one disk, just click continue
- Write changes to disk and create LVM: YES
- Amount of volume: leave the entire offered size
- Force UEFI Installation: YES
- Write changes to disk: YES
- Http proxy: NO. Except if you are using a proxy, then configure it for internet reachability.
- Configuring task: Install security updates automatically
- Software selection: IMPORTANT: add Open SSH server to the selection (mark with spacebar).
- Install GRUB boot loader: YES (must be automatic)
- At the end of the installation: reboot
2. EVE-NG pre-installation
After the reboot, stay on the Hyper-V terminal of your VM to change some first settings. After that, we will use SSH.
This correspond, with some small changes, to the Phase 2 of the bare-install of EVE-NG documentation, here.
- After the reboot, login with your user created during the installation part and get root access:
Login: your_user Password: your_password Welcome to Ubuntu 16.04.5 TLS ... $ sudo su [sudo] password for your_user: your_password
- Change the root password. Here I use “eve” but of course you can choose your own root password:
root@eve-ng:~# sudo passwd root Enter new UNIX password: eve Retype new UNIX password: eve passwd: password updated successfully
- Change the hosts file to look as below. I still not see the goal of this change but it’s on the documentation:
(If you don’t know VI, you can use nano or another editor of your choice. To install nano, type: apt-get install nano )
root@eve-ng:~# vi /etc/hosts 127.0.0.1 localhost 127.0.1.1 eve-ng.example.com eve-ng
- Allow the root user to access via SSH [optional]:
root@eve-ng:~# vi /etc/ssh/sshd_config Change: PermitRootLogin prohibit-password To: PermitRootLogin yes
- Save settings (:wq) and restart the sshd service:
root@eve-ng:~# service ssh restart
3. EVE-NG community installation
Before the EVE-NG community installation, we need to check the Internet access and the domain-name resolution, with the command:
root@eve-ng:~# ping icmp.canireachthe.net PING icmp.canireachthe.net (184.108.40.206) 56(84) bytes of data. 64 bytes from icmp.meraki.com (220.127.116.11): icmp_seq=1 ttl=51 time=176 ms 64 bytes from icmp.meraki.com (18.104.22.168): icmp_seq=2 ttl=51 time=177 ms 64 bytes from icmp.meraki.com (22.214.171.124): icmp_seq=3 ttl=51 time=176 ms ^C
Do you like this host (canireachthe.net)? Another smart Cisco Meraki idea 🙂
Now, we are ready for the install, be sure you are logged as rood and type:
root@eve-ng:~# wget -O - http://www.eve-ng.net/repo/install-eve.sh | bash -i
All the installation steps are in this script, there is nothing to do. Go get yourself a coffee and relax.
After a while, the installation is complete, reboot the server:
Go back to Hyper-V, right-click on your VM and click Connect…
Click start. During the boot, you will see this warning message on the console:
neither Intel VT-x or AMD-V found on Hyper-V
We will solve this later.
Now, you can follow this guide for the first boot configuration: http://www.eve-ng.net/index.php/documentation/howto-s/65-howto-configure-eve-during-first-boot
Once done, come back here for the next few steps.
If you have not done so already – this was at the end of the guide for the first boot configuration – do an upgrade to latest version, and then shutdown the server:
root@eve-ng:~# apt-get update (... skipped ...) root@eve-ng:~# apt-get upgrade (... skipped ...) root@eve-ng:~# shutdown now
Finally, we must enable nested virtualization. As I know, the only way to do this is with PowerShell. So, open a PowerShell prompt as administrator on your PC and write this command:
(Where “EVE-NG” is the name of the VM)
> Set-VMProcessor -VMName "EVE-NG" -ExposeVirtualizationExtensions $True
Now, start your EVE-NG VM again with the Hyper-V console, the message “neither Intel VT-x or AMD-V found on Hyper-V” should not appear anymore.
Now, you should be able to connect to the web interface with HTTP – the IP address of the server should appear in the console, just on top of the login:
Congratulations, your EVE-NG is ready!
4. Next steps: import and use the images
The next steps are to import and use the images. I will not spend too much time on it because there is already a lot of documentation on this subject. But, there are a few things to keep in mind:
- Images must be installed on the corresponding directory:
- /opt/unetlab/addons/dynamips for Dynamips
- /opt/unetlab/addons/iol/bin for IOL/IOU
- /opt/unetlab/addons/qemu/xxxx for QEMU, where xxx correspond to a naming-convention you can find here.
- The IOS/IOU images need a license. I let you google this point.
- Read the how-to to upload and use the images, this is important: http://www.eve-ng.net/documentation/howto-s
- Fix the permissions issues with the wrapper: /opt/unetlab/wrappers/unl_wrapper -a fixpermissions
- To copy the images from your PC to the VM, you can use SCP. I use Putty pscp.exe
- Available here: https://the.earth.li/~sgtatham/putty/latest/w64/pscp.exe
- Then the command line to copy the files is pretty simple: pscp foobar.txt email@example.com:/some/remote/directory
Conclusions and other resources
As I wrote at the beginning of this post, with the current possibilities offered by the cloud, at ever lower prices, it is not necessarily useful to have the EVE-NG / GNS3 / VIRL server directly on his machine. Especially that the resources are limited if you want to make a big lab or start few Nexus 9k for example. But, it may be useful to be able to start a small lab in 2 minutes on his own PC, without worrying about Internet connectivity.
For more information, I recommend the following links:
- EVE-NG official site
- Cisco VIRL official site
- GNS3 official site
- David Bombal courses on Udemy (many are on GNS3)
- Thelantamer Twitch Channel and YouTube channel
- Lab-time.it EVE-NG series