3.2. Adding, Installing and Booting VMs

In the common case, you will execute three Rocks commands over the lifetime of your VMs: add (to add VM info to the database), create (to install a newly added VM) and start (to boot an installed VM).

To add a VM to the system, you need to associate a VM with a physical machine (i.e., a VM container) and you need to assign an appliance type to the VM. Here's an example:

# rocks add host vm vm-container-0-0 membership="Compute"

The above command will output a message similar to:

added VM on node "vm-container-0-0" slice "0" with vm_name "compute-0-0-0"

This tells us that, in the database, the compute VM named "compute-0-0-0" has been assigned to the physical machine "vm-container-0-0".

The next step is to install the VM.

VMs are installed with the create command. Here's how to install the VM that was added above:

# rocks create host vm compute-0-0-0

The above command will start the standard Rocks installation process for the VM named "compute-0-0-0". After the installation process initializes the network inside the VM, you can monitor the installation just like a physical machine installation by executing:

# rocks-console compute-0-0-0

After the installation completes, you can boot the VM by executing:

# rocks start host vm compute-0-0-0

After the VM boots, you can interact with the VM just like any other physical machine.