Skip to content

Commit

Permalink
🧹 update vsphere example (#136)
Browse files Browse the repository at this point in the history
  • Loading branch information
chris-rock authored Oct 18, 2023
1 parent c55e1d8 commit eb761dc
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 4 deletions.
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

0 comments on commit eb761dc

Please sign in to comment.