A lightweight tool/module for provisioning and configuring VirtualBox virtual machines.
Branch: master
Clone or download
dependabot and ssmirr build(deps): Bump ssh2 from 0.6.2 to 0.8.2 (#15)
Bumps [ssh2](https://github.com/mscdex/ssh2) from 0.6.2 to 0.8.2.

- [`706906a`](mscdex/ssh2@706906a) bump version
- [`efc3423`](mscdex/ssh2@efc3423) bump version
- [`e22b361`](mscdex/ssh2@e22b361) bump version
- [`a3c9768`](mscdex/ssh2@a3c9768) Client: support localAddress and localPort config options
- [`93ea76b`](mscdex/ssh2@93ea76b) Server: provide client socket family and port number
- [`7167e60`](mscdex/ssh2@7167e60) readme: add valid authentication method names
- [`817b689`](mscdex/ssh2@817b689) test: correct assertion message
- [`14aa624`](mscdex/ssh2@14aa624) Agent: assume Windows pipe path is an ssh-agent socket
- [`40524b6`](mscdex/ssh2@40524b6) package: bump ssh2-streams dep version
- [`383e829`](mscdex/ssh2@383e829) Client: support custom X11 protocol and cookie
- Additional commits viewable in [compare view](mscdex/ssh2@v0.6.2...v0.8.2)
<br />

[![Dependabot compatibility score](https://api.dependabot.com/badges/compatibility_score?dependency-name=ssh2&package-manager=npm_and_yarn&previous-version=0.6.2&new-version=0.8.2)](https://dependabot.com/compatibility-score.html?dependency-name=ssh2&package-manager=npm_and_yarn&previous-version=0.6.2&new-version=0.8.2)

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)


<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot ignore this [patch|minor|major] version` will close this PR and stop Dependabot creating any more for this minor/major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
- `@dependabot use these labels` will set the current labels as the default for future PRs for this repo and language
- `@dependabot use these reviewers` will set the current reviewers as the default for future PRs for this repo and language
- `@dependabot use these assignees` will set the current assignees as the default for future PRs for this repo and language
- `@dependabot use this milestone` will set the current milestone as the default for future PRs for this repo and language
- `@dependabot badge me` will comment on this PR with code to add a "Dependabot enabled" badge to your readme

Additionally, you can set the following in your Dependabot [dashboard](https://app.dependabot.com):
- Update frequency (including time of day and day of week)
- Automerge options (never/patch/minor, and dev/runtime dependencies)
- Pull request limits (per update run and/or open at any time)
- Out-of-range updates (receive only lockfile updates, if desired)
- Security updates (receive only security updates, if desired)

Finally, you can contact us by mentioning @dependabot.

Latest commit 59efe6e Feb 20, 2019
Type Name Latest commit message Commit time
Failed to load latest commit information.
config Add micro test; fix missing await. Jul 26, 2018
test/integration Disk support. Jul 26, 2018
CHANGELOG.md chore(release): 0.1.35 Feb 13, 2019
bin.js Enable runtime port exposure. Aug 12, 2018
create.sh Use smarter box discovery. Jul 18, 2018
index.js Progress when downloading ubuntu box; reduce output fo r delete/stop Aug 28, 2018
package-lock.json build(deps): Bump ssh2 from 0.6.2 to 0.8.2 (#15) Feb 20, 2019
package.json build(deps): Bump ssh2 from 0.6.2 to 0.8.2 (#15) Feb 20, 2019


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

ssh into instance.

ssh -i config/resources/insecure_private_key -p 2002 -o StrictHostKeyChecking=no -o IdentitiesOnly=yes vagrant@

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/.


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