Page 1 of 1

Start lab from cli

Posted: Thu Jul 06, 2017 12:30 pm
by tcpip
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.

Re: Start lab from cli

Posted: Thu Jul 06, 2017 12:33 pm
by ecze

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)

Re: Start lab from cli

Posted: Thu Jul 06, 2017 2:04 pm
by tcpip
Thanks!!!!!

Re: Start lab from cli

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

Im execuring

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

but no luck

thanks in advance.

Re: Start lab from cli

Posted: Mon Jan 01, 2018 2:49 pm
by ramindia
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!

Re: Start lab from cli

Posted: Mon Jan 01, 2018 2:56 pm
by tcpip
file not found, i but the lab is there, i can start it via gui with no issues.

Re: Start lab from cli

Posted: Tue Jan 02, 2018 12:01 am
by tcpip
/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).

Re: Start lab from cli

Posted: Tue Jan 02, 2018 7:12 pm
by breakintheweb
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

Re: Start lab from cli

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


thansk

Re: Start lab from cli

Posted: Thu Jan 04, 2018 8:20 am
by breakintheweb
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.