github.com/emc-advanced-dev/unik@v0.0.0-20190717152701-a58d3e8e33b7/docs/providers/virtualbox.md (about)

     1  # Virtualbox UniK Provider
     2  
     3  UniK supports running OSv and rumprun unikernels on Virtualbox.
     4  The virtualbox stub of your `daemon-config.yaml` file should look something like the following:
     5  ```yaml
     6  providers:
     7    #...
     8    virtualbox:
     9      - name: my-vbox
    10        adapter_name: "en0: Wi-Fi (AirPort)"
    11        adapter_type: bridged
    12  ```
    13  or:
    14  ```yaml
    15  providers:
    16    #...
    17    virtualbox:
    18      - name: my-vbox
    19        adapter_name: "vboxnet0"
    20        adapter_type: host_only
    21  ```
    22  Depending on whether you prefer running instances on [HostOnly](https://www.virtualbox.org/manual/ch06.html#network_hostonly) network or [Bridged](https://www.virtualbox.org/manual/ch06.html#network_bridged) mode.
    23  
    24  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.
    25  
    26  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](../instance_listener.md)). UniK will attach a NAT adapter as a second interface to enable Virtualbox instances to reach the internet.
    27  
    28  UniK stores Virtualbox data in the following paths:
    29  * JSON representation of the state: `$HOME/.unik/virtualbox/state.json`
    30  * Images (boot vmdks, copied when an instance is launched): `$HOME/.unik/virtualbox/images/`
    31  * Instances (contains Virtualbox folder for each instance, plus the copy of the original boot image): `$HOME/.unik/virtualbox/instances/`
    32  * Volumes (mountable volumes which will persist after Instances are removed): `$HOME/.unik/virtualbox/volumes/`
    33  
    34  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.