Skip to content

Commit

Permalink
docs: update iso_paths
Browse files Browse the repository at this point in the history
Updates the documentation for `iso_paths`.

Signed-off-by: Ryan Johnson <[email protected]>
  • Loading branch information
tenthirtyam authored and lbajolet-hashicorp committed Dec 6, 2023
1 parent 723fe58 commit 70169cd
Show file tree
Hide file tree
Showing 4 changed files with 52 additions and 16 deletions.
17 changes: 13 additions & 4 deletions .web-docs/components/builder/vsphere-clone/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -911,14 +911,23 @@ boot time.

- `cdrom_type` (string) - Which controller to use. Example: `sata`. Defaults to `ide`.

- `iso_paths` ([]string) - List of Datastore or Content Library paths to ISO files that will be mounted to the VM.
Here's an HCL2 example:
- `iso_paths` ([]string) - A list of paths to ISO files in either a datastore or a content library that will be mounted to the VM.

Usage example (HCL):

```hcl
iso_paths = [
"[datastore1] ISO/ubuntu.iso",
"Packer Library Test/ubuntu-16.04.6-server-amd64/ubuntu-16.04.6-server-amd64.iso"
"[nfs] iso/ubuntu-server-amd64.iso",
"Packer/ubuntu-server-amd64/ubuntu-server-amd64.iso"
]
```

Two ISOs are referenced:
1. An ISO in the "_iso_" folder of the "_nfs_" datastore with the file name of "_ubuntu-server-amd64.iso_".
2. An ISO in the "_Packer_" content library with the item name of "_ubuntu-server-amd64_".

-> **Note:** All files in a content library have an associated item name.
To determine the file name, view the datastore backing the content library or use the `govc` vSphere CLI.

<!-- End of code generated from the comments of the CDRomConfig struct in builder/vsphere/common/step_add_cdrom.go; -->

Expand Down
17 changes: 13 additions & 4 deletions .web-docs/components/builder/vsphere-iso/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -667,14 +667,23 @@ iso_paths = [

- `cdrom_type` (string) - Which controller to use. Example: `sata`. Defaults to `ide`.

- `iso_paths` ([]string) - List of Datastore or Content Library paths to ISO files that will be mounted to the VM.
Here's an HCL2 example:
- `iso_paths` ([]string) - A list of paths to ISO files in either a datastore or a content library that will be mounted to the VM.

Usage example (HCL):

```hcl
iso_paths = [
"[datastore1] ISO/ubuntu.iso",
"Packer Library Test/ubuntu-16.04.6-server-amd64/ubuntu-16.04.6-server-amd64.iso"
"[nfs] iso/ubuntu-server-amd64.iso",
"Packer/ubuntu-server-amd64/ubuntu-server-amd64.iso"
]
```

Two ISOs are referenced:
1. An ISO in the "_iso_" folder of the "_nfs_" datastore with the file name of "_ubuntu-server-amd64.iso_".
2. An ISO in the "_Packer_" content library with the item name of "_ubuntu-server-amd64_".

-> **Note:** All files in a content library have an associated item name.
To determine the file name, view the datastore backing the content library or use the `govc` vSphere CLI.

<!-- End of code generated from the comments of the CDRomConfig struct in builder/vsphere/common/step_add_cdrom.go; -->

Expand Down
17 changes: 13 additions & 4 deletions builder/vsphere/common/step_add_cdrom.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,23 @@ import (
type CDRomConfig struct {
// Which controller to use. Example: `sata`. Defaults to `ide`.
CdromType string `mapstructure:"cdrom_type"`
// List of Datastore or Content Library paths to ISO files that will be mounted to the VM.
// Here's an HCL2 example:
// A list of paths to ISO files in either a datastore or a content library that will be mounted to the VM.
//
// Usage example (HCL):
//
// ```hcl
// iso_paths = [
// "[datastore1] ISO/ubuntu.iso",
// "Packer Library Test/ubuntu-16.04.6-server-amd64/ubuntu-16.04.6-server-amd64.iso"
// "[nfs] iso/ubuntu-server-amd64.iso",
// "Packer/ubuntu-server-amd64/ubuntu-server-amd64.iso"
// ]
// ```
//
// Two ISOs are referenced:
// 1. An ISO in the "_iso_" folder of the "_nfs_" datastore with the file name of "_ubuntu-server-amd64.iso_".
// 2. An ISO in the "_Packer_" content library with the item name of "_ubuntu-server-amd64_".
//
// -> **Note:** All files in a content library have an associated item name.
// To determine the file name, view the datastore backing the content library or use the `govc` vSphere CLI.
ISOPaths []string `mapstructure:"iso_paths"`
}

Expand Down
17 changes: 13 additions & 4 deletions docs-partials/builder/vsphere/common/CDRomConfig-not-required.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,22 @@

- `cdrom_type` (string) - Which controller to use. Example: `sata`. Defaults to `ide`.

- `iso_paths` ([]string) - List of Datastore or Content Library paths to ISO files that will be mounted to the VM.
Here's an HCL2 example:
- `iso_paths` ([]string) - A list of paths to ISO files in either a datastore or a content library that will be mounted to the VM.

Usage example (HCL):

```hcl
iso_paths = [
"[datastore1] ISO/ubuntu.iso",
"Packer Library Test/ubuntu-16.04.6-server-amd64/ubuntu-16.04.6-server-amd64.iso"
"[nfs] iso/ubuntu-server-amd64.iso",
"Packer/ubuntu-server-amd64/ubuntu-server-amd64.iso"
]
```

Two ISOs are referenced:
1. An ISO in the "_iso_" folder of the "_nfs_" datastore with the file name of "_ubuntu-server-amd64.iso_".
2. An ISO in the "_Packer_" content library with the item name of "_ubuntu-server-amd64_".

-> **Note:** All files in a content library have an associated item name.
To determine the file name, view the datastore backing the content library or use the `govc` vSphere CLI.

<!-- End of code generated from the comments of the CDRomConfig struct in builder/vsphere/common/step_add_cdrom.go; -->

0 comments on commit 70169cd

Please sign in to comment.