Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

A JavaScript Library for Interacting with VirtualBox

branch: master
README.md

node-virtualbox

A JavaScript library to interact with Virtualbox.

Installation

$ npm install virtualbox

Examples

Starting and Running a program

var virtualbox = require('virtualbox');

virtualbox.start("Win32", function(error){

  if(error) throw error;

  console.log('VM "w7" has been successfully started');

  virtualbox.exec({ vm: "win32", cmd: "C:\\Program Files\\Internet Explorer\\iexplore.exe", params: "http://google.com" },  function(error){

    if(error) throw error;

    console.log('Running Internet Explorer...');

  });

});

Executing commands as Administrators

Pass username and password information within options;

virtualbox.exec({ vm: "ie8", "user":"Administrator", "password": 123456" ...

Available Methods

  • start
  • stop
  • exec
  • reset
  • pause
  • resume

Troubleshooting

  • Make sure that Guest account is enabled on the VM.
  • It starts VMs headlessly by default. If you're having trouble with executing a command, start the VM with GUI and observe the screen after executing same command.
  • To avoid having "Concurrent guest process limit is reached" error message, execute your commands as an administrator.

Example Uses

Something went wrong with that request. Please try again.