lcow

package
v0.8.10 Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2020 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// DefaultScratchSizeGB is the size of the default LCOW scratch disk in GB
	DefaultScratchSizeGB = 20
)

Variables

This section is empty.

Functions

func CreateScratch

func CreateScratch(ctx context.Context, lcowUVM *uvm.UtilityVM, destFile string, sizeGB uint32, cacheFile string) error

CreateScratch uses a utility VM to create an empty scratch disk of a requested size. It has a caching capability. If the cacheFile exists, and the request is for a default size, a copy of that is made to the target. If the size is non-default, or the cache file does not exist, it uses a utility VM to create target. It is the responsibility of the caller to synchronise simultaneous attempts to create the cache file.

func FormatDisk added in v0.8.10

func FormatDisk(ctx context.Context, lcowUVM *uvm.UtilityVM, destPath string) error

FormatDisk creates a utility vm, mounts the disk as a scsi disk onto to the VM and then formats it with ext4. Disk is expected to be made offline before this command is run. The following powershell commands: 'Get-Disk -Number <disk num> | Set-Disk -IsOffline $true' can be used to offline the disk.

Types

This section is empty.

Jump to

Keyboard shortcuts

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