npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

node-vbox

v0.1.7

Published

Interact with virtualbox from nodejs

Downloads

17

Readme

NodeVBox

Interact with virtualbox from nodejs using promises.

Installation

Obtain the package

$ npm install node-vbox [--save] [-g]

Import package

  const nodevbox = require('node-vbox');

Usage

Example


  const nodevbox = require('node-vbox');

  nodevbox.list().then(vms => {
      console.log(vms);
  }).catch(error => {
      console.log(error);
  });

More examples can be found on the test folder

All methods

nodevbox

  • version() Returns the current vbox version

  • hostInformation() Returns information about the host running vbox

  • systemProps() Returns vbox system infomation

  • .create(vmname, ostype) Creates a new VM. Returns it's uuid. Check vboxmanage list ostypes for ostypes

  • .start(uuid|vmname, gui) Starts a headless vm by default, to start with gui, pass true as second arguemtn

  • .stop(uuid|vmname) Stops a VM

  • .save(uuid|vmname) Saves the state of the vm

  • .clone(uuid|vmname, newvmname) Clones a vm

  • .screenshot(uuid|vmname, path) Takes a screenshot of a vm and saves it to path

  • .setVrRam(uuid|vmname, ram) Changes vm ram amount (In mb)

  • .bootOrder(uuid|vmname, boot1, boot2, boot3, boot4) Changes vm boot order. Valid options are none|floppy|dvd|disk|net

  • .isRunning(uuid|vmname) Returns whatever a vm is running or not

  • .getRunning() Returns a list of all running vms

  • .list() Returns a list of all vms

  • .vmInfo(uuid|vmname) Returns a list of vm properties

  • .rdp

    • .enableRdpAuth() Sets VBoxAuthSimple as the vbox rdp auth library
    • .authType(uuid|vmname, null|external|guest) Changes the vm rdp auth type
    • .setRdpStatus(uuid|vmname, true|false) Enables or disabled RDP for a specific vm
    • .setPort(uuid|vmname, port) Sets the port in which the vm can be accessed via rdp
    • .addUser(uuid|vmname, username, password) Creates a new RDP user on the vm
    • .removeUser(uuid|vmname, username) Deleted a rdp user from the specified vm
    • .listUsers(uuid|vmname) Lists all users that can connect to a vm via RDP
  • .snapshots

    • .take(uuid|vmname, name, desc) Takes a snapshots from a vm, with name and optional description
    • .restore(uuid|vmname, name) Restores the specified snapshot
    • .list(uuid|vmname) List all snapshots for a vm
    • .delete(uuid|vmname, name) Deletes a created snapshot
  • .metrics

    • .enable(uuid|vmname) Enables metrics collection on a vm
    • .disable(uuid|vmname) Disables metrics collection on a vm
    • .query(uuid|vmname) Returns metrics for a vm
  • .storage

    • .listAllVdi() Lists all created VDI disks
    • .listMounted(uuid|vmname) Lists all disks on a vm by controller
    • .attachVdi(uuid|vmname, path, storagectl, device, port) Adds vdi to vm (Default SATA controller, port 0, device 0)
    • .attachISO(uuid|vmname, path, storagectl, device, port) Adds iso to vm (Default IDE controller, port 0, device 0)
    • .detach(uuid|vmname, storagectl, device, port) Detaches device on storagectl, port, device of a vm
    • .resizeVdi(uuid|vdipath, newsize) Resizes vdi to newsize in MB
    • .createVdi(path, size) Creates a new vdi file

License

MIT