Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Secure boot VMs when doing updates #496

Closed

Conversation

ppanula
Copy link

@ppanula ppanula commented Sep 22, 2022

This is my simple fix for SECURE_BOOT VMs to handle terraform apply updates, when it's doing first power off VM and then powering it back on.

I noticed that MachineType was not set to Q35 when powering off was done and second time MachineType is missing when actual update is done and VM is booted after that.

Issue #494

@@ -1203,6 +1203,12 @@ func resourceNutanixVirtualMachineUpdate(ctx context.Context, d *schema.Resource
metadata.SpecVersion = specVersion
}

// Check if we are dealing with SECURE_BOOT machine, MachineType is needed then set to Q35
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we don't need this check at two places. we can always preFill the machineType using the response.
here:

preFillResUpdateRequest(res, response)

@abhimutant
Copy link
Collaborator

Closing as fix is already merged in master. #633

@abhimutant abhimutant closed this Sep 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants