Node-Virtualbox-promise
a Node.js library for managing VirtualBox with promises
Installation
$ npm install virtualbox-promise
API
var
VirtualBox = require('virtualbox-promise');
manage(command, [options])
Execute VBoxManage.
-
command
<Array>
command-line arguments -
options
<Object>
Keys have--
prepended to them. Values follow the keys except when the value istrue
, in which case it's omitted.
Returns a promise with [stdout <Buffer>, stderr <Buffer>]
.
Example:
VirtualBox.manage(['clonevm', "Debian 7.1.0 AMD64"], {
snapshot: "snapshot",
options: 'link',
register: true
}).spread(stdout, stderr) {
console.log(stdout);
});
executes:
$ VBoxManage clonevm "Debian 7.1.0 AMD64" --snapshot snapshot --options link --register
Machine(id)
-
id
<String>
the UUID or name of the virtual machine
Create a new virtual machine object. This does not create a virtual machine in VirtualBox but is used to control new or existing machines.
var debian = new VirtualBox.Machine("Debian 7.1.0 AMD64");
License
Copyright 2013 David Braun
This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU Lesser General Public License along with this program. If not, see http://www.gnu.org/licenses/.