UNetLab Common Issues

Posted by
Facebooktwitterredditpinterestlinkedintumblr

These are the common issues I encountered in setting up UNetLab and how I fixed these issues. I’m sharing this so UNetLab users will benefit from it. I will constantly update this list as I progress.

Issue 1: UNetLab is complaining about – Neither intel VT-X or AMD-V found.
Solution: Find the .vmx file for the UNetLab and add this line at the end.

vhv.enable = "TRUE".



Issue 2: After UNetLab install, running apt-get update and apt-get upgrade won’t update the UNetLab package.
Solution: I had to force update using these commands.

apt-get update
apt-get -o Dpkg::Options::="--force-overwrite" install unetlab unetlab-qemu



Issue 3: Image not showing on the UNetLab web interface.
Solution: Should follow folder naming convention.

Below is the reference node in UNetLab, file path is /opt/unetlab/html/includes/init.php.

                'a10'                   =>      'A10 vThunder',
                'clearpass'             =>      'Aruba ClearPass',
                'timos'                 =>      'Alcatel 7750 SR',
                'veos'                  =>      'Arista vEOS',
                'brocadevadx'   =>      'Brocade vADX',
                'cpsg'                  =>      'CheckPoint Security Gateway VE',
                'acs'                   =>      'Cisco ACS',
                'asa'                   =>      'Cisco ASA',
                'asav'                  =>      'Cisco ASAv',
                'cda'                   =>      'Cisco Context Directory Agent',
                'csr1000v'              =>      'Cisco CSR 1000V',
                'cips'                  =>      'Cisco IPS',
                'ise'                   =>      'Cisco ISE',
                'c1710'                 =>      'Cisco IOS 1710 (Dynamips)',
                'c3725'                 =>      'Cisco IOS 3725 (Dynamips)',
                'c7200'                 =>      'Cisco IOS 7206VXR (Dynamips)',
                'iol'                   =>      'Cisco IOL',
                'titanium'              =>      'Cisco NX-OSv (Titanium)',
                'sourcefire'    =>      'Cisco Sourcefire',
                'vios'                  =>      'Cisco vIOS',
                'viosl2'                =>      'Cisco vIOS L2',
                'vnam'                  =>      'Cisco vNAM',
                'vwlc'                  =>      'Cisco vWLC',
                //'vwaas'               =>      'Cisco vWAAS',
                'coeus'                 =>      'Cisco Web Security Appliance',
                'xrv'                   =>      'Cisco XRv',
                'nsvpx'                 =>      'Citrix Netscaler',
                'cumulus'               =>      'Cumulus VX',
                'extremexos'    =>      'ExtremeXOS',
                'bigip'                 =>      'F5 BIG-IP LTM VE',
                'fortinet'              =>      'Fortinet FortiGate',
                'hpvsr'                 =>      'HP VSR1000',
                'olive'                 =>      'Juniper Olive',
                'vmx'                   =>      'Juniper vMX',
                'vsrx'                  =>      'Juniper vSRX',
                'linux'                 =>      'Linux',
                'mikrotik'              =>      'MikroTik RouterOS',
                'ostinato'              =>      'Ostinato',
                'paloalto'              =>      'Palo Alto VM-100 Firewall',
                'vyos'                  =>      'VyOS',
                //'esxi'                =>      'VMware ESXi',
                'win'                   =>      'Windows'

For example, if you are adding a new ASAv image then the folder should start with asav.



Issue 4: How to add users in UNetLab.
Solution:

Install sqlite.

apt-get update
apt-get install sqlite

Open the UNetLab sqlite database, file path is /opt/unetlab/data/database.sdb.

sqlite> .open database.sdb
sqlite> .databases
seq  name             file                                                      
---  ---------------  ----------------------------------------------------------
0    main             /opt/unetlab/data/database.sdb            
sqlite> .tables
pods   users
sqlite> INSERT INTO users (username, password) VALUES ("newadmin1","5bb73905f7fc00b2d5510785f625003a95d35f7d8ce423abf7ba3528be43ff2d");

Note that the password string is SHA256 hash. Search over the internet for SHA256 hash generator.



Issue 5: vIOS/ASAv and any other VMs will not start.
Solution: Make sure nested virtualisation is supported otherwise VMs wont start. Refer to solution for issue 1.



Issue 6: IOU/IOL device starts but after few seconds stops. From the wrapper logs, I received these errors.

1:1 ERR: Operation not permitted (5).
1:1 ERR: Operation not permitted (5).
1:1 ERR: Operation not permitted (5).
1:1 ERR: Operation not permitted (5).
1:1 ERR: No such file or directory (2).
1:1 ERR: Cannot open AF_UNIX sockets (2).
1:1 ERR: failed to create AF_UNIX socket file (2).
1:1 ERR: child is no more running.

