{"id":15099712,"url":"https://github.com/ottomatica/node-virtualbox","last_synced_at":"2025-04-15T00:30:43.415Z","repository":{"id":32753439,"uuid":"141486074","full_name":"ottomatica/node-virtualbox","owner":"ottomatica","description":"📦🚀A lightweight tool/module for provisioning and configuring VirtualBox virtual machines.","archived":false,"fork":false,"pushed_at":"2022-12-30T17:13:34.000Z","size":419,"stargazers_count":14,"open_issues_count":23,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-28T12:21:19.695Z","etag":null,"topics":["nodejs","vagrant","virtualbox"],"latest_commit_sha":null,"homepage":"https://getbaker.io","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ottomatica.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-07-18T20:23:05.000Z","updated_at":"2022-03-27T22:01:31.000Z","dependencies_parsed_at":"2023-01-14T22:07:45.047Z","dependency_job_id":null,"html_url":"https://github.com/ottomatica/node-virtualbox","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ottomatica%2Fnode-virtualbox","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ottomatica%2Fnode-virtualbox/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ottomatica%2Fnode-virtualbox/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ottomatica%2Fnode-virtualbox/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ottomatica","download_url":"https://codeload.github.com/ottomatica/node-virtualbox/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248983926,"owners_count":21193665,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["nodejs","vagrant","virtualbox"],"created_at":"2024-09-25T17:26:32.111Z","updated_at":"2025-04-15T00:30:43.397Z","avatar_url":"https://github.com/ottomatica.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# node-virtualbox | [![dependencies Status](https://david-dm.org/ottomatica/node-virtualbox/status.svg)](https://david-dm.org/ottomatica/node-virtualbox)\n\nThis is a simple tool that helps provision basic VirtualBox virtual machines with sane defaults.\n\n### Installation and Usage\n\nRequires node \u003e= 8.X\n\n```\nnpm install node-virtualbox [--save] [-g]\n```\n\nExample run:\n\n``` bash\nnode bin.js --provision --vmname \"hello\" --ip 172.168.0.55 --verbose\n```\n\nssh into instance.\n```\nssh -i config/resources/insecure_private_key -p 2002 -o StrictHostKeyChecking=no -o IdentitiesOnly=yes vagrant@127.0.0.1\n```\n\n### Default setup\n\nThe default VM will have 2 cpus and 1G memory. The default image is based on the latest [ubuntu/xenial64](https://cloud-images.ubuntu.com/xenial/current/) 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/`.\n\n### Commands\n\n`--list` return a list of vm names and uuids.\n\n```\nnode bin.js --list\n```\n\n`--stop` Stop vm with save state.\n\n```\nnode bin.js --stop --vmname \u003cname\u003e\n```\n\n`--delete` Unregister vm and delete all its contents.\n\n```\nnode bin.js --delete --vmname \u003cname\u003e\n```\n\n`--info` Provide information about a vm. This will print out a json string with properties of the specified vm. \n\nFor 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:\n\n```\n{ name: '\"vm3\"',\n...\n'Forwarding(0)': '\"guestssh,tcp,,2002,,22\"',\n}\n```\n\n### Provision options\n\n`--cpus` Set the number of cpus for VM. Default is 2 (or 1 for micro).\n\n`--mem` Set the size of ram in MB(e.g., 512 or 1024). Default is 1024 (or 512 for micro).\n\n`--ovf` Set the box to import when creating vm. If this is omitted, the latest ubuntu-xenial image is downloaded and used.\n\n`--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.\n\n`--forward_ports` Set the port forwarding rules. Format: `\"\u003cguest_port\u003e:\u003chost_port\u003e\"` or `\"\u003cport\u003e\"`. `\"\u003cport\u003e\"` translates to `\"\u003cport\u003e:\u003cport\u003e\"`.\n\n`--sync` Set a shared folder. Format: `\"\u003chost_folder\u003e;\u003cguest_folder\u003e\"`. You can provide multiple of these options.\n\n`--add_ssh_key` Add public ssh key to ~/.ssh/authorized_keys of the vm.\n```\nnode 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\n```\n\n### Micro VM\nThis is for booting micro kernels (custom initramfs inside of an iso)\n\nExample micro VMs (iso):\n``` bash\nnode bin.js --micro --vmname \"micro\" --attach_iso \u003cPath\u003e\n```\n\nIf you don't specify path to an iso it will download and use an Alpine linux iso.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fottomatica%2Fnode-virtualbox","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fottomatica%2Fnode-virtualbox","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fottomatica%2Fnode-virtualbox/lists"}