As I continue on my quest for the perfect lab I have been messing around with EVE-NG (a competitor to GNS3 and VIRL). One thing I really like about EVE-NG is the ability to use a web client instead of needing a thick client like you do for GNS3 and VIRL. A draw back I’ve run into with EVE-NG is its lack of quick and easy customization. For example, configuring the default IDLE PC for a Cisco IOS node in GNS3 is very straightforward. Doing extensive Google searching only resulted in a single document on the “old” way of configuring the default IDLE PC and a bunch of hits for GNS3 configuration. This post is going to be a quick guide on configuring the default IDLE PC settings for EVE-NG.
First ssh to the EVE-NG CLI and issue the “top” command:
Open a second SSH session to the EVE-NG CLI, while leaving the first SSH session open. Now run the IOS from the second CLI, for this tutorial I will be issuing the IDLE PC for a C7200 node:
Once the IOS device completes booting (after exiting the initial configuration dialog) navigate back to the first SSH session with top running and observe the CPU load:
As will be noticed, the CPU is running pretty high for a single IOS device running. To fix this issue, we need to have Dynamips (the software that emulates the Cisco IOS) calculate a better IDLE PC value compared to the default. To do this, navigate back to the SSH session running the IOS emulation and use the keyboard combination “Ctrl+]” and then hit “i”:
The highest count is usually the best value to use, so quit out of the IOS session with “Ctrl+]” and then”q”. Then start the IOS session over but appended with “–idle-pc=” and the value selected.
Now go back to the SSH session running “top” and see how the CPU is doing:
As can be seen, a single IOS instance is only taking 1% CPU instead of 25% which is much better!
Now time for the fun part. Go ahead and close the session running the IOS node in CLI.
Next edit the template file with vi. For this template I will be using the command “vi /opt/unetlab/html/templates/c7200.php”. If you are editing a different template they are all found within that directory.
Once inside the template, locate the idle PC variable and set it to the determined value:
Save the edited file and any new node created from that template will be created with the configured IDLE PC value.
As can be seen in my environment I am able to run 51 IOS Nodes with only utilizing 50% CPU: