Skip to content

vsphere iso remove cdroms#8690

Merged
SwampDragons merged 7 commits intohashicorp:masterfrom
daxgames:vsphere_iso_remove_cdrom
Feb 13, 2020
Merged

vsphere iso remove cdroms#8690
SwampDragons merged 7 commits intohashicorp:masterfrom
daxgames:vsphere_iso_remove_cdrom

Conversation

@daxgames
Copy link
Copy Markdown
Contributor

@daxgames daxgames commented Feb 4, 2020

I need this and the PR seems dead in its original repo.

Recreates jetbrains-infra/packer-builder-vsphere#238

All credit to @terbolous for this code.

Compiled and tested.

@daxgames daxgames requested a review from a team as a code owner February 4, 2020 19:37
@hashicorp-cla
Copy link
Copy Markdown

hashicorp-cla commented Feb 4, 2020

CLA assistant check
All committers have signed the CLA.

@sylviamoss
Copy link
Copy Markdown
Contributor

Hi There! This LGTM 👍
Just a little thing it's missing from the original PR and I think it's important. Can you add the new field to the documentation?
Also, I see the CI is failing because it's missing some generated code and format.
You can run go generate ./builder/vsphere/... to generate code and make fmt to format everything.

daxgames and others added 4 commits February 5, 2020 15:25
@daxgames
Copy link
Copy Markdown
Contributor Author

daxgames commented Feb 5, 2020

Docs and format done. I think I added the docs in the right place.

@daxgames
Copy link
Copy Markdown
Contributor Author

daxgames commented Feb 5, 2020

@sylviamoss Are there prerelease binaries somewhere that I am just missing or do I need to build it myself to use the pre-releases?

Edit: I thought they would be here but not.

@sylviamoss
Copy link
Copy Markdown
Contributor

sylviamoss commented Feb 5, 2020

There's one pipeline for storing artifacts (is one of the checks below). Here you can find the ones for this PR: https://circleci.com/gh/hashicorp/packer/32337#artifacts/containers/0
Is this what you wanted?

@@ -2,6 +2,8 @@

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This is a generated file that is generated based on builder/vsphere/iso/step_add_cdrom.go
What you can do is use the same logic for generating docs based on builder/vsphere/iso/step_remove_cdrom.go, and then you can write the docs as comment above

RemoveCdrom bool `mapstructure:"remove_cdrom"`

@daxgames
Copy link
Copy Markdown
Contributor Author

daxgames commented Feb 12, 2020

@sylviamoss Sorry for the delayed response, in the middle of moving cross country. I will look at the changes requested but I have a question.

vsphere-iso builder seems to work perfectly but vsphere-clone throws: Failed to initialize build 'vsphere-clone': error initializing builder 'vsphere-clone': Incompatible API version with plugin. Plugin version: 4, Ours: 5

Admittedly I am not super familiar with the Packer code so not sure were to look for this. I would think if one builder worked so would the other worked the other would also.

@sylviamoss
Copy link
Copy Markdown
Contributor

Can you try running your vsphere-clone test with our nightly version? here the binaries: https://github.com/hashicorp/packer/releases/tag/nightly
So we can check if this is not related to your changes (which I think is not 🤔 )

@daxgames
Copy link
Copy Markdown
Contributor Author

Trying now. Really slowly. Working from car via cellular wifi hotspot download is taking forever!

@daxgames daxgames requested a review from sylviamoss February 12, 2020 16:35
@daxgames
Copy link
Copy Markdown
Contributor Author

@sylviamoss same issue using the nightly and vsphere-clone

Failed to initialize build 'vsphere-clone': error initializing builder 'vsphere-clone': Incompatible API version with plugin. Plugin version: 4, Ours: 5

@SwampDragons
Copy link
Copy Markdown
Contributor

I suspect you still have the vsphere builder installed in your .plugin.d folder, so Packer is using it instead of the built-in one in the newer release. Delete the old one from your folder, and that should fix this API error.

@daxgames
Copy link
Copy Markdown
Contributor Author

@SwampDragons there was a file in $GOPATH/bin called packer-builder-vsphere-clone.working. I am surprised it picked it up given its named wrong. Deleting it fixed it.

@SwampDragons
Copy link
Copy Markdown
Contributor

oh good catch. Must be a weak regex. I'll check the code and see if we can tweak it to ignore extensions.

Copy link
Copy Markdown
Contributor

@sylviamoss sylviamoss left a comment

Choose a reason for hiding this comment

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

Since everything seems to work perfectly, this LGTM! 🎉

@SwampDragons
Copy link
Copy Markdown
Contributor

@daxgames I've opened #8735 to fix the overly-forgiving provisioner loading

@ghost
Copy link
Copy Markdown

ghost commented Apr 1, 2020

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.

@ghost ghost locked and limited conversation to collaborators Apr 1, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants