netvbox
Description
netvbox is a ruby gem designed for limited administration of VirtualBox VMs on networked machines in a Linux environment.
The original use case was for testing Chef recipes without needing (or wanting) to provision (and pay for) cloud resources (e.g. Amazon EC2). Take a few spare machines, install VirtualBox on each, create some snapshots, and you’re ready to go.
netvbox maintains a list of snapshots for VirtualBox VMs, and can easily load all snapshots, power off all VMs, and display VM status information. VMs can be added and removed from the list via the add and remove subcommands.
VM sets
netvbox can manage sets of VirtualBox VMs. You can think of these sets much like rvm gemsets. Say, for example, that you have 5 VirtualBox VMs on various hosts on the network. Sometimes you might want to clean and reinstall things on all 5 VMs. Other times you wish to only reload snapshots on 3 VMs. You can create VM sets to manage sets of VirtualBox VMs, and switch between sets on the fly. See VM set sub-commands in the sub-commands section.
Sub-commands
netvbox uses sub-commands. Below is the help listing.
SUB-COMMANDS
add <ssh host> <username> <password> <vm name> <snapshot name>
adds a vm snapshot on the specified host
list
lists vm snapshots
listips
lists ip addresses of vms with guest additions installed
load
loads vm snapshots
poweroff
powers off all vms
remove <ssh host> <username> <vm name>
removes snapshot of specified vm from management
sshhosts <command>
runs the specified command on host computers
sshguests <ssh user> <ssh password> <command>
runs the specified command on guest vms
status
shows status of vms
VM SET SUB-COMMANDS
createset <set name>
creates a vm set with the specified name
currentset
shows the current vm set in use
listsets
lists all vm sets
removeset <set name>
removes the vm set with the specified name
usedefaultset
uses the default vm set
useset <set name>
uses the vm set with the specified name
* Tip: You will be prompted for input if you leave out sub-command
arguments (e.g. netvbox add)
Changelog
0.0.7
-
Fix: fixed error printouts
0.0.6
-
Breaking: sub-command, remove, no longer requires snapshot name.
-
Feature: can now list the IP addresses of guest VMs with sub-command, listips.
-
Feature: parallel ssh on hosts or guests. currently only supports ssh with password.