Socket
Socket
Sign inDemoInstall

virtualbox-soap

Package Overview
Dependencies
48
Maintainers
3
Versions
10
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    virtualbox-soap

A wrapper for the SOAP API of Virtual Box.


Version published
Weekly downloads
5
increased by25%
Maintainers
3
Install size
8.44 MB
Created
Weekly downloads
 

Readme

Source

virtualbox-soap

npm

virtualbox-soap allows to easily use the VirtualBox API from nodejs.

It is designed to connect to VirtualBox through the SOAP protocol (over HTTP), which means that the VBoxWebSrv executable (which is included with VirtualBox) needs to be started on the machine where VirtualBox is installed.

Getting started

Install virtualbox-soap from the npm repository:

npm install virtualbox-soap

Start VBoxWebSrv on your local machine:

VBoxWebSrv -a null

Then you can try and adapt the following code sample to start a virtual machine:

import * as virtualbox from "virtualbox-soap";

(async function () {
    try {
        const serverURL = "http://localhost:18083"; // This url is the default one, it can be omitted
        const websessionManager = await virtualbox.connect(serverURL);
        const vbox = await websessionManager.logon("username", "password");
        const machine = await vbox.findMachine("myMachineNameOrId");
        const session = await websessionManager.getSessionObject(vbox);
        const progress = await machine.launchVMProcess(session);
        await progress.waitForCompletion(-1);
        const machineState = await machine.getState();
        console.log(`The virtual machine is ${machineState}`);
        // ...
    } catch (error) {
        console.error(error + "");
    }
})();

Documentation

The API exactly follows the documentation from VirtualBox. Here are some useful entry points:

FAQs

Last updated on 12 Oct 2022

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc