Text

Veewee considerably simplifies the process of creating base distribution images for use with Vagrant, but unfortunately you have to choose between using the easy to install gem (which comes with horribly out of date basebox templates), or install the latest version from source, which unfortunately uses rvm in a pretty repugnant way.

So, if you want to use veewee to setup a new amd64 Precise Pangolin basebox for vagrant, you either have to pull the latest veewee sources from github, or download the most recent releases templates and copy them over into your veewee gem folder.

This is where veewee-templates-update steps in, it automates that latter step (downloading and installing just the updated templates) for you.

Installation is simple:

$ gem install veewee-templates-update
  

Then, just run the updater:

$ veewee-templates-update
  > Veewee: /home/aaron/.rvm/gems/ruby-1.9.3-p194/gems/veewee-0.2.3
  > Downloading: https://github.com/jedi4ever/veewee/tarball/master
  > Extracting: CentOS-4.8-i386 CentOS-5.5-i386-netboot CentOS-5.5-x86_64-netboot 
  > ...
  
  $ vagrant basebox define precise-amd64 ubuntu-12.04-server-amd64
  > ...
  > (profit)
  
Text

I have been working with VirtualBox and vagrant a lot today and found myself having to double check the VBoxManage CLI syntax a number of times. So I'm dumping a quick cheatsheet down to help remember it / help anyone else wanting to efficiently manage VBox VMs.

Start a VM

VBoxManage startvm "Name of VM" --type headless|gui
  

Forcibly Shutdown a VM

VBoxManage controlvm "Name of VM" poweroff
  

List VMs

VBoxManage list vms
  

Unregister/delete a VM

VBoxManage unregistervm "Name of VM" --delete
  

Forward / Unforward Ports for SSH

Modifyvm must be only be used when VM is powered off, otherwise controlvm for running VMs.

VBoxManage modifyvm "VM name" --natpf1 "guestssh,tcp,,2222,,22"
  VBoxManage modifyvm "VM name" --natpf1 delete "guestssh"