Crate disk

Source
Expand description

VM disk image file format I/O.

Modulesยง

android_sparse ๐Ÿ”’
asynchronous ๐Ÿ”’
Asynchronous disk image helpers.
composite ๐Ÿ”’
gpt ๐Ÿ”’
Functions for writing GUID Partition Tables for use in a composite disk image.
qcow ๐Ÿ”’
sys ๐Ÿ”’
zstd ๐Ÿ”’
Use seekable zstd archive of raw disk image as read only disk

Structsยง

DiskFileParams
PartitionInfo
Information about a partition to create.
QcowFile
Represents a qcow2 file. This is a sparse file format maintained by the qemu project. Full documentation of the format can be found in the qemu repository.
SingleFileDisk
A disk backed by a single file that implements AsyncDisk for access.

Enumsยง

CompositeError
Error
GptError
ImagePartitionType
The type of partition.
ImageType
The variants of image files on the host that can be used as virtual disks.

Constantsยง

MAX_NESTING_DEPTH ๐Ÿ”’
Nesting depth limit for disk formats that can open other disk files.
QCOW_MAGIC

Traitsยง

AsyncDisk
An asynchronously accessible disk.
DiskFile
The prerequisites necessary to support a block device.
DiskGetLen
A trait for getting the length of a disk image or raw block device.
ToAsyncDisk
A DiskFile that can be converted for asychronous access.

Functionsยง

create_composite_disk
Create a new composite disk image containing the given partitions, and write it out to the given files.
create_zero_filler
Create a zero filler file which can be used to fill the gaps between partition files. The filler is sized to be big enough to fill the gaps. (1 << PARTITION_SIZE_SHIFT)
detect_image_type
Detect the type of an image file by checking for a valid header of the supported formats.
open_disk_file
Inspect the image file type and create an appropriate disk file to match it.

Type Aliasesยง

Result