Safe Haskell | None |
---|---|
Language | Haskell2010 |
Data types that describe all B9 relevant elements of virtual machine disk images.
- data ImageTarget = ImageTarget ImageDestination ImageSource MountPoint
- data MountPoint
- data ImageDestination
- data ImageSource
- data Partition
- data Image = Image FilePath ImageType FileSystem
- data ImageType
- data FileSystem
- = NoFileSystem
- | Ext4
- | ISO9660
- | VFAT
- data ImageSize = ImageSize Int SizeUnit
- data SizeUnit
- data ImageResize
- type Mounted a = (a, MountPoint)
- itImageDestination :: ImageTarget -> ImageDestination
- itImageMountPoint :: ImageTarget -> MountPoint
- isPartitioned :: Partition -> Bool
- getPartition :: Partition -> Int
- imageFileExtension :: ImageType -> String
- changeImageFormat :: ImageType -> Image -> Image
- changeImageDirectory :: FilePath -> Image -> Image
- data SharedImage = SharedImage SharedImageName SharedImageDate SharedImageBuildId ImageType FileSystem
- siName :: SharedImage -> String
- newtype SharedImageName = SharedImageName String
- newtype SharedImageDate = SharedImageDate String
- newtype SharedImageBuildId = SharedImageBuildId String
- sharedImageImage :: SharedImage -> Image
- sharedImageFileName :: SharedImage -> FilePath
- sharedImagesRootDirectory :: FilePath
- sharedImageFileExtension :: String
Documentation
data ImageTarget Source
Build target for disk images; the destination, format and size of the image
to generate, as well as how to create or obtain the image before a
VmScript
is executed with the image mounted at a MountPoint
.
data MountPoint Source
A mount point or NotMounted
data ImageDestination Source
The destination of an image.
Share String ImageType ImageResize | Create the image and some meta data so that other
builds can use them as |
LiveInstallerImage String FilePath ImageResize | DEPRECATED Export a raw image that can directly be booted. |
LocalFile Image ImageResize | Write an image file to the path in the first argument., possible resizing it, |
Transient | Do not export the image. Usefule if the main objective of the b9 build is not an image file, but rather some artifact produced by executing by a containerize build. |
data ImageSource Source
Specification of how the image to build is obtained.
EmptyImage String FileSystem ImageType ImageSize | Create an empty image file having a file system label
(first parameter), a file system type (e.g. |
CopyOnWrite Image | DEPRECATED |
SourceImage Image Partition ImageResize | Clone an existing image file; if the image file contains
partitions, select the partition to use, b9 will extract
that partition by reading the offset of the partition from
the partition table and extract it using |
From String ImageResize | Use an image previously shared by via |
The partition to extract.
A vm disk image file consisting of a path to the image file, and the type and file system.
data FileSystem Source
data ImageResize Source
How to resize an image file.
ResizeImage ImageSize | Resize the image but not the file system. Note that
a file system contained in the image file might be
corrupted by this operation. To not only resize the image
file but also the fil system contained in it, use
|
Resize ImageSize | Resize an image and the contained file system. |
ShrinkToMinimum | Resize an image and the contained file system to the smallest size to fit the contents of the file system. |
KeepSize | Do not change the image size. |
type Mounted a = (a, MountPoint) Source
isPartitioned :: Partition -> Bool Source
getPartition :: Partition -> Int Source
imageFileExtension :: ImageType -> String Source
Return the file name extension of an image file with a specific image format.
changeImageFormat :: ImageType -> Image -> Image Source
changeImageDirectory :: FilePath -> Image -> Image Source
data SharedImage Source
SharedImage
holds all data necessary to identify an image shared. Shared
images are stored in Repository
s.
siName :: SharedImage -> String Source
Return the name of a shared image.
sharedImageImage :: SharedImage -> Image Source
Return the disk image of an sharedImage
sharedImageFileName :: SharedImage -> FilePath Source
Calculate the path to the text file holding the serialized SharedImage
relative to the directory of shared images in a repository.