packer-builder-vsphere
packer-builder-vsphere copied to clipboard
Add configuration_parameters_post
Please add a configuration option to change the vmx configuration parameters after the provisioners have been run and before post-processors execute.
This would allow us to have 4 cores and 16gb of ram while building the image, but not in the final template.
Similar to what vmx_data_post
does for the vmware provisioner.
+1 in my case I need to set disk.EnableUUID this is a mandatory parameter to use vsphere kubernetes volumes
@agowa338
This would allow us to have 4 cores and 16gb of ram while building the image, but not in the final template.
Don't you find such low-level customization dangerous?
We usually split images into several layers, and such customizations are performed by vsphere-clone
builder on last layer.
@segator
I need to set disk.EnableUUID
Can it be done at VM creation?
@agowa338
This would allow us to have 4 cores and 16gb of ram while building the image, but not in the final template.
Don't you find such low-level customization dangerous?
Why should it be? We're doing it all the time in production manually thorough the web interface.
@segator
I need to set disk.EnableUUID
Can it be done at VM creation?
This may not be possible, as vmware would generate unique uuids for the disk and after the template is deployed every vm would have the same disk uuids, making them non unique. Basically after setting "disk.EnableUUID" you don't want to do anything else that could update the vm configuration (as far as I know, only powering on after setting this configuration item will actually assign a uuid to the disk)
My case for this (that I use with packer's vmware-iso
) is to set an IOPS limit in the final template (I want unlimited IOPS during the build for speed).
Using another builder step duplicates a lot of configuration (how would that work? I got an error that the source template doesn't exist (because it hasn't been built yet!)) - I guess a post provisioner would avoid that, but it seems very specific to have a provisioner just to set the VMX config.
My guess is that adding configuration_parameters_post
would be a fairly simple patch (if it were desired, that is)? I could have a go.
This has been open a while I noticed there may be a way to provide extra options to ovftool, is that the recommended way to set these options? (disk.EnableUUID) ?