Description
Version
Current main branch as of 2024-08-19
Environment
Mac M1 running Sonoma (14.6.1) with VMware Fusion (13.5.2)
Scenario
Build ubuntu-22.04 (or ubuntu-24.04) box as standard for solely VMware.
Steps to Reproduce
packer build -only=vmware-iso.vm -var-file=os_pkrvars/ubuntu/ubuntu-22.04-aarch64.pkrvars.hcl ./packer_templates
Wait until the "_common/vagrant.sh" script begins to run and an error should occur when it attempts to download the common vagrant user public key stating it cannot resolve raw.githubusercontent.com
This occurs in the following location: https://github.com/chef/bento/blob/main/packer_templates/scripts/_common/vagrant.sh#L9
Expected Result
The networking should be available in the VM at this point and the build for the packer file.
Actual Result
Build fails to to being unable to resolve raw.githubusercontent.com
when attempting to download the vagrant user public key.
Troubleshooting
In my case I edited the _common/vagrant.sh
file and added a sleep 30
to the top of the script, which fixes my issue.
I believe either the ubuntu/update_ubuntu.sh
script rebooting the VM or the ubuntu/networking_ubuntu.sh
script editing the netplan file have something to do with this, one of them making the network unavailable in the VM for a brief period while _common/vagrant.sh
runs.
Essentially some kind of race condition due to things processing the background and the scripts executing too fast.
Activity