Comments (2)
Added relevant labels...
I can confirm that the error does present itself in the script but does not impact the build completion.
I'll take a look into it and issue a patch after some triage.
CONFIRM: Build a Ubuntu Server 20.04 LTS Template for VMware vSphere?
Continue? (y/n)
y
Building a Ubuntu Server 20.04 LTS Template for VMware vSphere...
Initializing HashiCorp Packer and required plugins...
Starting the HashiCorp Packer build...
vsphere-iso.linux-ubuntu-server: output will be in this color.
==> vsphere-iso.linux-ubuntu-server: Creating CD disk...
vsphere-iso.linux-ubuntu-server: Warning: creating filesystem with Joliet extensions but without Rock Ridge
vsphere-iso.linux-ubuntu-server: extensions. It is highly recommended to add Rock Ridge.
vsphere-iso.linux-ubuntu-server: I: -input-charset not specified, using utf-8 (detected in locale settings)
vsphere-iso.linux-ubuntu-server: Total translation table size: 0
vsphere-iso.linux-ubuntu-server: Total rockridge attributes bytes: 0
vsphere-iso.linux-ubuntu-server: Total directory bytes: 156
vsphere-iso.linux-ubuntu-server: Path table size(bytes): 10
vsphere-iso.linux-ubuntu-server: Max brk space used 0
vsphere-iso.linux-ubuntu-server: 183 extents written (0 MB)
vsphere-iso.linux-ubuntu-server: Done copying paths from CD_dirs
==> vsphere-iso.linux-ubuntu-server: Uploading packer2322708688.iso to packer_cache/packer2322708688.iso
==> vsphere-iso.linux-ubuntu-server: Creating VM...
==> vsphere-iso.linux-ubuntu-server: Customizing hardware...
==> vsphere-iso.linux-ubuntu-server: Adding SATA controller...
==> vsphere-iso.linux-ubuntu-server: Mounting ISO images...
==> vsphere-iso.linux-ubuntu-server: Adding configuration parameters...
==> vsphere-iso.linux-ubuntu-server: Set boot order...
==> vsphere-iso.linux-ubuntu-server: Power on VM...
==> vsphere-iso.linux-ubuntu-server: Waiting 5s for boot...
==> vsphere-iso.linux-ubuntu-server: Typing boot command...
==> vsphere-iso.linux-ubuntu-server: Waiting for IP...
==> vsphere-iso.linux-ubuntu-server: IP address: 172.16.14.193
==> vsphere-iso.linux-ubuntu-server: Using SSH communicator to connect: 172.16.14.193
==> vsphere-iso.linux-ubuntu-server: Waiting for SSH to become available...
==> vsphere-iso.linux-ubuntu-server: Connected to SSH!
==> vsphere-iso.linux-ubuntu-server: Provisioning with Ansible...
vsphere-iso.linux-ubuntu-server: Setting up proxy adapter for Ansible....
==> vsphere-iso.linux-ubuntu-server: Executing Ansible: <sensitive>-playbook -e packer_build_name="linux-ubuntu-server" -e packer_builder_type=vsphere-iso -e packer_http_addr=172.16.11.253:0 --ssh-extra-args '-o IdentitiesOnly=yes' -e display_skipped_hosts = false -e <sensitive>_ssh_private_key_file=/tmp/<sensitive>-key3829307727 -i /tmp/packer-provisioner-<sensitive>2548551550 /home/packer/packer-vsphere/<sensitive>/main.yml
vsphere-iso.linux-ubuntu-server:
vsphere-iso.linux-ubuntu-server: PLAY [all] *********************************************************************
vsphere-iso.linux-ubuntu-server:
vsphere-iso.linux-ubuntu-server: TASK [Gathering Facts] *********************************************************
vsphere-iso.linux-ubuntu-server: ok: [default]
vsphere-iso.linux-ubuntu-server: included: /home/packer/packer-vsphere/<sensitive>/roles/base/tasks/ubuntu.yml for default
vsphere-iso.linux-ubuntu-server:
vsphere-iso.linux-ubuntu-server: TASK [base : Ubuntu - Updating the guest operating system.] ********************
vsphere-iso.linux-ubuntu-server: changed: [default]
vsphere-iso.linux-ubuntu-server:
vsphere-iso.linux-ubuntu-server: TASK [base : Ubuntu - Installing additional packages.] *************************
vsphere-iso.linux-ubuntu-server: changed: [default]
vsphere-iso.linux-ubuntu-server:
vsphere-iso.linux-ubuntu-server: TASK [base : Ubuntu - Importing Certificate Authority certificates.] ***********
vsphere-iso.linux-ubuntu-server: changed: [default]
vsphere-iso.linux-ubuntu-server:
vsphere-iso.linux-ubuntu-server: RUNNING HANDLER [base : Ubuntu - Updating the certificate authority trust.] ****
vsphere-iso.linux-ubuntu-server: changed: [default]
vsphere-iso.linux-ubuntu-server:
vsphere-iso.linux-ubuntu-server: PLAY RECAP *********************************************************************
vsphere-iso.linux-ubuntu-server: default : ok=6 changed=4 unreachable=0 failed=0 skipped=2 rescued=0 ignored=0
vsphere-iso.linux-ubuntu-server:
==> vsphere-iso.linux-ubuntu-server: Provisioning with shell script: /home/packer/packer-vsphere/scripts/linux/ubuntu-server-2x.sh
vsphere-iso.linux-ubuntu-server: > Updating the default local user ...
==> vsphere-iso.linux-ubuntu-server: + export BUILD_USERNAME
==> vsphere-iso.linux-ubuntu-server: + export BUILD_KEY
vsphere-iso.linux-ubuntu-server: > Adding authorized_keys for the default local user ...
==> vsphere-iso.linux-ubuntu-server: + export ANSIBLE_USERNAME
==> vsphere-iso.linux-ubuntu-server: + export ANSIBLE_KEY
==> vsphere-iso.linux-ubuntu-server: + echo > Updating the default local user ...
==> vsphere-iso.linux-ubuntu-server: + echo > Adding authorized_keys for the default local user ...
==> vsphere-iso.linux-ubuntu-server: + sudo mkdir -p /home/<sensitive>/.ssh
==> vsphere-iso.linux-ubuntu-server: + sudo cat
==> vsphere-iso.linux-ubuntu-server: + sudo chown -R <sensitive> /home/<sensitive>/.ssh
==> vsphere-iso.linux-ubuntu-server: + sudo chmod 700 /home/<sensitive>/.ssh
==> vsphere-iso.linux-ubuntu-server: + sudo chmod 644 /home/<sensitive>/.ssh/authorized_keys
vsphere-iso.linux-ubuntu-server: > Adding the default local user to passwordless sudoers...
==> vsphere-iso.linux-ubuntu-server: + echo > Adding the default local user to passwordless sudoers...
==> vsphere-iso.linux-ubuntu-server: + sudo bash -c echo "<sensitive> ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers
==> vsphere-iso.linux-ubuntu-server: + echo > Creating a local user for Ansible ...
==> vsphere-iso.linux-ubuntu-server: + sudo groupadd <sensitive>
vsphere-iso.linux-ubuntu-server: > Creating a local user for Ansible ...
==> vsphere-iso.linux-ubuntu-server: + sudo useradd -g <sensitive> -m -s /bin/bash <sensitive>
==> vsphere-iso.linux-ubuntu-server: + sudo usermod -aG sudo <sensitive>
==> vsphere-iso.linux-ubuntu-server: + sudo chpasswd
==> vsphere-iso.linux-ubuntu-server: + openssl rand -base64 14
==> vsphere-iso.linux-ubuntu-server: + echo <sensitive>:F3ugMA08i2i31fxSVyk=
vsphere-iso.linux-ubuntu-server: > Adding authorized_keys for local Ansible user ...
==> vsphere-iso.linux-ubuntu-server: + echo > Adding authorized_keys for local Ansible user ...
==> vsphere-iso.linux-ubuntu-server: + sudo mkdir /home/<sensitive>/.ssh
==> vsphere-iso.linux-ubuntu-server: + sudo cat
==> vsphere-iso.linux-ubuntu-server: + sudo chown -R <sensitive>:<sensitive> /home/<sensitive>/.ssh
==> vsphere-iso.linux-ubuntu-server: + sudo chmod 700 /home/<sensitive>/.ssh
==> vsphere-iso.linux-ubuntu-server: + sudo chmod 600 /home/<sensitive>/.ssh/authorized_keys
vsphere-iso.linux-ubuntu-server: > Adding local Ansible user to passwordless sudoers...
==> vsphere-iso.linux-ubuntu-server: + echo > Adding local Ansible user to passwordless sudoers...
==> vsphere-iso.linux-ubuntu-server: + sudo bash -c echo "<sensitive> ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers
vsphere-iso.linux-ubuntu-server: > Configuring SSH for Public Key Authentication ...
==> vsphere-iso.linux-ubuntu-server: + echo > Configuring SSH for Public Key Authentication ...
==> vsphere-iso.linux-ubuntu-server: + sudo sed -i s/.*PubkeyAuthentication.*/PubkeyAuthentication yes/ /etc/ssh/sshd_config
vsphere-iso.linux-ubuntu-server: > Restarting the SSH daemon. ...
==> vsphere-iso.linux-ubuntu-server: + echo > Restarting the SSH daemon. ...
==> vsphere-iso.linux-ubuntu-server: + sudo systemctl restart sshd
vsphere-iso.linux-ubuntu-server: > Disabling and clean tmp ...
==> vsphere-iso.linux-ubuntu-server: + echo > Disabling and clean tmp ...
==> vsphere-iso.linux-ubuntu-server: + sudo sed -i s/D/#&/ /usr/lib/tmpfiles.d/tmp.conf
==> vsphere-iso.linux-ubuntu-server: + echo > Creating the clean script ...
==> vsphere-iso.linux-ubuntu-server: + cloud-init ...
vsphere-iso.linux-ubuntu-server: > Creating the clean script ...
==> vsphere-iso.linux-ubuntu-server: usage: /usr/bin/cloud-init [-h] [--version] [--file FILES] [--debug] [--force]
==> vsphere-iso.linux-ubuntu-server: {init,modules,single,query,dhclient-hook,features,analyze,devel,collect-logs,clean,status}
==> vsphere-iso.linux-ubuntu-server: ...
==> vsphere-iso.linux-ubuntu-server: /usr/bin/cloud-init: error: argument subcommand: invalid choice: '...' (choose from 'init', 'modules', 'single', 'query', 'dhclient-hook', 'features', 'analyze', 'devel', 'collect-logs', 'clean', 'status')
==> vsphere-iso.linux-ubuntu-server: + GRUB ...
==> vsphere-iso.linux-ubuntu-server: /tmp/script_8182.sh: 1: GRUB: not found
==> vsphere-iso.linux-ubuntu-server: + sudo cat
==> vsphere-iso.linux-ubuntu-server: + echo > Changing the permissions on /home/$BUILD_USERNAME/clean.sh ...
vsphere-iso.linux-ubuntu-server: > Changing the permissions on /home/$BUILD_USERNAME/clean.sh ...
==> vsphere-iso.linux-ubuntu-server: + sudo chmod +x /home/<sensitive>/clean.sh
vsphere-iso.linux-ubuntu-server: > Running the clean script ...
==> vsphere-iso.linux-ubuntu-server: + echo > Running the clean script ...
==> vsphere-iso.linux-ubuntu-server: + sudo /home/<sensitive>/clean.sh
vsphere-iso.linux-ubuntu-server: > Cleaning all audit logs ...
vsphere-iso.linux-ubuntu-server: > Cleaning persistent udev rules ...
vsphere-iso.linux-ubuntu-server: > Cleaning /tmp directories ...
vsphere-iso.linux-ubuntu-server: > Cleaning the SSH keys ...
vsphere-iso.linux-ubuntu-server: > Setting the hostname to localhost ...
vsphere-iso.linux-ubuntu-server: > Cleaning apt cache ...
vsphere-iso.linux-ubuntu-server: Reading package lists...
vsphere-iso.linux-ubuntu-server: Building dependency tree...
vsphere-iso.linux-ubuntu-server: Reading state information...
vsphere-iso.linux-ubuntu-server: 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
vsphere-iso.linux-ubuntu-server: > Cleaning the machine-id ...
vsphere-iso.linux-ubuntu-server: > Cleaning the shell history ...
vsphere-iso.linux-ubuntu-server:
vsphere-iso.linux-ubuntu-server:
==> vsphere-iso.linux-ubuntu-server: Sourcing file `/etc/default/grub'
==> vsphere-iso.linux-ubuntu-server: Sourcing file `/etc/default/grub.d/init-select.cfg'
==> vsphere-iso.linux-ubuntu-server: Generating grub configuration file ...
==> vsphere-iso.linux-ubuntu-server: Found linux image: /boot/vmlinuz-5.4.0-90-generic
==> vsphere-iso.linux-ubuntu-server: Found initrd image: /boot/initrd.img-5.4.0-90-generic
==> vsphere-iso.linux-ubuntu-server: Adding boot menu entry for UEFI Firmware Settings
==> vsphere-iso.linux-ubuntu-server: done
==> vsphere-iso.linux-ubuntu-server: + echo > Setting check for ssh keys on reboot; will regenerate on reboot if neccessary. ...
vsphere-iso.linux-ubuntu-server: > Setting check for ssh keys on reboot; will regenerate on reboot if neccessary. ...
==> vsphere-iso.linux-ubuntu-server: + sudo cat
==> vsphere-iso.linux-ubuntu-server: + sudo chmod +x /etc/rc.local
vsphere-iso.linux-ubuntu-server: > Done.
==> vsphere-iso.linux-ubuntu-server: + echo > Done.
==> vsphere-iso.linux-ubuntu-server: Executing shutdown command...
==> vsphere-iso.linux-ubuntu-server: Deleting Floppy drives...
==> vsphere-iso.linux-ubuntu-server: Eject CD-ROM drives...
==> vsphere-iso.linux-ubuntu-server: Deleting CD-ROM drives...
==> vsphere-iso.linux-ubuntu-server: Clear boot order...
==> vsphere-iso.linux-ubuntu-server: Importing VM OVF template linux-ubuntu-server-20-04-lts to Content Library...
==> vsphere-iso.linux-ubuntu-server: Destroying VM...
==> vsphere-iso.linux-ubuntu-server: Running post-processor: (type manifest)
Build 'vsphere-iso.linux-ubuntu-server' finished after 7 minutes 33 seconds.
==> Wait completed after 7 minutes 33 seconds
==> Builds finished. The artifacts of successful builds are:
--> vsphere-iso.linux-ubuntu-server: linux-ubuntu-server-20-04-lts
--> vsphere-iso.linux-ubuntu-server: linux-ubuntu-server-20-04-lts
Done.
Press Enter to continue.
Ryan
from packer-examples-for-vsphere.
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.
from packer-examples-for-vsphere.
Related Issues (20)
- Ubuntu Server 23.10 failing due ansible collection(s) missing HOT 1
- `develop`: SSH not enabled after build HOT 2
- Stuck on lanaguage selection (no cloud-init usage) HOT 1
- Debian 12 disk based deployement not working HOT 3
- Debian 12 disk-based deployment not working HOT 4
- Unset variable error while building Debian 11 HOT 1
- LVM partition taking into account remaining space on Volume Group HOT 1
- Add support for an option to use a content library for ISOs HOT 1
- Templated creation of .gitlab-ci.yml broken by change PR #473 HOT 1
- Boot delay for Debian images HOT 18
- Unable to deploy Debian 12.4 image using Terraform HOT 9
- Add support for Windows Server 2025 Insiders Preview HOT 1
- Fix Windows Server 2019 Desktop Experience builds HOT 1
- Firmware and boot issues
- VMs deployed of Debian 12.4 templates do not boot up with network device connected. HOT 6
- Simple solve for AlmaLinux 8 - Failed to validate GPG signature HOT 4
- Photon Build Failures HOT 8
- Server 2016 Needs HOT 3
- can't mount centos 7 iso HOT 3
- Not able to create Rhel-8 Image its getting timed out after IP allocation HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from packer-examples-for-vsphere.