47 lines
1.7 KiB
Plaintext
47 lines
1.7 KiB
Plaintext
<!-- Code generated from the comments of the CDConfig struct in common/extra_iso_config.go; DO NOT EDIT MANUALLY -->
|
|
|
|
- `cd_files` ([]string) - A list of files to place onto a CD that is attached when the VM is
|
|
booted. This can include either files or directories; any directories
|
|
will be copied onto the CD recursively, preserving directory structure
|
|
hierarchy. Symlinks will have the link's target copied into the directory
|
|
tree on the CD where the symlink was. File globbing is allowed.
|
|
|
|
Usage example (JSON):
|
|
|
|
```json
|
|
"cd_files": ["./somedirectory/meta-data", "./somedirectory/user-data"],
|
|
"cd_label": "cidata",
|
|
```
|
|
|
|
Usage example (HCL):
|
|
|
|
```hcl
|
|
cd_files = ["./somedirectory/meta-data", "./somedirectory/user-data"]
|
|
cd_label = "cidata"
|
|
```
|
|
|
|
The above will create a CD with two files, user-data and meta-data in the
|
|
CD root. This specific example is how you would create a CD that can be
|
|
used for an Ubuntu 20.04 autoinstall.
|
|
|
|
Since globbing is also supported,
|
|
|
|
```hcl
|
|
cd_files = ["./somedirectory/*"]
|
|
cd_label = "cidata"
|
|
```
|
|
|
|
Would also be an acceptable way to define the above cd. The difference
|
|
between providing the directory with or without the glob is whether the
|
|
directory itself or its contents will be at the CD root.
|
|
|
|
Use of this option assumes that you have a command line tool installed
|
|
that can handle the iso creation. If you are running Packer from an OSX host,
|
|
the required tool is hdiutil which comes preinstalled.
|
|
On linux hosts, you need to have mkisofs.
|
|
On Windows, you must have oscdimg.exe. oscdimg.exe is part of the
|
|
Windows ADK tooks, downloadable from
|
|
https://docs.microsoft.com/en-us/windows-hardware/get-started/adk-install#winADK
|
|
|
|
- `cd_label` (string) - CD Label
|