Solution: Make sure /tmp directory has proper permissions. If not, apply the following commands.

chmod 777 /tmp
chmod g+t /tmp

29 comments

  1. Hi,

    Am getting Issue 1 – the solution is Find the .vmx file for the UNetLab and add this line at the end. vhv.enable = “TRUE”

    I have lab called Test.unf but I can’t find any file with *.vmx can please elborate .. do I have to create this file

    I also search for *.vmx (i.e. find / -type -f -name “*.vmx” and I can’t seem this file can please elaborate ..

  2. Please ignore my request, I found my problem I was using a virtualbox suppose to be using vmware 9 above which support nested VT-VT ..

  3. Hi when I enter the ip address in the web browser, nothing shows up, how can I fix it please?

  4. I already tried to use solution at issue 6. But i still facing the same issue.
    Any one can help me?

  5. Nice blog right here! Additionally your site a lot up very
    fast! What web host are you using? Can I
    get your affiliate hyperlink to your host? I want my web site loaded up
    as quickly as yours lol

  6. I also tried solution 6 but still facing same issue. Router starts and stops within seconds. Please help what else could be done to fix this issue.

  7. hi , i have a problem with my unetlab it has delay forexample when i create new lab it doesnt create it aftar many times logout it creats … what should i do? plz help me

  8. Hi!
    IOL images won’t start up and keep receiving this error.

    “Failed to start node (12)”

    any idea, Plz advise

  9. Hi All,

    i am facing the issue 6. gave the full permission to /tem folder.

    but still i face the issue

    #the command which i used gave permission.

    chmod 777 /tmp
    chmod g+t /tmp

  10. Hi,

    I’m facing issue related nodes (like Cisco IOU devices and NXOS) start and stop immediately and console not coming.

    I have done all the troubleshooting fix this issue but failed. is there anyone to help me out.

    Much appreciated in advance !!

    Regards
    chittaranjan

  11. I am facing this error (Slim Application Error )anytime I try to start a node.

    0 /opt/unetlab/html/includes/api_nodes.php(832): Slim\Slim::handleErrors(8, ‘Undefined offse…’, ‘/opt/unetlab/ht…’, 832, Array)
    #1 /opt/unetlab/html/api.php(669): apiStartLabNode(Object(Lab), ‘2’, ‘0’)
    #2 [internal function]: {closure}(Array)
    #3 /opt/unetlab/html/includes/Slim/Route.php(468): call_user_func_array(Object(Closure), Array)
    #4 /opt/unetlab/html/includes/Slim/Slim.php(1357): Slim\Route->dispatch()
    #5 /opt/unetlab/html/includes/Slim/Middleware/Flash.php(85): Slim\Slim->call()
    #6 /opt/unetlab/html/includes/Slim/Middleware/MethodOverride.php(92): Slim\Middleware\Flash->call()
    #7 /opt/unetlab/html/includes/Slim/Middleware/PrettyExceptions.php(67): Slim\Middleware\MethodOverride->call()
    #8 /opt/unetlab/html/includes/Slim/Slim.php(1302): Slim\Middleware\PrettyExceptions->call()
    #9 /opt/unetlab/html/api.php(1585): Slim\Slim->run()
    #10 {main}

  12. Any one able to find the solution around devices getting stopped after few seconds, I tried step 6 but it didn’t work for me.

  13. Hi to all.
    I have the same issue. iol nodes starts and then stops after few seconds. I tried all the steps but no effect. Anyone faced this issue please help me to resolve this issue.

    Thanks

  14. i’m not able to ping palo alto ip. palo alto is added in eve ng. i have assigned an ip to palo alto from the range of my laptop. please help me

  15. Solution 1 for (IoL starting and stopping after few seconds) not worked, please help.

  16. Guys! IOL start and stop, fixed that issued.
    follow below one

    cd /opt/unetlab/addons/iol/bin
    touch NETMAP
    LD_LIBRARY_PATH=/opt/unetlab/addons/iol/lib /opt/unetlab/addons/iol/bin/ 1

    1. The correct commands are:

      cd /opt/unetlab/addons/iol/bin
      touch NETMAP
      LD_LIBRARY_PATH=/opt/unetlab/addons/iol/lib /opt/unetlab/addons/iol/bin/ 1

      Well I tried solutions in step6 and 1 and still had issues. But finally I was able to resolve it:

      So I had the issue wherein the nodes – switch/routers, I started them but it was stopped in 5-7 seconds. I found that the issue was with the fact that Cisco IOURC license file didnt have permissions and were not executed.
      1.At first I came across this article: https://rejohn.cuar.es/blog/2015/08/24/unetlab-common-issues/
      As per this, I had ISSUE6.IOU/IOL device starts but after few seconds stops. As a solution, I ensured /tmp directory has proper permissions. For that I entered below commands in EVE-NG cli:
      chmod 777 /tmp
      chmod g+t /tmp

      I still had issues. Then from this article’s comment section I found that one needs to follow steps on ISSUE1 as well. As a solution, its mentioned to find the .vmx file for the UNetLab and add this line at the end:
      vhv.enable = “TRUE”.

      I had issues in figuring out this ‘.vmx’ file. For this, go to the folder wherein you saved EVE-NG files. Look for a file with extension ‘VMware virtual machine configuration’. Open this file with notepad or any other text editor of your choice. Add the above line vhv.enable = “TRUE”. to the config file. I found that in my file I already had this line and thus, I still had issues.

      2.Then I came across this article: https://www.802101.com/first-steps-unetlab/#comment-94
      In this article I found this line ‘If you haven’t followed the guide on the website, then you will find that the nodes do not start, so please do follow the guides to the letter.’
      I started looking for EVE-NG’s user guide and I came across this: https://www.eve-ng.net/index.php/documentation/howtos/howto-add-cisco-iol-ios-on-linux/

      And I decided to test my IOU/IOL images using the mentioned commands:
      cd /opt/unetlab/addons/iol/bin
      touch NETMAP
      LD_LIBRARY_PATH=/opt/unetlab/addons/iol/lib /opt/unetlab/addons/iol/bin/ 1

      For example: In my case the name of the ios file was i86bi-linux-l2-ipbasek9-15.1g.bin. So the commands were like:
      cd /opt/unetlab/addons/iol/bin
      touch NETMAP
      LD_LIBRARY_PATH=/opt/unetlab/addons/iol/lib /opt/unetlab/addons/iol/bin/i86bi-linux-l2-ipbasek9-15.1g.bin 1

      But I still had issues. Then I went back to the first article that I mentioned in this point 2, which is: https://www.802101.com/first-steps-unetlab/#comment-94
      There’s a line that says:
      The caveat here is that you need to generate the IOU license, I won’t go into details, but it’s easy to google how to do this.

      However, later on, when someone requested, author of this article mentioned:
      Just google “generate iourc license” and look at the github link

      3.Then as last step I googled “generate iourc license” and looked at the github link. Here is the link: https://gist.github.com/paalfe/8edd82f780c650ae2b4a

      In here its mentioned to change the file’s permission and make it executable. I did that using below commands:
      chmod +x CiscoKeyGen.py
      ./CiscoKeyGen.py

      For example: In my case the name of the python file is CiscoIOUKeygen.py. So the commands were like:
      chmod +x CiscoIOUKeygen.py
      ./CiscoIOUKeygen.py

      And………………………
      It did resolve the issue!

  17. man, this blog is fire!!! thank you.

    I had issue 6. I tried the chmod 777 /tmp and chmod g+t /tmp. still didn’t work
    I had to edit my .vmx file to get my ASAv device to work

    so yeah, of you have issue 6, use both solution 1 and 6

  18. Have you applied the IOL license.
    Use eve-ng community version.?
    If above is Yes go for step 1.

    Thanks

  19. Slim Application Error

    The application could not run because of the following error:
    Details
    Type: ErrorException
    Code: 8
    Message: Undefined offset:255
    File: /opt/unetlab/html/includes/api_nodes.php
    Line: 890
    Trace

    #0 /opt/unetlab/html/includes/api_nodes.php(890): Slim\Slim::handleErrors(8, ‘Undefined offse…’, ‘/opt/unetlab/ht…’, 890, Array)
    #1 /opt/unetlab/html/includes/api_nodes.php(100): apiStopLabNode(Object(Lab), ‘3’, 0)
    #2 /opt/unetlab/html/api.php(1241): apiDeleteLabNode(Object(Lab), ‘3’, ‘0’)
    #3 [internal function]: {closure}(Array)
    #4 /opt/unetlab/html/includes/Slim/Route.php(468): call_user_func_array(Object(Closure), Array)
    #5 /opt/unetlab/html/includes/Slim/Slim.php(1357): Slim\Route->dispatch()
    #6 /opt/unetlab/html/includes/Slim/Middleware/Flash.php(85): Slim\Slim->call()
    #7 /opt/unetlab/html/includes/Slim/Middleware/MethodOverride.php(92): Slim\Middleware\Flash->call()
    #8 /opt/unetlab/html/includes/Slim/Middleware/PrettyExceptions.php(67): Slim\Middleware\MethodOverride->call()
    #9 /opt/unetlab/html/includes/Slim/Slim.php(1302): Slim\Middleware\PrettyExceptions->call()
    #10 /opt/unetlab/html/api.php(1585): Slim\Slim->run()
    #11 {main}

    Getting this error whenever i start any nodes in eve-ng, Kindly help me
    my contact number +917411118000

Leave a Reply

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

*