.nh .TH buildah-mkcw "1" "July 2023" "buildah" .SH NAME .PP buildah-mkcw - Convert a conventional container image into a confidential workload image. .SH SYNOPSIS .PP \fBbuildah mkcw\fP [\fIoptions\fP] \fIsource\fP \fIdestination\fP .SH DESCRIPTION .PP Converts the contents of a container image into a new container image which is suitable for use in a trusted execution environment (TEE), typically run using krun (i.e., crun built with the libkrun feature enabled and invoked as \fIkrun\fP). Instead of the conventional contents, the root filesystem of the created image will contain an encrypted disk image and configuration information for krun. .SH source .PP A container image, stored locally or in a registry .SH destination .PP A container image, stored locally or in a registry .SH OPTIONS .PP \fB--attestation-url\fP, \fB-u\fP \fIurl\fP The location of a key broker / attestation server. If a value is specified, the new image's workload ID, along with the passphrase used to encrypt the disk image, will be registered with the server, and the server's location will be stored in the container image. At run-time, krun is expected to contact the server to retrieve the passphrase using the workload ID, which is also stored in the container image. If no value is specified, a \fIpassphrase\fP value \fImust\fP be specified. .PP \fB--base-image\fP, \fB-b\fP \fIimage\fP An alternate image to use as the base for the output image. By default, the \fIscratch\fP non-image is used. .PP \fB--cpus\fP, \fB-c\fP \fInumber\fP The number of virtual CPUs which the image expects to be run with at run-time. If not specified, a default value will be supplied. .PP \fB--firmware-library\fP, \fB-f\fP \fIfile\fP The location of the libkrunfw-sev shared library. If not specified, \fBbuildah\fR checks for its presence in a number of hard-coded locations. .PP \fB--memory\fP, \fB-m\fP \fInumber\fP The amount of memory which the image expects to be run with at run-time, as a number of megabytes. If not specified, a default value will be supplied. .PP \fB--passphrase\fP, \fB-p\fP \fItext\fP The passphrase to use to encrypt the disk image which will be included in the container image. If no value is specified, but an \fI--attestation-url\fP value is specified, a randomly-generated passphrase will be used. The authors recommend setting an \fI--attestation-url\fP but not a \fI--passphrase\fP\&. .PP \fB--slop\fP, \fB-s\fP \fI{percentage%|sizeKB|sizeMB|sizeGB}\fP Extra space to allocate for the disk image compared to the size of the container image's contents, expressed either as a percentage (..%) or a size value (bytes, or larger units if suffixes like KB or MB are present), or a sum of two or more such specifications. If not specified, \fBbuildah\fR guesses that 25% more space than the contents will be enough, but this option is provided in case its guess is wrong. If the specified or computed size is less than 10 megabytes, it will be increased to 10 megabytes. .PP \fB--type\fP, \fB-t\fP {SEV|SNP} The type of trusted execution environment (TEE) which the image should be marked for use with. Accepted values are "SEV" (AMD Secure Encrypted Virtualization - Encrypted State) and "SNP" (AMD Secure Encrypted Virtualization - Secure Nested Paging). If not specified, defaults to "SNP". .PP \fB--workload-id\fP, \fB-w\fP \fIid\fP A workload identifier which will be recorded in the container image, to be used at run-time for retrieving the passphrase which was used to encrypt the disk image. If not specified, a semi-random value will be derived from the base image's image ID. .SH SEE ALSO .PP buildah(1)