-
Notifications
You must be signed in to change notification settings - Fork 9.6k
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
provider/vSphere: Fixes the hasBootableVmdk flag when attaching multiple disks #7804
Conversation
104e803
to
49b4c18
Compare
@@ -799,10 +798,10 @@ func resourceVSphereVirtualMachineCreate(d *schema.ResourceData, meta interface{ | |||
return fmt.Errorf("Cannot specify name of a template") | |||
} | |||
vm.template = v | |||
if hasBootableDisk { | |||
if vm.hasBootableVmdk { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should this check include checking for multiple non-template disks with bootable?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
The hasBootableFlag logic had a bug where it would only be set properly if the bootable disk was the last specified. Adding some bool logic resolves the issue. Also adding check to ensure only one bootable disk is given, and cleaning up a redundant var.
49b4c18
to
d2285b6
Compare
@stack72 Is there going to be an 0.7.0 rc4? If so, any idea when it might be created? If so, any chance this can make it in? This bug has some pretty bad effects on multiple disk vms. |
@dkalleg are we good with this one? Have you ran the tests? P. |
Hey @stack72, they're passing on my end. And I'm good calling this the final version, depending on any further comments. |
ok, I'm going to merge this - if possible, please drop the test results in so people can see them if they look :) |
Thanks @stack72 ! |
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further. |
The hasBootableFlag logic had a bug where it would only be set properly
if the bootable disk was the last specified. Adding some bool logic
resolves the issue. Also cleaning up a redundant var.