virtualdisk

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2023 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Attach

func Attach(ctx context.Context, logger *zap.Logger, opts *AttachOptions, readyCh chan struct{}) error

Attach attachs a virtual disk device.

Types

type AttachOptions

type AttachOptions struct {
	// Image is the path to the qcow2 backing image.
	Image string
	// Size is the size of the qcow2 backing image in bytes.
	Size int64
	// VolumeGroup is the name of the LVM volume group to create.
	VolumeGroup string
	// LogicalVolume is the name of the optional LVM logical volume to create.
	LogicalVolume string
	// EncryptionKeyFilePath is the optional encryption key file to use for LUKS.
	EncryptionKeyFilePath string
	// PIDFilePath is the optional path to the qemu-nbd pid file.
	// If not specified, /run/qemu-nbd.pid is used.
	PIDFilePath string
	// SocketPath is the optional path to the qemu-nbd socket.
	// If not specified, /run/qemu-nbd.sock is used.
	SocketPath string
}

AttachOptions are the options for attaching a virtual disk device.

Jump to

Keyboard shortcuts

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