Skip to content

Latest commit

 

History

History
34 lines (29 loc) · 1.89 KB

virtualbox.md

File metadata and controls

34 lines (29 loc) · 1.89 KB

Virtualbox UniK Provider

UniK supports running OSv and rumprun unikernels on Virtualbox. The virtualbox stub of your daemon-config.yaml file should look something like the following:

providers:
  #...
  virtualbox:
    - name: my-vbox
      adapter_name: "en0: Wi-Fi (AirPort)"
      adapter_type: bridged

or:

providers:
  #...
  virtualbox:
    - name: my-vbox
      adapter_name: "vboxnet0"
      adapter_type: host_only

Depending on whether you prefer running instances on HostOnly network or Bridged mode.

If you are running a Host-Only network, make sure DHCP is enabled. See more about configuring Virtualbox networks here: https://www.thomas-krenn.com/en/wiki/Network_Configuration_in_VirtualBox.

We recommend running with HostOnly networking, as it is guaranteed to support UDP broadcast, which is a necessary prequisite for bootstrapping UniK instances (see instance listerner). UniK will attach a NAT adapter as a second interface to enable Virtualbox instances to reach the internet.

UniK stores Virtualbox data in the following paths:

  • JSON representation of the state: $HOME/.unik/virtualbox/state.json
  • Images (boot vmdks, copied when an instance is launched): $HOME/.unik/virtualbox/images/
  • Instances (contains Virtualbox folder for each instance, plus the copy of the original boot image): $HOME/.unik/virtualbox/instances/
  • Volumes (mountable volumes which will persist after Instances are removed): $HOME/.unik/virtualbox/volumes/

If UniK gets into a bad state (i.e. you manually remove a file or Virtualbox VM), you should manually edit the $HOME/.unik/virtualbox/state.json file to remove the instance that no longer exists. UniK will eventually become self-correcting to deal with disruptions in the state.