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-virtualbox

v0.2.4

Published

A lightweight tool/module for provisioning VirtualBox virtual machines.

Downloads

107

Readme

node-virtualbox | dependencies Status

This is a simple tool that helps provision basic VirtualBox virtual machines with sane defaults.

Installation and Usage

Requires node >= 8.X

npm install node-virtualbox [--save] [-g]

Example run:

node bin.js --provision --vmname "hello" --ip 172.168.0.55 --verbose

ssh into instance.

ssh -i config/resources/insecure_private_key -p 2002 -o StrictHostKeyChecking=no -o IdentitiesOnly=yes [email protected]

Default setup

The default VM will have 2 cpus and 1G memory. The default image is based on the latest ubuntu/xenial64 image. The VM has two NICs. The first nic uses NAT to forward incoming and outgoing traffic. The second nic is assigned a private host only network address. After creation, you can login with vagrant/vagrant or ssh with the default insecure_private_key located in config/resources/.

Commands

--list return a list of vm names and uuids.

node bin.js --list

--stop Stop vm with save state.

node bin.js --stop --vmname <name>

--delete Unregister vm and delete all its contents.

node bin.js --delete --vmname <name>

--info Provide information about a vm. This will print out a json string with properties of the specified vm.

For example, running node .\bin.js --info --vmname "vm3" will print the following, which can be used to retrieve properties such as the port that can be used for ssh access:

{ name: '"vm3"',
...
'Forwarding(0)': '"guestssh,tcp,,2002,,22"',
}

Provision options

--cpus Set the number of cpus for VM. Default is 2 (or 1 for micro).

--mem Set the size of ram in MB(e.g., 512 or 1024). Default is 1024 (or 512 for micro).

--ovf Set the box to import when creating vm. If this is omitted, the latest ubuntu-xenial image is downloaded and used.

--ssh_port Set the local port used to forward ssh connections to vm. If this is omitted, then a freely available port between 2002 and 2999 is automatically assigned.

--forward_ports Set the port forwarding rules. Format: "<guest_port>:<host_port>" or "<port>". "<port>" translates to "<port>:<port>".

--sync Set a shared folder. Format: "<host_folder>;<guest_folder>". You can provide multiple of these options.

--add_ssh_key Add public ssh key to ~/.ssh/authorized_keys of the vm.

node bin.js --provision --vmname "shared_folders_vm" --ip 172.16.1.45 --ssh_port 2095 --verbose --sync "C:\Users\chris;/chris" --sync "C:\Users\chris\projects;/projects" --add_ssh_key ~/.ssh/id_rsa.pub

Micro VM

This is for booting micro kernels (custom initramfs inside of an iso)

Example micro VMs (iso):

node bin.js --micro --vmname "micro" --attach_iso <Path>

If you don't specify path to an iso it will download and use an Alpine linux iso.