| title | convert |
|---|---|
| parent | Command line |
| ancestor | Image Customizer |
| nav_order | 2 |
Converts an image from one format to another without performing any customization or file injection. This is useful for simple format conversion tasks, especially when converting to COSI or bare-metal-image formats.
imagecustomizer convert \
--build-dir ./build \
--image-file input.vhdx \
--output-image-file output.cosi \
--output-image-format cosiAdded in v1.2.
Optional. Required for cosi and baremetal-image output formats.
The directory where the tool will place its temporary files, if required.
Added in v1.2.
Required.
The path to the image to convert.
Supported image formats: vhd, vhd-fixed, vhdx, qcow2, and raw.
Added in v1.2.
Required.
The file path to write the converted image to.
Added in v1.2.
An alias to --output-image-file.
Added in v1.2.
Required.
The image format of the output image.
Supported image formats: vhd, vhd-fixed, vhdx, qcow2, raw, cosi, and baremetal-image.
See output.image.format for detailed descriptions of each format.
Added in v1.2.
Optional. Default: 9
The zstd compression level (1-22) for COSI partition images.
Higher compression levels produce smaller files but take significantly longer to compress. Decompression speed is largely unaffected by the compression level.
Added in v1.2.
imagecustomizer convert \
--build-dir ./build \
--image-file base-image.vhdx \
--output-image-file converted-image.cosi \
--output-image-format cosiimagecustomizer convert \
--image-file vm-image.qcow2 \
--output-image-file azure-image.vhd \
--output-image-format vhd-fixedimagecustomizer convert \
--build-dir ./build \
--image-file large-image.raw \
--output-image-file compressed-image.cosi \
--output-image-format cosi \
--cosi-compression-level 15