35 lines
1.3 KiB
Plaintext
35 lines
1.3 KiB
Plaintext
<!-- Code generated from the comments of the VBoxManageConfig struct in builder/virtualbox/common/vboxmanage_config.go; DO NOT EDIT MANUALLY -->
|
|
|
|
- `vboxmanage` ([][]string) - Custom `VBoxManage` commands to execute in order to further customize
|
|
the virtual machine being created. The example shown below sets the memory and number of CPUs
|
|
within the virtual machine:
|
|
|
|
In JSON:
|
|
```json
|
|
"vboxmanage": [
|
|
["modifyvm", "{{.Name}}", "--memory", "1024"],
|
|
["modifyvm", "{{.Name}}", "--cpus", "2"]
|
|
]
|
|
```
|
|
|
|
In HCL2:
|
|
```hcl
|
|
vboxmanage = [
|
|
["modifyvm", "{{.Name}}", "--memory", "1024"],
|
|
["modifyvm", "{{.Name}}", "--cpus", "2"],
|
|
]
|
|
```
|
|
|
|
The value of `vboxmanage` is an array of commands to execute. These commands are
|
|
executed in the order defined. So in the above example, the memory will be set
|
|
followed by the CPUs.
|
|
Each command itself is an array of strings, where each string is an argument to
|
|
`VBoxManage`. Each argument is treated as a [configuration
|
|
template](/docs/templates/engine). The only available
|
|
variable is `Name` which is replaced with the unique name of the VM, which is
|
|
required for many VBoxManage calls.
|
|
|
|
- `vboxmanage_post` ([][]string) - Identical to vboxmanage,
|
|
except that it is run after the virtual machine is shutdown, and before the
|
|
virtual machine is exported.
|