diff --git a/projects/aws/image-builder/builder/builder.go b/projects/aws/image-builder/builder/builder.go index 66e733c721..71ec0d5be6 100644 --- a/projects/aws/image-builder/builder/builder.go +++ b/projects/aws/image-builder/builder/builder.go @@ -268,6 +268,11 @@ func (b *BuildOptions) BuildImage() { } log.Printf("Image Build Successful\n Please find the image uploaded under Nutanix Image Service with name %s\n", b.NutanixConfig.ImageName) + if b.NutanixConfig.ImageExport == "true" { + outputImageGlobPattern = "*.img" + outputArtifactPath = filepath.Join(cwd, fmt.Sprintf("%s-%s-kube-%s.img", b.Os, b.OsVersion, b.ReleaseChannel)) + log.Printf("Also please find the exported image at %s\n", outputArtifactPath) + } } else if b.Hypervisor == CloudStack { if b.AirGapped { airGapEnvVars, err := getAirGapCmdEnvVars(b.CloudstackConfig.ImageBuilderRepoUrl, detectedEksaVersion, b.ReleaseChannel) diff --git a/projects/aws/image-builder/builder/types.go b/projects/aws/image-builder/builder/types.go index b8063268e4..3b12c266eb 100644 --- a/projects/aws/image-builder/builder/types.go +++ b/projects/aws/image-builder/builder/types.go @@ -115,6 +115,7 @@ type NutanixConfig struct { ClusterName string `json:"nutanix_cluster_name"` ImageName string `json:"image_name"` ImageUrl string `json:"image_url,omitempty"` + ImageExport string `json:"image_export,omitempty"` SourceImageName string `json:"source_image_name,omitempty"` NutanixEndpoint string `json:"nutanix_endpoint"` NutanixInsecure string `json:"nutanix_insecure"`