You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What happened:
Attempting to follow documentation for building Nutanix images with the image-builder CLI tool and already have a RHEL cloud image imported into Prism Central that I want to build eks node images from. The documentation says you can either set the image_url variable to grab a publicly accessible image or the source_image_name variable to select an image you have already imported into Prism.
When only the source_image_name variable is set and the image_url variable is not included, packer crashes with an "invalid memory address or nil pointer dereference" error.
What you expected to happen:
Image builder successfully builds Nutanix images from a base image that has already been imported into Prism without trying to pull the image from a URL if the image_url variable is not provided.
How to reproduce it (as minimally and precisely as possible):
Import a RHEL cloud image into Prism Central to be used as the source image
Don't set the variable image_url because the image is already in Prism
Run the image-builder command: image-builder build --os redhat --hypervisor nutanix --release-channel 1-29 --nutanix-config nutanix.json
This should result in packer crashing with the invalid memory address error as soon as the packer build command is started.
Anything else we need to know?:
Was able to confirm this is what is happening by looking at the packer file that is being used for the build: eks-anywhere-build-tooling/projects/kubernetes-sigs/image-builder/image-builder/images/capi/packer/nutanix/packer.json. There are no references to the source_image_name variable anywhere in the file.
Lines 26-32 shows the builder attempting to use the image_url variable for the source image even though one wasn't set:
After the build failed I edited the variable file eks-anywhere-build-tooling/projects/kubernetes-sigs/image-builder/packer/nutanix/nutanix.json to set the image_url variable to the same value as the image name and then modified the vm_disks block like the following:
What happened:
Attempting to follow documentation for building Nutanix images with the image-builder CLI tool and already have a RHEL cloud image imported into Prism Central that I want to build eks node images from. The documentation says you can either set the
image_url
variable to grab a publicly accessible image or thesource_image_name
variable to select an image you have already imported into Prism.When only the
source_image_name
variable is set and theimage_url
variable is not included, packer crashes with an "invalid memory address or nil pointer dereference" error.What you expected to happen:
Image builder successfully builds Nutanix images from a base image that has already been imported into Prism without trying to pull the image from a URL if the
image_url
variable is not provided.How to reproduce it (as minimally and precisely as possible):
source_image_name
variableimage_url
because the image is already in Prismimage-builder build --os redhat --hypervisor nutanix --release-channel 1-29 --nutanix-config nutanix.json
This should result in packer crashing with the invalid memory address error as soon as the packer build command is started.
Anything else we need to know?:
Was able to confirm this is what is happening by looking at the packer file that is being used for the build:
eks-anywhere-build-tooling/projects/kubernetes-sigs/image-builder/image-builder/images/capi/packer/nutanix/packer.json
. There are no references to thesource_image_name
variable anywhere in the file.Lines 26-32 shows the builder attempting to use the image_url variable for the source image even though one wasn't set:
After the build failed I edited the variable file
eks-anywhere-build-tooling/projects/kubernetes-sigs/image-builder/packer/nutanix/nutanix.json
to set theimage_url
variable to the same value as the image name and then modified the vm_disks block like the following:After changing that I reran the same packer build command that the image-builder failed on, it succeeded, and the eks node image was added to Prism.
Environment:
The text was updated successfully, but these errors were encountered: