Start lab from cli

Moderator: mike

Post Reply
tcpip
Posts: 86
Joined: Thu Jun 15, 2017 10:09 am

Start lab from cli

Post by tcpip » Thu Jul 06, 2017 12:30 pm

Hi all,

I have my lab but sometimes I don't have access to the GUI to start it up, is there any way I can do this via cli?

Thanks.

ecze
Posts: 533
Joined: Wed Mar 15, 2017 1:54 pm

Re: Start lab from cli

Post by ecze » Thu Jul 06, 2017 12:33 pm

Code: Select all

root@eve-ng:~# /opt/unetlab/wrappers/unl_wrapper

Usage: /opt/unetlab/wrappers/unl_wrapper -a <action> <options>
-a <s>     Action can be:
           - delete: delete a lab file even if it's not valid
                     requires -T, -F
           - export: export a runnign-config to a file
                     requires -T, -F, -D is optional
           - fixpermissions: fix file/dir permissions
           - platform: print the hardware platform
           - start: start one or all nodes
                     requires -T, -F, -D is optional
           - stop: stop one or all nodes
                     requires -T, -F, -D is optional
           - wipe: wipe one or all nodes
                     requires -T, -F, -D is optional
Options:
-F <n>     Lab file
-T <n>     Tenant ID
-D <n>     Device ID (if not used, all devices will be impacted)

tcpip
Posts: 86
Joined: Thu Jun 15, 2017 10:09 am

Re: Start lab from cli

Post by tcpip » Thu Jul 06, 2017 2:04 pm

Thanks!!!!!

tcpip
Posts: 86
Joined: Thu Jun 15, 2017 10:09 am

Re: Start lab from cli

Post by tcpip » Sun Dec 31, 2017 5:35 pm

HI all

Im execuring

/opt/unetlab/wrappers/unl_wrapper -a start -T 0 -F /Kirk/DHCP.unl

but no luck

thanks in advance.

ramindia
Posts: 409
Joined: Sun Mar 19, 2017 10:27 pm

Re: Start lab from cli

Post by ramindia » Mon Jan 01, 2018 2:49 pm

tcpip wrote:
Sun Dec 31, 2017 5:35 pm
HI all

Im execuring

/opt/unetlab/wrappers/unl_wrapper -a start -T 0 -F /Kirk/DHCP.unl

but no luck

thanks in advance.
what is the errors ?

R!

tcpip
Posts: 86
Joined: Thu Jun 15, 2017 10:09 am

Re: Start lab from cli

Post by tcpip » Mon Jan 01, 2018 2:56 pm

file not found, i but the lab is there, i can start it via gui with no issues.

tcpip
Posts: 86
Joined: Thu Jun 15, 2017 10:09 am

Re: Start lab from cli

Post by tcpip » Tue Jan 02, 2018 12:01 am

/opt/unetlab/wrappers/unl_wrapper -a start -T 0 -F Python.unl

Jan 02 01:00:24 ERROR: Python.unl Cannot load lab, invalid folder (20002).
Jan 02 01:00:24 Jan 02 01:00:24 ERROR: Cannot load lab, invalid folder (20002).
Jan 02 01:00:24 Jan 02 01:00:24 ERROR: Lab file is not valid (7).

breakintheweb
Posts: 10
Joined: Fri Sep 01, 2017 12:25 pm

Re: Start lab from cli

Post by breakintheweb » Tue Jan 02, 2018 7:12 pm

tcpip wrote:
Tue Jan 02, 2018 12:01 am
/opt/unetlab/wrappers/unl_wrapper -a start -T 0 -F Python.unl

Jan 02 01:00:24 ERROR: Python.unl Cannot load lab, invalid folder (20002).
Jan 02 01:00:24 Jan 02 01:00:24 ERROR: Cannot load lab, invalid folder (20002).
Jan 02 01:00:24 Jan 02 01:00:24 ERROR: Lab file is not valid (7).
Try with the full path to the .unl

/opt/unetlab/wrappers/unl_wrapper -a start -T 0 -F /opt/unetlab/labs/Python.unl

tcpip
Posts: 86
Joined: Thu Jun 15, 2017 10:09 am

Re: Start lab from cli

Post by tcpip » Wed Jan 03, 2018 8:58 pm

Thanks thats working , only one thing I was executing the comand in the same folder where the .unl files are.


thansk

breakintheweb
Posts: 10
Joined: Fri Sep 01, 2017 12:25 pm

Re: Start lab from cli

Post by breakintheweb » Thu Jan 04, 2018 8:20 am

tcpip wrote:
Wed Jan 03, 2018 8:58 pm
Thanks thats working , only one thing I was executing the comand in the same folder where the .unl files are.


thansk
unl_wrapper dosen't start the nodes directly but instead calls another script/binary that does. This script/binary may be looking in it's directory for the unl file if you don't specify the full path.

Post Reply