MirageOS is a library operating system that constructs unikernels
ISC License
Bot releases are visible (Hide)
Published by yomimono over 7 years ago
ukvm
and virtio
(see https://mirage.io/blog/introducing-solo5), which allow unikernels to run on KVM hypervisors and on FreeBSD via bhyve, are now available in the mainline mirage
package. These targets use a newly refactored freestanding OCaml runtime (see https://github.com/mirage/ocaml-freestanding).V1
and V1_LWT
modules, which contained module type definitions agreed upon by implementations used in mirage
, have been renamed to Mirage_types
and Mirage_types_lwt
. The module type definitions themselves are no longer contained in this repository, but have been moved to their own independently-versioned repositories and are merely referenced from Mirage_types
and Mirage_types_lwt
. Users are encouraged to refer to the module types directly (e.g., Mirage_block_lwt.S
instead of Mirage_types_lwt.BLOCK
), and depend on the corresponding packages.result
type and a set of polymorphic variants representing common errors that might occur. Individual implementations may extend this set, and users can always count on the provided module to provide a pretty-printer for these errors.CLOCK
module type has been replaced with PCLOCK
and MCLOCK
, which represent a POSIX-style wall clock and a monotonically-increasing clock respectively. The Mirage
module provides default_posix_clock
and default_monotonic_clock
for getting an impl
of each clock. Existing functions which took a clock impl
argument now take an mclock impl
wherever this is reasonable (in practice, everywhere except for logs
).mirage-types-lwt
is now its own opam package, rather than an optionally installed sub-library bundled with mirage-types
.mirage configure
no longer automatically attempts to install packages. Rather, it generates a .opam
file representing the dependencies that have been discovered based on the config.ml
and the arguments passed to mirage configure
. Running make depend
against the Makefile generated by mirage configure
will attempt to install these dependencies via opam.odig
.mirage
and many other libraries has been changed from OASIS to topkg
.Mirage
moduleMirage.register
and Mirage.foreign
no longer take a libraries
argument. Their packages
argument is now of type Functoria.package list
, and the library
information is included in package
.connect
functions provided by individual implementations are no longer expected to return a t result
or Ok t
by the mirage
front-end tool's code generation. Rather, they are expected to raise an exception on failure and return the value directly on success.random
impls are now available - stdlib_random
, which wraps the OCaml Random
module, and nocrypto_random
, which is a passthrough to the Fortuna PRNG implemented in the nocrypto library. default_random
is available for accessing stdlib_random
by default, but can be told to use nocrypto_random
at compile or runtime via the prng
key.syslog
implementation is usable from mirage
. Construct a record of type Mirage.syslog_config
and call Mirage.syslog_udp
, Mirage.syslog_tcp
, or Mirage.syslog_tls
to obtain a syslog impl
.mirage-qubes
library are now included: Mirage.qubes_ipv4_stack
and Mirage.ipv4_qubes
, as well as Mirage.default_qubesdb
. Unikernels which are built with these functions will fail unless mirage configure
is invoked with -t qubes
.Mirage.tap0
has been renamed to Mirage.default_network
and now works as expected on Xen targets.Mirage.farp
is available as an alternative to Mirage.arp
, and will use https://github.com/hannesm/arp instead of the ARP implementation in mirage-tcpip.Mirage.ipv4_config
and Mirage.ipv6_config
types have been changed to reflect reasonable configuration assumptions rather than attempt to mirror one another's structure.Mirage.create_ipv4
now takes ethernet impl
and arpv4 impl
arguments, rather than creating an ipv4 impl
directly from a network impl
and hiding the intermediate ethernet
and arpv4
from the caller.Mirage.create_ipv6
now takes an ethernet impl
argument rather than a network impl
argument.Mirage.default_ipv4
has been removed.Mirage.direct_udp
now takes an optional random impl
argument.stackv4 impl
now take an ipv4 impl
argument instead of a network impl
.Mirage.direct_stackv4_with_default_ipv4
and direct_stackv4_with_static_ipv4
no longer exist. Instead, consider using direct_stackv4
, static_ipv4_stack
, or dhcp_ipv4_stack
.console impl
argument no longer do so.Mirage.get_mode
, Mirage.add_to_opam_packages
, and Mirage.add_to_ocamlfind_libraries
have been removed (as warned in the 2.9.1 release).Mirage_key
moduleMirage_key.is_xen
has been removed and Mirage_key.is_unix
added, as that is the more exceptional case.Mirage_key.ipv4
is now an (Ipaddr.V4.Prefix.t * Ipaddr.V4.t)
converter. For an Ipaddr.V4.t converter
, use the new Mirage_key.ipv4_address
.Mirage_key.mode
is available for referring to the set of polymorphic variants including Unix, Xen, MacOSX, Ukvm, Virtio, and Qubes.Mirage_key.no_ocaml_check
has been removed.Mirage_key.kv_ro
may now produce a direct
key in addition to Archive
, Crunch
, and Fat
keys.Mirage_key.prng
is available for choosing between the standard library and nocrypto random implementations.Mirage_key.network
has been renamed to Mirage_key.interface
, as network
has been repurposed in the Mirage_key.V4
and Mirage_key.V6
modules.Mirage_key.V4.ip
and Mirage_key.V4.netmask
have been replaced with Mirage_key.V4.network
, which treats the IP and netmask as a single item.Mirage_key.V4.gateways
has been replaced with Mirage_key.V4.gateway
, which is a t option
instead of the previous t list
.Mirage_key.V6.ip
and Mirage_key.V6.netmask
have been replaced with Mirage_key.V6.ips
and Mirage_key.V6.netmasks
respectively, which accept lists instead of single items.mirage
format
function and Format_unknown
error have been removed from the FS module type in mirage-fs
.read_stream
, io_stream
, and read_until
have been removed from the CHANNEL module type in mirage-channel
.log
has been removed from the CONSOLE module type in mirage-console
. log_s
has been renamed to log
to replace it.id
has been removed from the DEVICE module type in mirage-device
.mirage-random
now includes a function generate
that provides random bytes as a buffer (currently a Cstruct.t
), replacing the previous int
-based interface.mem
function is now required by the KV_RO module type in mirage-kv
.read
and size
functions required by the KV_RO module type in mirage-kv
now take int64
s rather than int
s.sleep
(which took a float argument representing the number of seconds) has been replaced by sleep_ns
(which takes an int64 representing the numer of nanoseconds) in the module type TIME provided by mirage-time
.src
and dst
, and source and destination ports to src_port
and dst_port
, in the module types provided by mirage-protocols
.pseudoheader
function is now required for IP module types in mirage-protocols
.qubes
exists for automatically packaging the additional libraries and initialization logic necessary for running MirageOS on QubesOS. The qubes
target is at its heart xen plus some other stuff
.mirage configure -f
will no longer traverse into subdirectories. mirage configure
needs to be called with a working directory the same as the configuration file.mirage configure --unix
and mirage configure --xen
are no longer understood, as warned in the 2.9.1 release. Instead, use mirage configure -t unix
and mirage configure -t xen
respectively.make
is no longer prefixed with mir-
, and the name given to register
will be stripped of OCaml-unfriendly characters before files are written.mirage
-generated programs at runtime have been split off into the mirage-runtime
package, which will be linked instead of the full mirage
package. (This is largely the collection of parsers for runtime keys.)mirage_cli.ml
for easier discovery.ipv6 impl
.tar-format
implementations are less broken.Str
module is no longer included in the OCaml runtime.crunch
always requires io-page
.mirage-fs
provides transforming FS into KV_RO, rather than requiring fat-filesystem
.charrua-client
and charrua-core
rather than tcpip
.clean
target removes more artifacts.mirage-clock-xen
's rename to mirage-clock-freestanding
.Published by yomimono about 8 years ago
--unix
and --xen
that support for-t unix
and -t xen
respectively.add_to_opam_packages p
andadd_to_ocamlfind_libraries l
that support for these will soon be dropped.register ~libraries:l
and register:~packages:p
Published by samoht over 8 years ago
reporter
parameter to register
is nowLogs
and Mirage_logs
. Log reporters can also be configured-l
or --logs
argv
parameter to the register
function to allow to pass customregister ~argv:no_argv
Published by samoht over 8 years ago
-warn-error
by default. This is now controlled by a--warn-error
flag on mirage configure
. Currently it'sPublished by samoht over 8 years ago
opam install
and breaks opam depext
(#519, by @samoht)Published by yomimono over 8 years ago
Published by samoht over 8 years ago
lwt.syntax
, cstruct.syntax
and sexplib
, whichmirage-platform
(#512, by @talex5)mirage-types
>= 2.6.0 and mirage-types-lwt
arePublished by yallop over 8 years ago
The mirage tool is now based on functoria.
See https://mirage.io/blog/introducing-functoria for full details.
Command line interface: The config file must be passed with the -f option
(instead of being just an argument).
Two new generic combinators are available, generic_stack and generic_kv_ro.
get_mode
is deprecated. You should use keys instead. And in particular
Key.target
and Key.is_xen
.
add_to_ocamlfind_libraries
and add_to_opam_packages
are deprecated. Both
the foreign
and the register
functions now accept the ~libraries
and
~packages
arguments to specify library dependencies.
If you were using tls
without the conduit combinator, you will be
greeted during configuration by a message like this:
The "nocrypto" library is loaded but entropy is not enabled!
Please enable the entropy by adding a dependency to the nocrypto device.
You can do so by adding ~deps:[abstract nocrypto] to the arguments of Mirage.foreign.
Data dependencies (such as entropy initialization) are now explicit.
In order to fix this, you need to declare the dependency like so:
open Mirage
let my_functor =
let deps = [abstract nocrypto] in
foreign ~deps "My_Functor" (foo @-> bar)
My_functor.start
will now take an extra argument for each
dependencies. In the case of nocrypto, this is ()
.
Remove nat-script.sh
from the scripts directory, to be available
as an external script.
Published by djs55 about 9 years ago
name.xl
: this has sensible defaults for everything including thename.xl.in
: this has all the settings needed to boot (e.g. presence ofxl create
as before.Published by samoht about 9 years ago
mirage-tcpip.2.6.0
(#419, by @yomimono)
V1.IPV4.input_arp
V1.ARP
and V1_LWT.ARP
Mirage.arp
combinatorMirage.archive
and Mirage.archive_of_files
to support attaching filesPublished by samoht over 9 years ago
V1_LWT.FS.page_aligned_buffer = Cstruct.t
Published by samoht over 9 years ago
Change the type of the Mirage.http_server
combinator. The first argument
(the conduit server configuration) is removed and should now be provided
at compile-time in unikernel.ml
instead of configuration-time in
config.ml
:
(* [config.ml] *)
(* in 2.4 *) let http = http_server (`TCP (`Port 80)) conduit
(* in 2.5 *) let http = http_server conduit
(* [unikernel.ml] *)
let start http =
(* in 2.4 *) http (S.make ~conn_closed ~callback ())
(* in 2.5 *) http (`TCP 80) (S.make ~conn_closed ~callback ())
Change the type of the Mirage.conduit_direct
combinator.
Previously, it took an optional vchan
implementation, an optional
tls
immplementation and an optional stackv4
implemenation. Now,
it simply takes a stackv4
implementation and a boolean to enable
or disable the tls
stack. Users who want to continue to use
vchan
with conduit
should now use the Vchan
functors inside
unikernel.ml
instead of the combinators in config.ml
. To
enable the TLS stack:
(* [config.ml] *)
let conduit = conduit_direct ~tls:true (stack default_console)
(* [unikernel.ml] *)
module Main (C: Conduit_mirage.S): struct
let start conduit =
C.listen conduit (`TLS (tls_config, `TCP 443)) callback
end
[types] Remove V1.ENTROPY
and V1_LWT.ENTROPY
. The entropy is now
handled directly by nocrypto.0.4.0
and the mirage-tool is only responsible to
call the Nocrypto_entropy_{mode}.initialize
function.
Remove Mirage.vchan
, Mirage.vchan_localhost
, Mirage.vchan_xen
and
Mirage.vchan_default
. Vchan users need to adapt their code to directly
use the Vchan
functors instead of relying on the combinators.
Remove Mirage.conduit_client
and Mirage.conduit_server
types.
Fix misleading "Compiling for target" messages in mirage build
(#408 by @lnmx)
Add --no-depext
to disable the automatic installation of opam depexts (#402)
Support @name/file
findlib's extended name syntax in xen_linkopts
fields.
@name
is expanded to %{lib}%/name
Modernize the Travis CI scripts
Published by samoht over 9 years ago
mirage-http.2.2.0
conduit.0.8.0
tcpip.2.4.0
ocaml-tls
0.4.0.Makefile.user
to extend the generatedMakefile
. Also all
, build
and clean
are now extensible makemirage run
command (#379)opam depext
when configuring (#373)mirage
and mirage-types
packagesmirage --version
(#374)update-doc
target to the Makefile to easily update the onlinePublished by avsm over 9 years ago
IO_PAGE
module type from V1
. This has now moved into theio-page
pacakge (#356)DEVICE.connect
from the V1
module types. When a module isDEVICE
it should only have the ability toFLOW.error_message
to the V1
module types to allow forIP.uipaddr
as a universal IP address type. (#361)entropy
version 0.2+ interfaces. (#359)opam
command is at least version 1.2.0 (#355)Published by avsm over 9 years ago
mirage
output is not redirected. (#355)Published by avsm almost 10 years ago
Add IPv6 support, from Nicolas Ojeda Bar. This alters some of the interfaces that were previously hardcoded to IPv4 by generalising them. For example:
type v4
type v6
type 'a ip
type ipv4 = v4 ip
type ipv6 = v6 ip
Full support for configuring IPv6 does not exist yet, as this release is
intended for getting the type definitions in place before adding configuration
support.
Published by avsm almost 10 years ago
xen_linkopts
variables (#332).tcpip.2.1.0
for a library that does this for a C binding.vmnet
framework requires Yosemite or higher.camlp4
, which significantlyPublished by avsm almost 10 years ago
MacOSX
as a platform, which enables network bridging--unix
flag will automatically activate the new target--target
flag to set either Unix, MacOSX or Xen to themirage configure
command.mirage.runtime
findlib library and corresponding Mirage_runtime module (#327).Lwt.tracing
instructions work for Fish shell too by improving quoting (#328).Published by avsm almost 10 years ago
register ~tracing
to enable tracing with mirage-profile at start-up (#321).Published by avsm almost 10 years ago
Backwards incompatible changes to V1 types:
CONSOLE
is now a FLOW
, so write
has a different signature and 'write_all' has been removed.New features in the CLI and config parser:
Vchan
, Conduit
and Resolver
code generators.*.xe
script which can upload a kernel to a XenServer.*.xml
configuration file (#292).mirage-xen
location for paths with spaces (#279).