virtdisks

package
v0.0.0-...-b664000 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2023 License: BSD-3-Clause Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Close

func Close(handle types.VDiskHandle) (err error)

Close the virtual drives handle.

func Compact

func Compact(vDiskHandle types.VDiskHandle, flags ffi.CompactVirtualDiskFlag) error

func Dismount

func Dismount(handle types.VDiskHandle) (err error)

Dismount the virtual drives. Implements: - Dismount-VHD

func Fork

func Fork(path types.Path, parentPath types.Path, diskType ffi.VirtualStorageTypeDeviceType, sizeBytes uint64, blockSizeBytes uint32, physicalSectorSizeBytes uint32) (handle types.VDiskHandle, err error)

Fork a differencing virtual drives from a parent. Implements: - New-VHD -Differencing

func GetParents

func GetParents(handle types.VDiskHandle) (resolved bool, parents []types.Path, err error)

GetParents get the parents of the child disk. returns windows.ERROR_VHD_INVALID_TYPE if it is not a differencing drives

func GetPhysicalPath

func GetPhysicalPath(handle types.VDiskHandle) (path types.Drive, err error)

GetPhysicalPath returns normalized drives path of an opened virtual drive. Required permission: virtdisks.VirtualDiskAccessGetInfo

func GetVirtualDiskBackingFiles

func GetVirtualDiskBackingFiles(drive types.Drive) ([]types.Path, error)

GetVirtualDiskBackingFiles returns filesystem paths to all the virtual drives backing paths, sorted from the child to the parent.

func Mirror

func Mirror(path types.Path, sourceDiskPath types.Path, diskType ffi.VirtualStorageTypeDeviceType, dynamic bool, blockSizeBytes uint32) (handle types.VDiskHandle, err error)

Mirror a drives into a new virtual drives. Implements: - New-VHD -SourceDisk

func Mount

func Mount(handle types.VDiskHandle, noDriveLetter bool, readOnly bool) (err error)

Mount the virtual drives. Implements: - Mount-VHD

func New

func New(path types.Path, diskType ffi.VirtualStorageTypeDeviceType, sizeBytes uint64, dynamic bool, blockSizeBytes uint32, logicalSectorSizeBytes uint32, physicalSectorSizeBytes uint32) (handle types.VDiskHandle, err error)

New virtual drives from scratch. Implements: - New-VHD -Dynamic - New-VHD -Fixed Notes: - sizeBytes must be dividable by blockSizeBytes (by default 512), otherwise it returns windows.ERROR_FILE_NOT_FOUND

func Open

func Open(path types.Path, fileType ffi.VirtualStorageTypeDeviceType, accessMask ffi.VirtualDiskAccessMask, openFlags ffi.OpenVirtualDiskFlag) (handle types.VDiskHandle, err error)

Open an existing virtual drives. Implements: - Get-VHD -Path

Types

This section is empty.

Jump to

Keyboard shortcuts

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