|
|
|
|
@ -69,8 +69,8 @@ builder.
|
|
|
|
|
over `iso_checksum_url` type.
|
|
|
|
|
|
|
|
|
|
- `iso_checksum_type` (string) - The type of the checksum specified in
|
|
|
|
|
`iso_checksum`. Valid values are "none", "md5", "sha1", "sha256", or
|
|
|
|
|
"sha512" currently. While "none" will skip checksumming, this is not
|
|
|
|
|
`iso_checksum`. Valid values are `none`, `md5`, `sha1`, `sha256`, or
|
|
|
|
|
`sha512` currently. While `none` will skip checksumming, this is not
|
|
|
|
|
recommended since ISO files are generally large and corruption does happen
|
|
|
|
|
from time to time.
|
|
|
|
|
|
|
|
|
|
@ -94,9 +94,29 @@ builder.
|
|
|
|
|
|
|
|
|
|
- `boot_wait` (string) - The time to wait after booting the initial virtual
|
|
|
|
|
machine before typing the `boot_command`. The value of this should be
|
|
|
|
|
a duration. Examples are "5s" and "1m30s" which will cause Packer to wait
|
|
|
|
|
a duration. Examples are `5s` and `1m30s` which will cause Packer to wait
|
|
|
|
|
five seconds and one minute 30 seconds, respectively. If this isn't
|
|
|
|
|
specified, the default is 10 seconds.
|
|
|
|
|
specified, the default is `10s` or 10 seconds.
|
|
|
|
|
|
|
|
|
|
- `cdrom_adapter_type` (string) - The adapter type (or bus) that will be used
|
|
|
|
|
by the cdrom device. This is chosen by default based on the disk adapter
|
|
|
|
|
type. VMware tends to lean towards `ide` for the cdrom device unless
|
|
|
|
|
`sata` is chosen for the disk adapter and so Packer attempts to mirror
|
|
|
|
|
this logic. This field can be specified as either `ide`, `sata`, or `scsi`.
|
|
|
|
|
|
|
|
|
|
- `disable_vnc` (boolean) - Whether to create a VNC connection or not.
|
|
|
|
|
A `boot_command` cannot be used when this is `false`. Defaults to `false`.
|
|
|
|
|
|
|
|
|
|
- `disk_adapter_type` (string) - The adapter type of the VMware virtual disk
|
|
|
|
|
to create. This option is for advanced usage, modify only if you know what
|
|
|
|
|
you're doing. Some of the options you can specify are `ide`, `sata`, `nvme`
|
|
|
|
|
or `scsi` (which uses the "lsilogic" scsi interface by default). If you
|
|
|
|
|
specify another option, Packer will assume that you're specifying a `scsi`
|
|
|
|
|
interface of that specified type. For more information, please consult the
|
|
|
|
|
<a href="http://www.vmware.com/pdf/VirtualDiskManager.pdf" target="_blank"
|
|
|
|
|
rel="nofollow noopener noreferrer">
|
|
|
|
|
Virtual Disk Manager User's Guide</a> for desktop VMware clients.
|
|
|
|
|
For ESXi, refer to the proper ESXi documentation.
|
|
|
|
|
|
|
|
|
|
- `disk_additional_size` (array of integers) - The size(s) of any additional
|
|
|
|
|
hard disks for the VM in megabytes. If this is not specified then the VM
|
|
|
|
|
@ -107,7 +127,7 @@ builder.
|
|
|
|
|
- `disk_size` (number) - The size of the hard disk for the VM in megabytes.
|
|
|
|
|
The builder uses expandable, not fixed-size virtual hard disks, so the
|
|
|
|
|
actual file representing the disk will not use the full size unless it
|
|
|
|
|
is full. By default this is set to 40,000 (about 40 GB).
|
|
|
|
|
is full. By default this is set to `40000` (about 40 GB).
|
|
|
|
|
|
|
|
|
|
- `disk_type_id` (string) - The type of VMware virtual disk to create. This
|
|
|
|
|
option is for advanced usage.
|
|
|
|
|
@ -123,9 +143,9 @@ builder.
|
|
|
|
|
`4` | Preallocated virtual disk compatible with ESX server (VMFS flat).
|
|
|
|
|
`5` | Compressed disk optimized for streaming.
|
|
|
|
|
|
|
|
|
|
The default is "1".
|
|
|
|
|
The default is `1`.
|
|
|
|
|
|
|
|
|
|
For ESXi, this defaults to "zeroedthick". The available options for ESXi
|
|
|
|
|
For ESXi, this defaults to `zeroedthick`. The available options for ESXi
|
|
|
|
|
are: `zeroedthick`, `eagerzeroedthick`, `thin`, `rdm:dev`, `rdmp:dev`,
|
|
|
|
|
`2gbsparse`.
|
|
|
|
|
|
|
|
|
|
@ -133,25 +153,11 @@ builder.
|
|
|
|
|
Guide](https://www.vmware.com/pdf/VirtualDiskManager.pdf) for desktop
|
|
|
|
|
VMware clients. For ESXi, refer to the proper ESXi documentation.
|
|
|
|
|
|
|
|
|
|
- `disk_adapter_type` (string) - The adapter type of the VMware virtual disk
|
|
|
|
|
to create. This option is for advanced usage, modify only if you know what
|
|
|
|
|
you're doing. Some of the options you can specify are "ide", "sata", "nvme"
|
|
|
|
|
or "scsi" (which uses the "lsilogic" scsi interface by default). If you
|
|
|
|
|
specify another option, Packer will assume that you're specifying a "scsi"
|
|
|
|
|
interface of that specified type. For more information, please consult the
|
|
|
|
|
<a href="http://www.vmware.com/pdf/VirtualDiskManager.pdf" target="_blank"
|
|
|
|
|
rel="nofollow noopener noreferrer">
|
|
|
|
|
Virtual Disk Manager User's Guide</a> for desktop VMware clients.
|
|
|
|
|
For ESXi, refer to the proper ESXi documentation.
|
|
|
|
|
|
|
|
|
|
- `cdrom_adapter_type` (string) - The adapter type (or bus) that will be used
|
|
|
|
|
by the cdrom device. This is chosen by default based on the disk adapter
|
|
|
|
|
type. VMware tends to lean towards "ide" for the cdrom device unless
|
|
|
|
|
"sata" is chosen for the disk adapter and so Packer attempts to mirror
|
|
|
|
|
this logic. This field can be specified as either "ide", "sata", or "scsi".
|
|
|
|
|
|
|
|
|
|
- `disable_vnc` (boolean) - Whether to create a VNC connection or not.
|
|
|
|
|
A `boot_command` cannot be used when this is `false`. Defaults to `false`.
|
|
|
|
|
- `floppy_dirs` (array of strings) - A list of directories to place onto
|
|
|
|
|
the floppy disk recursively. This is similar to the `floppy_files` option
|
|
|
|
|
except that the directory structure is preserved. This is useful for when
|
|
|
|
|
your floppy disk includes drivers or if you just want to organize it's
|
|
|
|
|
contents as a hierarchy. Wildcard characters (\*, ?, and \[\]) are allowed.
|
|
|
|
|
|
|
|
|
|
- `floppy_files` (array of strings) - A list of files to place onto a floppy
|
|
|
|
|
disk that is attached when the VM is booted. This is most useful for
|
|
|
|
|
@ -163,44 +169,39 @@ builder.
|
|
|
|
|
and \[\]) are allowed. Directory names are also allowed, which will add all
|
|
|
|
|
the files found in the directory to the floppy.
|
|
|
|
|
|
|
|
|
|
- `floppy_dirs` (array of strings) - A list of directories to place onto
|
|
|
|
|
the floppy disk recursively. This is similar to the `floppy_files` option
|
|
|
|
|
except that the directory structure is preserved. This is useful for when
|
|
|
|
|
your floppy disk includes drivers or if you just want to organize it's
|
|
|
|
|
contents as a hierarchy. Wildcard characters (\*, ?, and \[\]) are allowed.
|
|
|
|
|
|
|
|
|
|
- `fusion_app_path` (string) - Path to "VMware Fusion.app". By default this is
|
|
|
|
|
"/Applications/VMware Fusion.app" but this setting allows you to
|
|
|
|
|
`/Applications/VMware Fusion.app` but this setting allows you to
|
|
|
|
|
customize this.
|
|
|
|
|
|
|
|
|
|
- `guest_os_type` (string) - The guest OS type being installed. This will be
|
|
|
|
|
set in the VMware VMX. By default this is "other". By specifying a more
|
|
|
|
|
set in the VMware VMX. By default this is `other`. By specifying a more
|
|
|
|
|
specific OS type, VMware may perform some optimizations or virtual hardware
|
|
|
|
|
changes to better support the operating system running in the
|
|
|
|
|
virtual machine.
|
|
|
|
|
|
|
|
|
|
- `headless` (boolean) - Packer defaults to building VMware virtual machines
|
|
|
|
|
by launching a GUI that shows the console of the machine being built. When
|
|
|
|
|
this value is set to true, the machine will start without a console. For
|
|
|
|
|
this value is set to `true`, the machine will start without a console. For
|
|
|
|
|
VMware machines, Packer will output VNC connection information in case you
|
|
|
|
|
need to connect to the console to debug the build process.
|
|
|
|
|
|
|
|
|
|
- `http_directory` (string) - Path to a directory to serve using an
|
|
|
|
|
HTTP server. The files in this directory will be available over HTTP that
|
|
|
|
|
will be requestable from the virtual machine. This is useful for hosting
|
|
|
|
|
kickstart files and so on. By default this is "", which means no HTTP server
|
|
|
|
|
will be started. The address and port of the HTTP server will be available
|
|
|
|
|
as variables in `boot_command`. This is covered in more detail below.
|
|
|
|
|
kickstart files and so on. By default this is an empty string, which means
|
|
|
|
|
no HTTP server will be started. The address and port of the HTTP server will
|
|
|
|
|
be available as variables in `boot_command`. This is covered in more detail
|
|
|
|
|
below.
|
|
|
|
|
|
|
|
|
|
- `http_port_min` and `http_port_max` (number) - These are the minimum and
|
|
|
|
|
maximum port to use for the HTTP server started to serve the
|
|
|
|
|
`http_directory`. Because Packer often runs in parallel, Packer will choose
|
|
|
|
|
a randomly available port in this range to run the HTTP server. If you want
|
|
|
|
|
to force the HTTP server to be on one port, make this minimum and maximum
|
|
|
|
|
port the same. By default the values are 8000 and 9000, respectively.
|
|
|
|
|
port the same. By default the values are `8000` and `9000`, respectively.
|
|
|
|
|
|
|
|
|
|
- `iso_target_extension` (string) - The extension of the iso file after
|
|
|
|
|
download. This defaults to "iso".
|
|
|
|
|
download. This defaults to `iso`.
|
|
|
|
|
|
|
|
|
|
- `iso_target_path` (string) - The path where the iso should be saved after
|
|
|
|
|
download. By default will go in the packer cache, with a hash of the
|
|
|
|
|
@ -214,11 +215,11 @@ builder.
|
|
|
|
|
|
|
|
|
|
- `network` (string) - This is the network type that the virtual machine will
|
|
|
|
|
be created with. This can be one of the generic values that map to a device
|
|
|
|
|
such as "hostonly", "nat", or "bridged". If the network is not one of these
|
|
|
|
|
such as `hostonly`, `nat`, or `bridged`. If the network is not one of these
|
|
|
|
|
values, then it is assumed to be a VMware network device. (VMnet0..x)
|
|
|
|
|
|
|
|
|
|
- `network_adapter_type` (string) - This is the ethernet adapter type the the
|
|
|
|
|
virtual machine will be created with. By default the "e1000" network adapter
|
|
|
|
|
virtual machine will be created with. By default the `e1000` network adapter
|
|
|
|
|
type will be used by Packer. For more information, please consult the
|
|
|
|
|
<a href="https://kb.vmware.com/s/article/1001805" target="_blank"
|
|
|
|
|
rel="nofollow noopener noreferrer">
|
|
|
|
|
@ -229,12 +230,12 @@ builder.
|
|
|
|
|
resulting virtual machine will be created. This may be relative or absolute.
|
|
|
|
|
If relative, the path is relative to the working directory when `packer`
|
|
|
|
|
is executed. This directory must not exist or be empty prior to running
|
|
|
|
|
the builder. By default this is "output-BUILDNAME" where "BUILDNAME" is the
|
|
|
|
|
the builder. By default this is `output-BUILDNAME` where "BUILDNAME" is the
|
|
|
|
|
name of the build.
|
|
|
|
|
|
|
|
|
|
- `parallel` (string) - This specifies a parallel port to add to the VM. It
|
|
|
|
|
has the format of `Type:option1,option2,...`. Type can be one of the
|
|
|
|
|
following values: "FILE", "DEVICE", "AUTO", or "NONE".
|
|
|
|
|
following values: `FILE`, `DEVICE`, `AUTO`, or `NONE`.
|
|
|
|
|
|
|
|
|
|
* `FILE:path` - Specifies the path to the local file to be used for the
|
|
|
|
|
parallel port.
|
|
|
|
|
@ -254,12 +255,12 @@ builder.
|
|
|
|
|
- `remote_cache_directory` (string) - The path where the ISO and/or floppy
|
|
|
|
|
files will be stored during the build on the remote machine. The path is
|
|
|
|
|
relative to the `remote_cache_datastore` on the remote machine. By default
|
|
|
|
|
this is "packer\_cache". This only has an effect if `remote_type`
|
|
|
|
|
this is `packer_cache`. This only has an effect if `remote_type`
|
|
|
|
|
is enabled.
|
|
|
|
|
|
|
|
|
|
- `remote_datastore` (string) - The path to the datastore where the resulting
|
|
|
|
|
VM will be stored when it is built on the remote machine. By default this
|
|
|
|
|
is "datastore1". This only has an effect if `remote_type` is enabled.
|
|
|
|
|
is `datastore1`. This only has an effect if `remote_type` is enabled.
|
|
|
|
|
|
|
|
|
|
- `remote_host` (string) - The host of the remote machine used for access.
|
|
|
|
|
This is only required if `remote_type` is enabled.
|
|
|
|
|
@ -274,7 +275,7 @@ builder.
|
|
|
|
|
|
|
|
|
|
- `remote_type` (string) - The type of remote machine that will be used to
|
|
|
|
|
build this VM rather than a local desktop product. The only value accepted
|
|
|
|
|
for this currently is "esx5". If this is not set, a desktop product will
|
|
|
|
|
for this currently is `esx5`. If this is not set, a desktop product will
|
|
|
|
|
be used. By default, this is not set.
|
|
|
|
|
|
|
|
|
|
- `remote_username` (string) - The username for the SSH user that will access
|
|
|
|
|
@ -322,7 +323,7 @@ builder.
|
|
|
|
|
- `shutdown_timeout` (string) - The amount of time to wait after executing the
|
|
|
|
|
`shutdown_command` for the virtual machine to actually shut down. If it
|
|
|
|
|
doesn't shut down in this time, it is an error. By default, the timeout is
|
|
|
|
|
"5m", or five minutes.
|
|
|
|
|
`5m` or five minutes.
|
|
|
|
|
|
|
|
|
|
- `skip_compaction` (boolean) - VMware-created disks are defragmented and
|
|
|
|
|
compacted at the end of the build process using `vmware-vdiskmanager`. In
|
|
|
|
|
@ -348,7 +349,7 @@ builder.
|
|
|
|
|
- `sound` (boolean) - Enable VMware's virtual soundcard device for the VM.
|
|
|
|
|
|
|
|
|
|
- `tools_upload_flavor` (string) - The flavor of the VMware Tools ISO to
|
|
|
|
|
upload into the VM. Valid values are "darwin", "linux", and "windows". By
|
|
|
|
|
upload into the VM. Valid values are `darwin`, `linux`, and `windows`. By
|
|
|
|
|
default, this is empty, which means VMware tools won't be uploaded.
|
|
|
|
|
|
|
|
|
|
- `tools_upload_path` (string) - The path in the VM to upload the
|
|
|
|
|
@ -357,23 +358,23 @@ builder.
|
|
|
|
|
template](/docs/templates/engine.html) that has a single
|
|
|
|
|
valid variable: `Flavor`, which will be the value of `tools_upload_flavor`.
|
|
|
|
|
By default the upload path is set to `{{.Flavor}}.iso`. This setting is not
|
|
|
|
|
used when `remote_type` is "esx5".
|
|
|
|
|
used when `remote_type` is `esx5`.
|
|
|
|
|
|
|
|
|
|
- `usb` (boolean) - Enable VMware's USB bus for the guest VM. To enable usage
|
|
|
|
|
of the XHCI bus for USB 3 (5 Gbit/s), one can use the `vmx_data` option to
|
|
|
|
|
enable it by specifying "true" for the `usb_xhci.present` property.
|
|
|
|
|
enable it by specifying `true` for the `usb_xhci.present` property.
|
|
|
|
|
|
|
|
|
|
- `version` (string) - The [vmx hardware
|
|
|
|
|
version](http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1003746)
|
|
|
|
|
for the new virtual machine. Only the default value has been tested, any
|
|
|
|
|
other value is experimental. Default value is '9'.
|
|
|
|
|
other value is experimental. Default value is `9`.
|
|
|
|
|
|
|
|
|
|
- `vm_name` (string) - This is the name of the VMX file for the new virtual
|
|
|
|
|
machine, without the file extension. By default this is "packer-BUILDNAME",
|
|
|
|
|
machine, without the file extension. By default this is `packer-BUILDNAME`,
|
|
|
|
|
where "BUILDNAME" is the name of the build.
|
|
|
|
|
|
|
|
|
|
- `vmdk_name` (string) - The filename of the virtual disk that'll be created,
|
|
|
|
|
without the extension. This defaults to "packer".
|
|
|
|
|
without the extension. This defaults to `packer`.
|
|
|
|
|
|
|
|
|
|
- `vmx_data` (object of key/value strings) - Arbitrary key/values to enter
|
|
|
|
|
into the virtual machine VMX file. This is for advanced users who want to
|
|
|
|
|
@ -383,10 +384,11 @@ builder.
|
|
|
|
|
except that it is run after the virtual machine is shutdown, and before the
|
|
|
|
|
virtual machine is exported.
|
|
|
|
|
|
|
|
|
|
- `vmx_remove_ethernet_interfaces` (boolean) - Remove all ethernet interfaces from
|
|
|
|
|
the VMX file after building. This is for advanced users who understand the
|
|
|
|
|
ramifications, but is useful for building Vagrant boxes since Vagrant will
|
|
|
|
|
create ethernet interfaces when provisioning a box.
|
|
|
|
|
- `vmx_remove_ethernet_interfaces` (boolean) - Remove all ethernet interfaces
|
|
|
|
|
from the VMX file after building. This is for advanced users who understand
|
|
|
|
|
the ramifications, but is useful for building Vagrant boxes since Vagrant
|
|
|
|
|
will create ethernet interfaces when provisioning a box. Defaults to
|
|
|
|
|
`false`.
|
|
|
|
|
|
|
|
|
|
- `vmx_template_path` (string) - Path to a [configuration
|
|
|
|
|
template](/docs/templates/engine.html) that defines the
|
|
|
|
|
@ -395,18 +397,19 @@ builder.
|
|
|
|
|
below for more information. For basic VMX modifications, try
|
|
|
|
|
`vmx_data` first.
|
|
|
|
|
|
|
|
|
|
- `vnc_bind_address` (string / IP address) - The IP address that should be binded
|
|
|
|
|
to for VNC. By default packer will use 127.0.0.1 for this. If you wish to bind
|
|
|
|
|
to all interfaces use 0.0.0.0
|
|
|
|
|
- `vnc_bind_address` (string / IP address) - The IP address that should be
|
|
|
|
|
binded to for VNC. By default packer will use `127.0.0.1` for this. If you
|
|
|
|
|
wish to bind to all interfaces use `0.0.0.0`.
|
|
|
|
|
|
|
|
|
|
- `vnc_disable_password` (boolean) - Don't auto-generate a VNC password that is
|
|
|
|
|
used to secure the VNC communication with the VM.
|
|
|
|
|
- `vnc_disable_password` (boolean) - Don't auto-generate a VNC password that
|
|
|
|
|
is used to secure the VNC communication with the VM.
|
|
|
|
|
|
|
|
|
|
- `vnc_port_min` and `vnc_port_max` (number) - The minimum and maximum port
|
|
|
|
|
to use for VNC access to the virtual machine. The builder uses VNC to type
|
|
|
|
|
the initial `boot_command`. Because Packer generally runs in parallel,
|
|
|
|
|
Packer uses a randomly chosen port in this range that appears available. By
|
|
|
|
|
default this is 5900 to 6000. The minimum and maximum ports are inclusive.
|
|
|
|
|
default this is `5900` to `6000`. The minimum and maximum ports are
|
|
|
|
|
inclusive.
|
|
|
|
|
|
|
|
|
|
## Boot Command
|
|
|
|
|
|
|
|
|
|
|