A JavaScript library to interact with Virtualbox.
$ npm install virtualbox
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...');
});
});
Pass username and password information within options;
virtualbox.exec({ vm: "ie8", "user":"Administrator", "password": 123456" ...
- start
- stop
- exec
- reset
- pause
- resume
- 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.