Closed sepsh closed 4 months ago
@burnsjared0415 can you take a look at this one?
One way to fix that could be to add a task in packer/ansible/roles/configure/tasks
right before
https://github.com/vmware-samples/packer-examples-for-vsphere/blob/d2fde04a56867801bdaeb550e8aed3bf8e62af3f/ansible/roles/configure/tasks/debian.yml#L51
Just adding this could fix it maybe,
- file:
path: "/etc/cloud/cloud-init.disabled"
state: absent
but I'm not sure if it's the best way since this document exist: https://cloudinit.readthedocs.io/en/latest/howto/disable_cloud_init.html#method-2-kernel-command-line
will take look this afternoon and look at the suggestion and test.
thanks a lot
@sepsh pull request is in to fix the issue, if you want to pull down the fix and see if it works?
Addressed in #940.
Hi, Sorry for my delay. That solved my problem, Thanks a lot.
Code of Conduct
Project Version
develop
VMware vSphere
7.0.3
HashiCorp Packer
1.11.0
HashiCorp Packer Plugin for VMware vSphere
1.3.0
Guest Operating System
Ubuntu Server 24.04 LTS
Environment Details
vm_guest_os_cloudinit=true
1.11.0
1.3.0
3.12.3
10.0.1
1.6.0
2.5.1
Kubuntu 22.04
7.0.3
ubuntu-24.04-live-server-amd64.iso
2:12.3.5-5build3
24.1.3-0ubuntu3.3
Description
Hi. When I tried building an image from Ubuntu Server 24.04 LTS and cloning it with Terraform, I noticed that the user configuration, hostname and network configuration and other stuff set in cloud-init templates, was not applied.
Then I ran:
I got
disabled
Expected Behavior
Cloud-init beeing enabled
Actual Behavior
Cloud-init is not enabled
Steps to Reproduce
builds/linux/ubuntu/24-04-lts
and setvm_guest_os_cloudinit=true
terraform/vsphere-virtual-machine/content-library-ovf-linux-cloud-init
terraform/vsphere-virtual-machine/content-library-ovf-linux-cloud-init/metadata.yml
orterraform/vsphere-virtual-machine/content-library-ovf-linux-cloud-init/userdata.yml
was appliedcloud-init status
/etc/cloud/cloud-init.disabled
is present.cat /var/lib/cloud/instances/iid-datasource-none/cloud-config.txt
and see if that looks like this:Log Fragments and Files
No response
Screenshots
Additional Context
No response