Skip to content

Commit

Permalink
Export Nutanix images to disk
Browse files Browse the repository at this point in the history
  • Loading branch information
abhay-krishna committed Oct 20, 2023
1 parent d5f933b commit 70baacd
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
5 changes: 5 additions & 0 deletions projects/aws/image-builder/builder/builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
1 change: 1 addition & 0 deletions projects/aws/image-builder/builder/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"`
Expand Down

0 comments on commit 70baacd

Please sign in to comment.