Skip to content
This repository

Create and modify virtual machines in VirtualBox using pure ruby.

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 docs Merge in the native interfacing branch. Gem now uses the native inter… April 08, 2010
Octocat-spinner-32 lib
Octocat-spinner-32 test
Octocat-spinner-32 .gitignore
Octocat-spinner-32 .yardopts
Octocat-spinner-32 Gemfile
Octocat-spinner-32 LICENSE MIT License January 29, 2010
Octocat-spinner-32 Rakefile
Octocat-spinner-32 Readme.md
Octocat-spinner-32 TODO
Octocat-spinner-32 VERSION
Octocat-spinner-32 virtualbox.gemspec
Readme.md

VirtualBox Ruby Gem

The VirtualBox ruby gem is a library which allows anyone to control VirtualBox from ruby code! Create, destroy, start, stop, suspend, and resume virtual machines. Also list virtual machines, list hard drives, network devices, etc.

Installation and Requirements

First you need to install VirtualBox which is available for Windows, Linux, and OS X. After installation, install the gem:

sudo gem install virtualbox

The gem uses the native COM interface with VirtualBox provides to communicate with VirtualBox. On Windows, this is globally available. On Linux-based machines, the gem uses Ruby-FFI to talk to a dynamic library. No configuration should be necessary.

Basic Usage

The virtualbox gem is modeled after ActiveRecord. If you've used ActiveRecord, you'll feel very comfortable using the virtualbox gem.

There is a quick getting started guide to get you acquainted with the conventions of the virtualbox gem.

Complete documentation can be found at http://mitchellh.github.com/virtualbox.

Below are some examples:

require 'virtualbox'

vm = VirtualBox::VM.find("my-vm")

# Let's first print out some basic info about the VM
puts "Memory: #{vm.memory_size}"

# Let's modify the memory and name...
vm.memory_size = 360
vm.name = "my-renamed-vm"

# Save it!
vm.save

Known Issues or Uncompleted Features

VirtualBox has a ton of features! As such, this gem is still not totally complete. You can see the features that are still left to do in the TODO file.

Reporting Bugs or Feature Requests

Please use the issue tracker.

Contributing

If you'd like to contribute to VirtualBox, the first step to developing is to clone this repo, get bundler if you don't have it already, and do the following:

bundle install
bundle lock
rake

This will run the test suite, which should come back all green! Then you're good to go!

Special Thanks

These folks went above and beyond with contributions to the virtualbox gem, and for that, I have to say "thanks!"

Something went wrong with that request. Please try again.