Run a unikernel virtual machine
kraft run [FLAGS] PROJECT|PACKAGE|BINARY -- [APP ARGS]
Run a built target in the current working directory project:$ kraft runRun a specific target from a multi-target project at the provided project directory:$ kraft run -t TARGET path/to/projectRun a specific kernel binary:$ kraft run --arch x86_64 --plat qemu path/to/kernel-x86_64-qemuRun a specific kernel binary with 1000 megabytes of memory:$ kraft run --arch x86_64 --plat qemu --memory 1G path/to/kernel-x86_64-qemuRun a specific kernel binary with 1024 megabytes of memory:$ kraft run --arch x86_64 --plat qemu --memory 1Gi path/to/kernel-x86_64-qemuRun an OCI-compatible unikernel, mapping port 8080 on the host to port 80 in the unikernel:$ kraft run -p 8080:80 unikraft.org/nginx:latestAttach the unikernel to an existing network kraft0:$ kraft run --network kraft0Run a Linux userspace binary in POSIX-/binary-compatibility mode:$ kraft run a.outSupply an initramfs CPIO archive file to the unikernel for its rootfs:$ kraft run --rootfs ./initramfs.cpioSupply a path which is dynamically serialized into an initramfs CPIO archive:$ kraft run --rootfs ./path/to/rootfsMount a bi-directional path from on the host to the unikernel mapped to /dir:$ kraft run -v ./path/to/dir:/dirSupply a read-only root file system at / via initramfs CPIO archive and mount a bi-directional volume at /dir:$ kraft run --rootfs ./initramfs.cpio --volume ./path/to/dir:/dirCustomize the default content directory of the official Unikraft NGINX OCI-compatible unikernel and map port 8080 to localhost:$ kraft run -v ./path/to/html:/nginx/html -p 8080:80 unikraft.org/nginx:latest
-m, --arch string Set the architecture--as string Force a specific runner-d, --detach Run unikernel in background-W, --disable-acceleration Disable acceleration of CPU (usually enables TCG)-h, --help help for run--ip string Assign the provided IP address-a, --kernel-arg strings Set additional kernel arguments-K, --kraftfile string Set an alternative path of the Kraftfile--mac string Assign the provided MAC address-M, --memory string Assign memory to the unikernel (K/Ki, M/Mi, G/Gi) (default "64Mi")-n, --name string Name of the instance--network strings Attach instance to the provided network, in the format <network>[:ip[/mask][:gw[:dns0[:dns1[:hostname[:domain]]]]]], e.g. kraft0:172.100.0.2--no-start Do not start the machine--plat string Set the platform virtual machine monitor driver. (default "auto")-p, --port stringArray Publish a machine's port(s) to the host--prefix string Prefix each log line with the given string--prefix-name Prefix each log line with the machine name--rm Automatically remove the unikernel when it shutsdown--rootfs string Specify a path to use as root file system (can be volume or initramfs)--symbolic Use the debuggable (symbolic) unikernel-t, --target string Explicitly use the defined project target-v, --volume strings Bind a volume to the instance
kraft
: Build and use highly customized and ultra-lightweight unikernelsFeel free to ask questions, report issues, and meet new people.