VirtualBox Managing an Environment from Command Line: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
 
(6 intermediate revisions by the same user not shown)
Line 2: Line 2:


* [[VirtualBox_Operations#Managing_an_Environment_from_Command_Line|VirtualBox Operations]]
* [[VirtualBox_Operations#Managing_an_Environment_from_Command_Line|VirtualBox Operations]]
* [[VirtualBox CLI#Managing_an_Environment_from_Command_Line]]
* [[VirtualBox_CLI#Managing_an_Environment_from_Command_Line|VirtualBox CLI]]


=Overview=
=Overview=


For more details on starting a VM from command line, see {{Internal|VirtualBox_CLI#Starting_VMs_from_Command_Line|Starting VMs from Command Line}}
A set of scripts that wrap around the VirtualBox CLI and manage an environment can be found here:


=Start an Environment=
To instrument an environment, copy [https://github.com/NovaOrdis/playground/blob/master/VirtualBox/envc envc] and [https://github.com/NovaOrdis/playground/blob/master/VirtualBox/functions functions] (or set PLAYGROUND_HOME) in the environment's management directory, and modify env, updating the environment topology and the start/stop/status functions.
 
Then:


<pre>
<pre>
VBoxManage startvm lb.modcluster.local --type headless
envc status|start|stop
VBoxManage startvm ap1.modcluster.local --type headless
VBoxManage startvm ap2.modcluster.local --type headless
</pre>
</pre>


=Stop an Environment=
=GitHub=


<pre>
{{External|https://github.com/NovaOrdis/playground/tree/master/VirtualBox}}
ssh -o ConnectTimeout=1 -t root@172.20.2.43 sudo -n init 0
ssh -o ConnectTimeout=1 -t root@172.20.2.42 sudo -n init 0
ssh -o ConnectTimeout=1 -t root@172.20.2.41 sudo -n init 0
</pre>

Latest revision as of 18:53, 24 May 2017

Internal

Overview

A set of scripts that wrap around the VirtualBox CLI and manage an environment can be found here:

To instrument an environment, copy envc and functions (or set PLAYGROUND_HOME) in the environment's management directory, and modify env, updating the environment topology and the start/stop/status functions.

Then:

envc status|start|stop

GitHub

https://github.com/NovaOrdis/playground/tree/master/VirtualBox