osbuild1: support VMDK subformat in QEMU assembler
Related to https://github.com/osbuild/osbuild/pull/1000
This commit is contained in:
parent
2232aec0ee
commit
c07cbb2de4
1 changed files with 19 additions and 8 deletions
|
|
@ -2,6 +2,16 @@ package osbuild1
|
||||||
|
|
||||||
import "github.com/osbuild/osbuild-composer/internal/disk"
|
import "github.com/osbuild/osbuild-composer/internal/disk"
|
||||||
|
|
||||||
|
type VMDKSubformat string
|
||||||
|
|
||||||
|
const (
|
||||||
|
VMDKSubformatMonolithicSparse VMDKSubformat = "monolithicSparse"
|
||||||
|
VMDKSubformatMonolithicFlat VMDKSubformat = "monolithicFlat"
|
||||||
|
VMDKSubformatTwoGbMaxExtentSparse VMDKSubformat = "twoGbMaxExtentSparse"
|
||||||
|
VMDKSubformatTwoGbMaxExtentFlat VMDKSubformat = "twoGbMaxExtentFlat"
|
||||||
|
VMDKSubformatStreamOptimized VMDKSubformat = "streamOptimized"
|
||||||
|
)
|
||||||
|
|
||||||
// QEMUAssemblerOptions desrcibe how to assemble a tree into an image using qemu.
|
// QEMUAssemblerOptions desrcibe how to assemble a tree into an image using qemu.
|
||||||
//
|
//
|
||||||
// The assembler creates an image of the given size, adds a GRUB2 bootloader
|
// The assembler creates an image of the given size, adds a GRUB2 bootloader
|
||||||
|
|
@ -9,14 +19,15 @@ import "github.com/osbuild/osbuild-composer/internal/disk"
|
||||||
// containing the indicated partitions. Finally, the image is converted into
|
// containing the indicated partitions. Finally, the image is converted into
|
||||||
// the target format and stored with the given filename.
|
// the target format and stored with the given filename.
|
||||||
type QEMUAssemblerOptions struct {
|
type QEMUAssemblerOptions struct {
|
||||||
Bootloader *QEMUBootloader `json:"bootloader,omitempty"`
|
Bootloader *QEMUBootloader `json:"bootloader,omitempty"`
|
||||||
Format string `json:"format"`
|
Format string `json:"format"`
|
||||||
Qcow2Compat string `json:"qcow2_compat,omitempty"`
|
Qcow2Compat string `json:"qcow2_compat,omitempty"`
|
||||||
Filename string `json:"filename"`
|
VMDKSubformat VMDKSubformat `json:"vmdk_subformat,omitempty"`
|
||||||
Size uint64 `json:"size"`
|
Filename string `json:"filename"`
|
||||||
PTUUID string `json:"ptuuid"`
|
Size uint64 `json:"size"`
|
||||||
PTType string `json:"pttype"`
|
PTUUID string `json:"ptuuid"`
|
||||||
Partitions []QEMUPartition `json:"partitions"`
|
PTType string `json:"pttype"`
|
||||||
|
Partitions []QEMUPartition `json:"partitions"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type QEMUPartition struct {
|
type QEMUPartition struct {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue