Parallel unikernel instances


Is it possible to run multiple unikernels on the same machine and have a broadcast to all these unikernels?

One thing that I tried was to use DHCP server to allocate an IP address to unikernel. But I am not able to run more than one instance on the same host.

1 Like

Are the MAC addresses different for each unikernel?

I am not setting the mac address anywhere.

   open Dhcp_wire

let ip = Ipaddr.V4.of_string_exn
let net = Ipaddr.V4.Prefix.of_string_exn
let mac = Macaddr.of_string_exn

let hostname =           "charrua-dhcp-server"
let default_lease_time = 60 * 60 * 1 (* 1 hour *)
let max_lease_time =     60 * 60 * 24 (* A day *)
let ip_address =         ip ""
let network =            net ""
let range =              Some (ip "", ip "")
(* List of dhcp options to be advertised *)
let options = [
  (* Routers is a list of default routers *)
  Routers [ip ""];
  (* Dns_servers is a list of dns servers *)
  Dns_servers [ip ""; (* ip "" *)];
  (* Ntp_servers is a list of ntp servers, Time_servers (old protocol) is also available *)
  (* Ntp_servers [ip ""]; *)
  Domain_name "pampas";
   * Check dhcp_wire.mli for the other options:

 * Static hosts configuration, list options will be merged with global ones
 * while non-list options will override the global, example: options `Routers',
 * `Dns_servers', `Ntp_servers' will always be merged; `Domain_name',
 * `Time_offset', `Max_datagram; will always override the global (if present).

let hosts = []

Using the above configuration , I am running the unikernel on IP I want to run assay 50 instances of the same unikernel code parallelly and create a broadcast from the server to all these 50 instances.

1 Like

May be you don’t know but albatross is a tool to deploy a MirageOS with Solo5/KVM (one possible target of MirageOS). From it, it’s possible to deploy several unikernels such as:

$ mirage configure -t hvt
$ mirage build
$ albatross-client-local create my-unikernel --net=service my-unikernel.hvt --arg='--ipv4=' ...

Such way to deploy your unikernels depends on your infrastructure obviously (on my case, I have a bridge service and my TAP interfaces are bound to this bridge). However, I’m not an user of charrua, so I can not tell how to use this library to provide a DHCP service - but I suspect that it is possible.