From eb761dc3ace3bb3a89f04303f0793d800a59a434 Mon Sep 17 00:00:00 2001 From: Christoph Hartmann Date: Wed, 18 Oct 2023 19:38:59 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=A7=B9=20update=20vsphere=20example=20(#1?= =?UTF-8?q?36)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/actions/spelling/expect.txt | 1 + examples/packer-vsphere/rocky8/README.md | 18 +++++++++++++++++- .../rocky8/rocky-8.auto.pkrvars.hcl | 6 +++--- 3 files changed, 21 insertions(+), 4 deletions(-) diff --git a/.github/actions/spelling/expect.txt b/.github/actions/spelling/expect.txt index 5642649..10a49a8 100644 --- a/.github/actions/spelling/expect.txt +++ b/.github/actions/spelling/expect.txt @@ -2,3 +2,4 @@ tions pkrvars pkr linux +mkpasswd diff --git a/examples/packer-vsphere/rocky8/README.md b/examples/packer-vsphere/rocky8/README.md index 49635fd..fa83bf0 100644 --- a/examples/packer-vsphere/rocky8/README.md +++ b/examples/packer-vsphere/rocky8/README.md @@ -2,7 +2,23 @@ This example builds Rocky Linux 8 with vSphere. -Update the `variables.pkrvars.hcl` file with your settings. Then run packer build: +Edit the `variables.pkrvars.hcl` file to configure the credentials for the default account on machine images. + +```hcl title="config/build.pkrvars.hcl" +build_username = "example" +build_password = "" +build_password_encrypted = "" +build_key = "" +``` + +Run the following command to generate a SHA-512 encrypted password for the `build_password_encrypted` using mkpasswd. + +```shell +docker run -it --rm alpine:latest +mkpasswd -m sha512 +``` + +Then run packer build: ``` packer build -force -var-file variables.pkrvars.hcl . diff --git a/examples/packer-vsphere/rocky8/rocky-8.auto.pkrvars.hcl b/examples/packer-vsphere/rocky8/rocky-8.auto.pkrvars.hcl index 14d8520..240223b 100644 --- a/examples/packer-vsphere/rocky8/rocky-8.auto.pkrvars.hcl +++ b/examples/packer-vsphere/rocky8/rocky-8.auto.pkrvars.hcl @@ -31,11 +31,11 @@ vm_disk_thin_provisioned = true vm_network_card = "vmxnet3" // Removable Media Settings -iso_url = "https://download.rockylinux.org/pub/rocky/8.7/isos/x86_64/Rocky-x86_64-dvd1.iso" +iso_url = "https://download.rockylinux.org/pub/rocky/8.8/isos/x86_64/Rocky-x86_64-dvd1.iso" iso_path = "packer_cache/" -iso_file = "2c26025b225a69dcec1e521fc7a44b2465e10587.iso" +iso_file = "7b8bdfe189cf24ae5c2d6a88f7a0b5f3012d23f9332c47943d538b4bc03a3704.iso" iso_checksum_type = "sha256" -iso_checksum_value = "4827dce1c58560d3ca470a5053e8d86ba059cbb77cfca3b5f6a5863d2aac5b84" +iso_checksum_value = "7b8bdfe189cf24ae5c2d6a88f7a0b5f3012d23f9332c47943d538b4bc03a3704" // Boot Settings vm_boot_order = "disk,cdrom"