virtualbox

A library to interact with VirtualBox.

npm install virtualbox
3 downloads in the last week
26 downloads in the last month

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

npm loves you