uvm

package
v0.0.0-...-ac2fd71 Latest Latest
Warning

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

Go to latest
Published: May 1, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Rendered for windows/amd64

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddVSMB

func AddVSMB(ctx context.Context, tb testing.TB, vm *uvm.UtilityVM, path string, options *hcsschema.VirtualSmbShareOptions) *uvm.VSMBShare

func Close

func Close(ctx context.Context, tb testing.TB, vm *uvm.UtilityVM)

func CreateAndStartLCOW

func CreateAndStartLCOW(ctx context.Context, tb testing.TB, id string) *uvm.UtilityVM

CreateAndStartLCOW with all default options.

See CreateAndStartLCOWFromOpts.

func CreateAndStartLCOWFromOpts

func CreateAndStartLCOWFromOpts(ctx context.Context, tb testing.TB, opts *uvm.OptionsLCOW) *uvm.UtilityVM

CreateAndStartLCOWFromOpts creates an LCOW utility VM with the specified options.

The cleanup function will be added to `tb.Cleanup`.

func CreateWCOWUVM deprecated

func CreateWCOWUVM(ctx context.Context, tb testing.TB, id, image string) (*uvm.UtilityVM, []string, string)

CreateWCOWUVM creates a WCOW utility VM with all default options. Returns the UtilityVM object; folder used as its scratch.

Deprecated: use CreateWCOW and layers.WCOWScratchDir.

func CreateWCOWUVMFromOptsWithImage deprecated

func CreateWCOWUVMFromOptsWithImage(
	ctx context.Context,
	tb testing.TB,
	opts *uvm.OptionsWCOW,
	image string,
) (*uvm.UtilityVM, []string, string)

CreateWCOWUVMFromOptsWithImage creates a WCOW utility VM with the passed opts builds the LayerFolders based on `image`. Returns the UtilityVM object; folder used as its scratch.

Deprecated: use CreateWCOW and layers.WCOWScratchDir.

func DefaultLCOWOptions

func DefaultLCOWOptions(ctx context.Context, tb testing.TB, id, owner string) *uvm.OptionsLCOW

DefaultLCOWOptions returns default options for a bootable LCOW uVM, but first checks if `containerd.exe` is in the path, or C:\ContainerPlat\LinuxBootFiles exists, and prefers those paths above the default boot path set by uvm.NewDefaultOptionsLCOW

This is accounts for the tests being run a location different from the containerd.exe path.

See uvm.NewDefaultOptionsLCOW for more information.

func DefaultWCOWOptions

func DefaultWCOWOptions(_ context.Context, tb testing.TB, id, owner string) *uvm.OptionsWCOW

DefaultWCOWOptions returns default options for a bootable WCOW uVM.

See uvm.NewDefaultOptionsWCOW for more information.

func Kill

func Kill(ctx context.Context, tb testing.TB, vm *uvm.UtilityVM)

func SetSecurityPolicy

func SetSecurityPolicy(ctx context.Context, tb testing.TB, vm *uvm.UtilityVM, policy string)

func Start

func Start(ctx context.Context, tb testing.TB, vm *uvm.UtilityVM)

func Wait

func Wait(ctx context.Context, tb testing.TB, vm *uvm.UtilityVM)

Types

type CleanupFn

type CleanupFn = func(context.Context)

func CreateLCOW

func CreateLCOW(ctx context.Context, tb testing.TB, opts *uvm.OptionsLCOW) (*uvm.UtilityVM, CleanupFn)

func CreateWCOW

func CreateWCOW(ctx context.Context, tb testing.TB, opts *uvm.OptionsWCOW) (*uvm.UtilityVM, CleanupFn)

CreateWCOW creates a WCOW utility VM with the passed opts.

Jump to

Keyboard shortcuts

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