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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

vsphere-iso: Add support for vApp properties #44

Open
ghost opened this issue Apr 15, 2021 · 6 comments 路 May be fixed by #299
Open

vsphere-iso: Add support for vApp properties #44

ghost opened this issue Apr 15, 2021 · 6 comments 路 May be fixed by #299
Assignees
Labels
Milestone

Comments

@ghost
Copy link

ghost commented Apr 15, 2021

This issue was originally opened by @jpbuecken as hashicorp/packer#10319. It was migrated here as a result of the Packer plugin split. The original body of the issue is below.


Community Note

Please vote on this issue by adding a 馃憤 reaction to the original issue to help the community and maintainers prioritize this request.
Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request.
If you are interested in working on this issue or have submitted a pull request, please leave a comment.

Description

In vSphere, you can enable vApp Options of a VM via Configure -> vApp Options -> Edit
After that, you can add Properties to the vApp / VM (same window)

image

This should be possible via the vsphere-iso builder.

Use Case(s)

With this, you can create a VM with vApp Properties.
Use Case 1: You can add a public-keys property. Configure your Suse autoyast / Redhat/Ubuntu kickstart / Ubuntu preseed to make use of the value during boot (write your own script or make use of cloud-init).
After you have done this, your new vm can be used in turn as a source for vsphere-clone builder.
Since vsphere-clone supports temporary keys for the public-keys property, there is no need to store a password or public-key file in your source image.
I see this as an absolut security win.

Use Case 2: Similar to vsphere-clone, vsphere-iso may use the public-keys property itself:

  1. vsphere-iso creates the vapp property public-keys
  2. vsphere-iso is able to generate temporary key pairs and add them as value to the public-keys (additional new feature, same logic as vsphere-clone)
  3. Your automatic installation process make use of the value in public-keys and add them to your connect user (e.g. root)
  4. vsphere-iso can connect with the ssh communicator with the temporary key pair
    Now the same argument as above applies, there is no need to store a hardcoded password or key files inside your vm before you connect with vsphere-iso. E.g. we have the policy to recreate key files regularly. If they are created and removed "on the fly" temporary, this policy is easily fulfilled.

Potential configuration

     "builders": [
      {
         "type":                      "vsphere-iso",
[...]
        
        "vapp": {
             "enable_vapp_options": true
            "properties": {
                "public-keys": "",
            }
        }
     ]

Potential References

https://www.packer.io/docs/builders/vmware/vsphere-clone#ssh (search for public-keys and vapp on the side)

@khelansible
Copy link

Any ETA on this feature will help my planning.

Many Thanks

@theunknownport
Copy link

In the need of this feature. Setting vApps like this:

configuration_parameters = {
    "disk.EnableUUID" = "true",
        "vAppConfig" = <<EOF
ALOT OF XML CODE HERE

doesn't work for me.

@tenthirtyam tenthirtyam changed the title vsphere-iso: Add support to enable vapp properties vsphere-iso: Add support for vApp properties Oct 4, 2022
@tenthirtyam tenthirtyam changed the title vsphere-iso: Add support for vApp properties vsphere-iso: Add support for vApp properties Nov 5, 2022
@MrKeiKun
Copy link

Any update regarding this feature?

@Gankarloo
Copy link

Also very interested in an update for this feature

@aatzer
Copy link

aatzer commented Sep 19, 2023

Any updates regarding this feature?

@consummo
Copy link

I'm also very interested in this feature.

@tenthirtyam tenthirtyam linked a pull request Oct 13, 2023 that will close this issue
@tenthirtyam tenthirtyam self-assigned this Mar 5, 2024
@tenthirtyam tenthirtyam added this to the Backlog milestone Apr 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants