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

🧹 update vsphere example #136

Merged
merged 1 commit into from
Oct 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/actions/spelling/expect.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ tions
pkrvars
pkr
linux
mkpasswd
18 changes: 17 additions & 1 deletion examples/packer-vsphere/rocky8/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 = "<plaintext_password>"
build_password_encrypted = "<sha512_encrypted_password>"
build_key = "<public_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 .
Expand Down
6 changes: 3 additions & 3 deletions examples/packer-vsphere/rocky8/rocky-8.auto.pkrvars.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down