Virtual Box

You can use Ops to run your local nanos in Virtual Box. You can use Ops CLI to create a .vdi image and launch a virtual machine with the image.

Pre-requisites

  1. Install Virtual Box in your machine.

  2. Ensure VBoxManage is in your shell path.

Note: If you are using WSL you may need to create a symlink in Windows filesystem with the name VBoxManage pointing to VBoxManage.exe.

Image Operations

Create Image

You can create an image with the following command.

$ ops image create <elf_file> -i <image_name> -t vbox

For creating an image using a particular package, you need to provide the package name to ops image create command with --package option.

$ ops image create -c config.json --package eyberg/node:20.5.0 -a hi.js -i js -t vbox

The Ops CLI will store the image in the directory vdi-images inside Ops default directory.

List Images

You can list existing images with ops image list -t vbox.

Delete Image

ops image delete <imagename> can be used to delete an image.

Instance Operations

Create Instance

After creating the image, we can launch a virtual machine from an existing image.

List Instances

You can list the virtual machines running on Virtual Box using ops instance list command.

Get Logs for Instance

Delete Instance

ops instance delete command can be used to delete a virtual machine.

Last updated

Was this helpful?