The console and scripts
Started from a terminal, Virtualbricks reads the commands of its
console there, beside the windows, unless you give --no-term. With --no-gui it
runs without the windows, and the console is the way in: a lab on a
computer without a display.
A command is a noun, a verb, then its arguments:
brick new switch
brick set vm1 memory=1024 cpus=2
brick start sw1 vm1
event start lab
status
The nouns are brick, event, image, setting and project. help lists the commands, and help brick set explains one. Tab completes
the words, the names and the keys, and the history is kept between
runs.
Every command and option is in virtualbricks(1).
Scripts
A file of commands, one a line, runs with source file in the console, or with virtualbricks --run file at start: a lab set up the same way every time. The first error stops the file and says which line. An event can run a command of the console too; see Events.
From another terminal
Started with --listen, Virtualbricks takes
commands from other terminals and scripts:
virtualbricks --listen
virtualbricks --command brick start sw1
virtualbricks --connect --run start-lab.vb
The answer goes to the standard output, and the exit status says if the command was done.
See also
A lab on another computer, with its windows on your desktop.
Start a lab in order, start bricks along with another, run commands.