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

VApp properties are ignored when VM customization is performed #144

Closed
omniproc opened this issue Oct 24, 2020 · 3 comments
Closed

VApp properties are ignored when VM customization is performed #144

omniproc opened this issue Oct 24, 2020 · 3 comments
Assignees
Labels
awaiting-upstream The issue cannot be resolved without action in another repository (may be owned by Pulumi). kind/bug Some behavior is incorrect or out of spec resolution/fixed This issue was fixed

Comments

@omniproc
Copy link

In pulumi-vsphere 2.9.0 vapp properties are passed into the vm correctly but the post ova deployment vm customization doesnt work (cpu, memory, disk will be whatever was defined in the ova itself).
In pulumi-vsphere 2.10.0 and higher the post ova deployment vm customization works properly, but now vapp properties are missing after the deployment.

Example minimal ova for testing: https://stable.release.flatcar-linux.net/amd64-usr/current/flatcar_production_vmware_ova.ova

Example code:

import pulumi
import pulumi_vsphere as vsphere

dc = vsphere.get_datacenter(name="dcname")
cl = vsphere.get_compute_cluster(name="clstname", datacenter_id=dc.id)
ds = vsphere.get_datastore(name="diskname", datacenter_id=dc.id)
nw = vsphere.get_network(name="network", datacenter_id=dc.id)
hs = vsphere.get_host(name="hostname", datacenter_id=dc.id)
vm = vsphere.VirtualMachine("pulumi01",
datacenter_id=dc.id,
datastore_id=ds.id, 
host_system_id=hs.id,
resource_pool_id=cl.resource_pool_id,
wait_for_guest_net_timeout=0,
wait_for_guest_ip_timeout=0,
disks=[vsphere.VirtualMachineDiskArgs(label="disk0", size=10, thin_provisioned=False)],
num_cpus=4,
memory=2048,
ovf_deploy=vsphere.VirtualMachineOvfDeployArgs(
  local_ovf_path = "/path/to/flatcar_production_vmware_ova.ova",
  ovf_network_map = {
      "VM Network": nw.id
    }
),
vapp=vsphere.VirtualMachineVappArgs(
  properties={
    "guestinfo.hostname":"pulumi01",
    "guestinfo.ignition.config.data.encoding": "base64",
    "guestinfo.ignition.config.data": "something"
  }
)
)
@omniproc
Copy link
Author

omniproc commented Feb 1, 2021

@lethargosapatheia
Copy link

lethargosapatheia commented Jun 30, 2023

Is this dependent on terraform strictly? On terraform I can confirm this works in any case, but I have to add that I'm not using "guestinfo" for vapp, but directly 'user-data' and 'hostname', so there might be a mistake on the part of the OP. As far as I know guestinfo is used for classical templates, not for vapp, which is normally associate with ova/ovf.
For example:

  vapp {
    properties = {
        user-data = base64encode(data.template_cloudinit_config.kubernetes["${each.key}"].rendered)
        "hostname" = "${each.key}"
    }
  }

@mikhailshilkov mikhailshilkov added kind/bug Some behavior is incorrect or out of spec awaiting-upstream The issue cannot be resolved without action in another repository (may be owned by Pulumi). resolution/fixed This issue was fixed labels Aug 9, 2023
@mikhailshilkov mikhailshilkov self-assigned this Aug 9, 2023
@mikhailshilkov
Copy link
Member

Since the upstream issue was fixed, I'm resolving this one too

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting-upstream The issue cannot be resolved without action in another repository (may be owned by Pulumi). kind/bug Some behavior is incorrect or out of spec resolution/fixed This issue was fixed
Projects
None yet
Development

No branches or pull requests

4 participants