packer-cn/website/pages/partials/common/CDConfig-not-required.mdx

48 lines
1.6 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. Packer will use one of the following
tools:
* xorriso
* mkisofs
* hdiutil (normally found in macOS)
* oscdimg (normally found in Windows as part of the Windows ADK)
- `cd_label` (string) - CD Label