run

package
v0.8.6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 29, 2024 License: BSD-3-Clause Imports: 44 Imported by: 0

Documentation

Overview

SPDX-License-Identifier: BSD-3-Clause Copyright (c) 2022, Unikraft GmbH and The KraftKit Authors. Licensed under the BSD-3-Clause License (the "License"). You may not use this file except in compliance with the License.

SPDX-License-Identifier: BSD-3-Clause Copyright (c) 2022, Unikraft GmbH and The KraftKit Authors. Licensed under the BSD-3-Clause License (the "License"). You may not use this file except in compliance with the License.

SPDX-License-Identifier: BSD-3-Clause Copyright (c) 2022, Unikraft GmbH and The KraftKit Authors. Licensed under the BSD-3-Clause License (the "License"). You may not use this file except in compliance with the License.

SPDX-License-Identifier: BSD-3-Clause Copyright (c) 2022, Unikraft GmbH and The KraftKit Authors. Licensed under the BSD-3-Clause License (the "License"). You may not use this file except in compliance with the License.

SPDX-License-Identifier: BSD-3-Clause Copyright (c) 2022, Unikraft GmbH and The KraftKit Authors. Licensed under the BSD-3-Clause License (the "License"). You may not use this file except in compliance with the License.

SPDX-License-Identifier: BSD-3-Clause Copyright (c) 2022, Unikraft GmbH and The KraftKit Authors. Licensed under the BSD-3-Clause License (the "License"). You may not use this file except in compliance with the License.

SPDX-License-Identifier: BSD-3-Clause Copyright (c) 2022, Unikraft GmbH and The KraftKit Authors. Licensed under the BSD-3-Clause License (the "License"). You may not use this file except in compliance with the License.

Index

Constants

View Source
const DF_1_PIE elf.DynFlag = 0x08000000 //nolint:stylecheck

https://github.com/file/file/blob/FILE5_44/src/readelf.h#L543

Variables

This section is empty.

Functions

func NewCmd

func NewCmd() *cobra.Command

func Run

func Run(ctx context.Context, opts *RunOptions, args ...string) error

Run a Unikraft unikernel virtual machine locally.

Types

type RunOptions

type RunOptions struct {
	Architecture  string   `long:"arch" short:"m" usage:"Set the architecture"`
	Detach        bool     `long:"detach" short:"d" usage:"Run unikernel in background"`
	DisableAccel  bool     `long:"disable-acceleration" short:"W" usage:"Disable acceleration of CPU (usually enables TCG)"`
	Env           []string `long:"env" short:"e" usage:"Set environment variables, int the format key[=value]"`
	InitRd        string   `long:"initrd" usage:"Use the specified initrd (readonly)" hidden:"true"`
	IP            string   `long:"ip" usage:"Assign the provided IP address"`
	KernelArgs    []string `long:"kernel-arg" short:"a" usage:"Set additional kernel arguments"`
	Kraftfile     string   `long:"kraftfile" short:"K" usage:"Set an alternative path of the Kraftfile"`
	MacAddress    string   `long:"mac" usage:"Assign the provided MAC address"`
	Memory        string   `long:"memory" short:"M" usage:"Assign memory to the unikernel (K/Ki, M/Mi, G/Gi)" default:"64Mi"`
	Name          string   `long:"name" short:"n" usage:"Name of the instance"`
	Networks      []string `` /* 163-byte string literal not displayed */
	NoStart       bool     `long:"no-start" usage:"Do not start the machine"`
	Platform      string   `noattribute:"true"`
	Ports         []string `long:"port" short:"p" usage:"Publish a machine's port(s) to the host" split:"false"`
	Prefix        string   `long:"prefix" usage:"Prefix each log line with the given string"`
	PrefixName    bool     `long:"prefix-name" usage:"Prefix each log line with the machine name"`
	Remove        bool     `long:"rm" usage:"Automatically remove the unikernel when it shutsdown"`
	Rootfs        string   `long:"rootfs" usage:"Specify a path to use as root file system (can be volume or initramfs)"`
	RunAs         string   `long:"as" usage:"Force a specific runner"`
	Runtime       string   `long:"runtime" short:"r" usage:"Set an alternative unikernel runtime"`
	Target        string   `long:"target" short:"t" usage:"Explicitly use the defined project target"`
	Volumes       []string `long:"volume" short:"v" usage:"Bind a volume to the instance"`
	WithKernelDbg bool     `long:"symbolic" usage:"Use the debuggable (symbolic) unikernel"`
	// contains filtered or unexported fields
}

func (*RunOptions) Pre

func (opts *RunOptions) Pre(cmd *cobra.Command, _ []string) error

func (*RunOptions) Run

func (opts *RunOptions) Run(ctx context.Context, args []string) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL