Merge pull request #6172 from tylert/more-doc-fixups

More cleanup in communicator and builder docs
This commit is contained in:
Matthew Hooker 2018-04-21 18:51:17 -07:00 committed by GitHub
commit 18147a367c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 270 additions and 256 deletions

0
website/source/docs/builders/openstack.html.md Executable file → Normal file
View File

View File

@ -92,8 +92,8 @@ Linux server and have not enabled X11 forwarding (`ssh -X`).
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.
@ -107,15 +107,15 @@ Linux server and have not enabled X11 forwarding (`ssh -X`).
this is an HTTP URL, Packer will download it and cache it between runs.
This can also be a URL to an IMG or QCOW2 file, in which case QEMU will
boot directly from it. When passing a path to an IMG or QCOW2 file, you
should set `disk_image` to "true".
should set `disk_image` to `true`.
### Optional:
- `accelerator` (string) - The accelerator type to use when running the VM.
This may be `none`, `kvm`, `tcg`, `hax`, or `xen`. The appropriate software
must have already been installed on your build machine to use the accelerator
you specified. When no accelerator is specified, Packer will try to use `kvm`
if it is available but will default to `tcg` otherwise.
must have already been installed on your build machine to use the
accelerator you specified. When no accelerator is specified, Packer will try
to use `kvm` if it is available but will default to `tcg` otherwise.
-> The `hax` accelerator has issues attaching CDROM ISOs. This is an
upstream issue which can be tracked
@ -130,19 +130,19 @@ Linux server and have not enabled X11 forwarding (`ssh -X`).
- `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.
- `disk_cache` (string) - The cache mode to use for disk. Allowed values
include any of "writethrough", "writeback", "none", "unsafe"
or "directsync". By default, this is set to "writeback".
include any of `writethrough`, `writeback`, `none`, `unsafe`
or `directsync`. By default, this is set to `writeback`.
- `disk_compression` (boolean) - Apply compression to the QCOW2 disk file
using `qemu-img convert`. Defaults to `false`.
- `disk_discard` (string) - The discard mode to use for disk. Allowed values
include any of "unmap" or "ignore". By default, this is set to "ignore".
include any of `unmap` or `ignore`. By default, this is set to `ignore`.
- `disk_image` (boolean) - Packer defaults to building from an ISO file, this
parameter controls whether the ISO URL supplied is actually a bootable
@ -150,20 +150,28 @@ Linux server and have not enabled X11 forwarding (`ssh -X`).
source, resize it according to `disk_size` and boot the image.
- `disk_interface` (string) - The interface to use for the disk. Allowed
values include any of "ide", "scsi", "virtio" or "virtio-scsi"^\* . Note also
that any boot commands or kickstart type scripts must have proper
adjustments for resulting device names. The Qemu builder uses "virtio" by
values include any of `ide`, `scsi`, `virtio` or `virtio-scsi`^\*. Note
also that any boot commands or kickstart type scripts must have proper
adjustments for resulting device names. The Qemu builder uses `virtio` by
default.
^\* Please be aware that use of the "scsi" disk interface has been disabled
^\* Please be aware that use of the `scsi` disk interface has been disabled
by Red Hat due to a bug described
[here](https://bugzilla.redhat.com/show_bug.cgi?id=1019220).
If you are running Qemu on RHEL or a RHEL variant such as CentOS, you
*must* choose one of the other listed interfaces. Using the "scsi"
*must* choose one of the other listed interfaces. Using the `scsi`
interface under these circumstances will cause the build to fail.
- `disk_size` (number) - The size, in megabytes, of the hard disk to create
for the VM. By default, this is 40960 (40 GB).
for the VM. By default, this is `40960` (40 GB).
- `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.
The maximum summary size of all files in the listed directories are the
same as in `floppy_files`.
- `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
@ -177,20 +185,12 @@ Linux server and have not enabled X11 forwarding (`ssh -X`).
listed files must not exceed 1.44 MB. The supported ways to move large
files into the OS are using `http_directory` or [the file provisioner](https://www.packer.io/docs/provisioners/file.html).
- `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.
The maximum summary size of all files in the listed directories are the
same as in `floppy_files`.
- `format` (string) - Either "qcow2" or "raw", this specifies the output
- `format` (string) - Either `qcow2` or `raw`, this specifies the output
format of the virtual machine image. This defaults to `qcow2`.
- `headless` (boolean) - Packer defaults to building QEMU 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.
value is set to `true`, the machine will start without a console.
You can still see the console if you make a note of the VNC display
number chosen, and then connect using `vncviewer -Shared <host>:<display>`
@ -198,22 +198,23 @@ Linux server and have not enabled X11 forwarding (`ssh -X`).
- `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_skip_cache` (boolean) - Use iso from provided url. Qemu must support
curl block device. This defaults to `false`.
- `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
@ -227,25 +228,25 @@ Linux server and have not enabled X11 forwarding (`ssh -X`).
- `machine_type` (string) - The type of machine emulation to use. Run your
qemu binary with the flags `-machine help` to list available types for
your system. This defaults to "pc".
your system. This defaults to `pc`.
- `net_device` (string) - The driver to use for the network interface. Allowed
values "ne2k\_pci", "i82551", "i82557b", "i82559er", "rtl8139", "e1000",
"pcnet", "virtio", "virtio-net", "virtio-net-pci", "usb-net", "i82559a",
"i82559b", "i82559c", "i82550", "i82562", "i82557a", "i82557c", "i82801",
"vmxnet3", "i82558a" or "i82558b". The Qemu builder uses "virtio-net" by
values `ne2k_pci`, `i82551`, `i82557b`, `i82559er`, `rtl8139`, `e1000`,
`pcnet`, `virtio`, `virtio-net`, `virtio-net-pci`, `usb-net`, `i82559a`,
`i82559b`, `i82559c`, `i82550`, `i82562`, `i82557a`, `i82557c`, `i82801`,
`vmxnet3`, `i82558a` or `i82558b`. The Qemu builder uses `virtio-net` by
default.
- `output_directory` (string) - This is the path to the directory where the
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.
- `qemu_binary` (string) - The name of the Qemu binary to look for. This
defaults to "qemu-system-x86\_64", but may need to be changed for
some platforms. For example "qemu-kvm", or "qemu-system-i386" may be a
defaults to `qemu-system-x86_64`, but may need to be changed for
some platforms. For example `qemu-kvm`, or `qemu-system-i386` may be a
better choice for some systems.
- `qemuargs` (array of array of strings) - Allows complete control over the
@ -314,7 +315,7 @@ default port of `5985` or whatever value you have the service set to listen on.
- `use_default_display` (boolean) - If true, do not pass a `-display` option
to qemu, allowing it to choose the default. This may be needed when running
under OS X, and getting errors about `sdl` not being available.
under macOS, and getting errors about `sdl` not being available.
- `shutdown_command` (string) - The command to use to gracefully shut down the
machine once all the provisioning is done. By default this is an empty
@ -327,31 +328,32 @@ default port of `5985` or whatever value you have the service set to listen on.
- `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) - Packer compacts the QCOW2 image using `qemu-img convert`.
Set this option to `true` to disable compacting. Defaults to `false`.
- `skip_compaction` (boolean) - Packer compacts the QCOW2 image using
`qemu-img convert`. Set this option to `true` to disable compacting.
Defaults to `false`.
- `ssh_host_port_min` and `ssh_host_port_max` (number) - The minimum and
maximum port to use for the SSH port on the host machine which is forwarded
to the SSH port on the guest machine. Because Packer often runs in parallel,
Packer will choose a randomly available port in this range to use as the
host port. By default this is 2222 to 4444.
host port. By default this is `2222` to `4444`.
- `vm_name` (string) - This is the name of the image (QCOW2 or IMG) file for
the new virtual machine. By default this is "packer-BUILDNAME", where
`BUILDNAME` is the name of the build. Currently, no file extension will be
the new virtual machine. By default this is `packer-BUILDNAME`, where
"BUILDNAME" is the name of the build. Currently, no file extension will be
used unless it is specified in this option.
- `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_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

View File

@ -65,8 +65,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.
@ -90,12 +90,12 @@ 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.
- `disk_size` (number) - The size, in megabytes, of the hard disk to create
for the VM. By default, this is 40000 (about 40 GB).
for the VM. By default, this is `40000` (about 40 GB).
- `export_opts` (array of strings) - Additional options to pass to the
[VBoxManage
@ -139,6 +139,12 @@ builder.
"packer_conf.json"
```
- `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
unattended Windows installs, which look for an `Autounattend.xml` file on
@ -149,26 +155,20 @@ 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.
- `format` (string) - Either "ovf" or "ova", this specifies the output format
of the exported virtual machine. This defaults to "ovf".
- `format` (string) - Either `ovf` or `ova`, this specifies the output format
of the exported virtual machine. This defaults to `ovf`.
- `guest_additions_mode` (string) - The method by which guest additions are
made available to the guest for installation. Valid options are "upload",
"attach", or "disable". If the mode is "attach" the guest additions ISO will
be attached as a CD device to the virtual machine. If the mode is "upload"
made available to the guest for installation. Valid options are `upload`,
`attach`, or `disable`. If the mode is `attach` the guest additions ISO will
be attached as a CD device to the virtual machine. If the mode is `upload`
the guest additions ISO will be uploaded to the path specified by
`guest_additions_path`. The default value is "upload". If "disable" is used,
`guest_additions_path`. The default value is `upload`. If `disable` is used,
guest additions won't be downloaded, either.
- `guest_additions_path` (string) - The path on the guest virtual machine
where the VirtualBox guest additions ISO will be uploaded. By default this
is "VBoxGuestAdditions.iso" which should upload into the login directory of
is `VBoxGuestAdditions.iso` which should upload into the login directory of
the user. This is a [configuration
template](/docs/templates/engine.html) where the `Version`
variable is replaced with the VirtualBox version.
@ -185,24 +185,24 @@ builder.
download the proper guest additions ISO from the internet.
- `guest_os_type` (string) - The guest OS type being installed. By default
this is "other", but you can get *dramatic* performance improvements by
this is `other`, but you can get *dramatic* performance improvements by
setting this to the proper value. To view all available values for this run
`VBoxManage list ostypes`. Setting the correct value hints to VirtualBox how
to optimize the virtual hardware to work best with that operating system.
- `hard_drive_interface` (string) - The type of controller that the primary
hard drive is attached to, defaults to "ide". When set to "sata", the drive
is attached to an AHCI SATA controller. When set to "scsi", the drive is
hard drive is attached to, defaults to `ide`. When set to `sata`, the drive
is attached to an AHCI SATA controller. When set to `scsi`, the drive is
attached to an LsiLogic SCSI controller.
- `sata_port_count` (number) - The number of ports available on any SATA
controller created, defaults to 1. VirtualBox supports up to 30 ports on a
controller created, defaults to `1`. VirtualBox supports up to 30 ports on a
maximum of 1 SATA controller. Increasing this value can be useful if you
want to attach additional drives.
- `hard_drive_nonrotational` (boolean) - Forces some guests (i.e. Windows 7+)
to treat disks as SSDs and stops them from performing disk fragmentation.
Also set `hard_drive_Discard` to `true` to enable TRIM support.
Also set `hard_drive_discard` to `true` to enable TRIM support.
- `hard_drive_discard` (boolean) - When this value is set to `true`, a VDI
image will be shrunk in response to the trim command from the guest OS.
@ -211,29 +211,30 @@ builder.
- `headless` (boolean) - Packer defaults to building VirtualBox 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.
being built. When this value is set to `true`, the machine will start
without a console.
- `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_interface` (string) - The type of controller that the ISO is attached
to, defaults to "ide". When set to "sata", the drive is attached to an AHCI
to, defaults to `ide`. When set to `sata`, the drive is attached to an AHCI
SATA controller.
- `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
@ -252,13 +253,13 @@ 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.
- `post_shutdown_delay` (string) - The amount of time to wait after shutting
down the virtual machine. If you get the error
`Error removing floppy controller`, you might need to set this to `5m`
or so. By default, the delay is `0s`, or disabled.
or so. By default, the delay is `0s` or disabled.
- `shutdown_command` (string) - The command to use to gracefully shut down the
machine once all the provisioning is done. By default this is an empty
@ -271,7 +272,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_export` (boolean) - Defaults to `false`. When enabled, Packer will
not export the VM. Useful if the build output is not the resultant image,
@ -281,11 +282,11 @@ builder.
maximum port to use for the SSH port on the host machine which is forwarded
to the SSH port on the guest machine. Because Packer often runs in parallel,
Packer will choose a randomly available port in this range to use as the
host port. By default this is 2222 to 4444.
host port. By default this is `2222` to `4444`.
- `ssh_skip_nat_mapping` (boolean) - Defaults to `false`. When enabled, Packer
does not setup forwarded port mapping for SSH requests and uses `ssh_port`
on the host to communicate to the virtual machine
on the host to communicate to the virtual machine.
- `vboxmanage` (array of array of strings) - Custom `VBoxManage` commands to
execute in order to further customize the virtual machine being created. The
@ -305,22 +306,22 @@ builder.
- `virtualbox_version_file` (string) - The path within the virtual machine to
upload a file that contains the VirtualBox version that was used to create
the machine. This information can be useful for provisioning. By default
this is ".vbox\_version", which will generally be upload it into the
this is `.vbox_version`, which will generally be upload it into the
home directory. Set to an empty string to skip uploading this file, which
can be useful when using the `none` communicator.
- `vm_name` (string) - This is the name of the OVF 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.
- `vrdp_bind_address` (string / IP address) - The IP address that should be
binded to for VRDP. By default packer will use 127.0.0.1 for this. If you
wish to bind to all interfaces use 0.0.0.0
binded to for VRDP. By default packer will use `127.0.0.1` for this. If you
wish to bind to all interfaces use `0.0.0.0`.
- `vrdp_port_min` and `vrdp_port_max` (number) - The minimum and maximum port
to use for VRDP access to the virtual machine. 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.
port in this range that appears available. By default this is `5900` to
`6000`. The minimum and maximum ports are inclusive.
## Boot Command

View File

@ -78,15 +78,15 @@ 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.
- `checksum` (string) - The checksum for the OVA file. The type of the
checksum is specified with `checksum_type`, documented below.
- `checksum_type` (string) - The type of the checksum specified in `checksum`.
Valid values are "none", "md5", "sha1", "sha256", or "sha512". Although the
Valid values are `none`, `md5`, `sha1`, `sha256`, or `sha512`. Although the
checksum will not be verified when `checksum_type` is set to "none", this is
not recommended since OVA files can be very large and corruption does happen
from time to time.
@ -133,6 +133,12 @@ builder.
"packer_conf.json"
```
- `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
unattended Windows installs, which look for an `Autounattend.xml` file on
@ -143,26 +149,20 @@ 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.
- `format` (string) - Either "ovf" or "ova", this specifies the output format
of the exported virtual machine. This defaults to "ovf".
- `format` (string) - Either `ovf` or `ova`, this specifies the output format
of the exported virtual machine. This defaults to `ovf`.
- `guest_additions_mode` (string) - The method by which guest additions are
made available to the guest for installation. Valid options are "upload",
"attach", or "disable". If the mode is "attach" the guest additions ISO will
be attached as a CD device to the virtual machine. If the mode is "upload"
made available to the guest for installation. Valid options are `upload`,
`attach`, or `disable`. If the mode is `attach` the guest additions ISO will
be attached as a CD device to the virtual machine. If the mode is `upload`
the guest additions ISO will be uploaded to the path specified by
`guest_additions_path`. The default value is "upload". If "disable" is used,
`guest_additions_path`. The default value is `upload`. If `disable` is used,
guest additions won't be downloaded, either.
- `guest_additions_path` (string) - The path on the guest virtual machine
where the VirtualBox guest additions ISO will be uploaded. By default this
is "VBoxGuestAdditions.iso" which should upload into the login directory of
is `VBoxGuestAdditions.iso` which should upload into the login directory of
the user. This is a [configuration
template](/docs/templates/engine.html) where the `Version`
variable is replaced with the VirtualBox version.
@ -179,30 +179,31 @@ builder.
- `headless` (boolean) - Packer defaults to building VirtualBox 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.
being built. When this value is set to `true`, the machine will start
without a console.
- `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.
- `import_flags` (array of strings) - Additional flags to pass to
`VBoxManage import`. This can be used to add additional command-line flags
such as `--eula-accept` to accept a EULA in the OVF.
- `import_opts` (string) - Additional options to pass to the
`VBoxManage import`. This can be useful for passing "keepallmacs" or
"keepnatmacs" options for existing ovf images.
`VBoxManage import`. This can be useful for passing `keepallmacs` or
`keepnatmacs` options for existing ovf images.
- `keep_registered` (boolean) - Set this to `true` if you would like to keep
the VM registered with virtualbox. Defaults to `false`.
@ -211,13 +212,13 @@ 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.
- `post_shutdown_delay` (string) - The amount of time to wait after shutting
down the virtual machine. If you get the error
`Error removing floppy controller`, you might need to set this to `5m`
or so. By default, the delay is `0s`, or disabled.
or so. By default, the delay is `0s` or disabled.
- `shutdown_command` (string) - The command to use to gracefully shut down the
machine once all the provisioning is done. By default this is an empty
@ -230,7 +231,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_export` (boolean) - Defaults to `false`. When enabled, Packer will
not export the VM. Useful if the build output is not the resultant image,
@ -240,11 +241,11 @@ builder.
maximum port to use for the SSH port on the host machine which is forwarded
to the SSH port on the guest machine. Because Packer often runs in parallel,
Packer will choose a randomly available port in this range to use as the
host port.
host port. By default this is `2222` to `4444`.
- `ssh_skip_nat_mapping` (boolean) - Defaults to false. When enabled, Packer
does not setup forwarded port mapping for SSH requests and uses `ssh_port`
on the host to communicate to the virtual machine
on the host to communicate to the virtual machine.
- `target_path` (string) - The path where the OVA should be saved
after download. By default, it will go in the packer cache, with a hash of
@ -268,22 +269,23 @@ builder.
- `virtualbox_version_file` (string) - The path within the virtual machine to
upload a file that contains the VirtualBox version that was used to create
the machine. This information can be useful for provisioning. By default
this is ".vbox\_version", which will generally be upload it into the
this is `.vbox_version`, which will generally be upload it into the
home directory. Set to an empty string to skip uploading this file, which
can be useful when using the `none` communicator.
- `vm_name` (string) - This is the name of the virtual machine when it is
imported as well as the name of the OVF file when the virtual machine
is exported. By default this is "packer-BUILDNAME", where "BUILDNAME" is the
is exported. By default this is `packer-BUILDNAME`, where "BUILDNAME" is the
name of the build.
- `vrdp_bind_address` (string / IP address) - The IP address that should be
binded to for VRDP. By default packer will use 127.0.0.1 for this.
binded to for VRDP. By default packer will use `127.0.0.1` for this. If you
wish to bind to all interfaces use `0.0.0.0`.
- `vrdp_port_min` and `vrdp_port_max` (number) - The minimum and maximum port
to use for VRDP access to the virtual machine. 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.
port in this range that appears available. By default this is `5900` to
`6000`. The minimum and maximum ports are inclusive.
## Boot Command

View File

@ -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

View File

@ -69,13 +69,19 @@ 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.
* `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
unattended Windows installs, which look for an `Autounattend.xml` file on
@ -86,41 +92,36 @@ 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.
- `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.
- `output_directory` (string) - This is the path to the directory where the
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.
- `shutdown_command` (string) - The command to use to gracefully shut down the
@ -134,16 +135,16 @@ 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
certain rare cases, this might actually end up making the resulting disks
slightly larger. If you find this to be the case, you can disable compaction
using this configuration value.
using this configuration value. Defaults to `false`.
- `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
@ -154,7 +155,7 @@ builder.
By default the upload path is set to `{{.Flavor}}.iso`.
- `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.
- `vmx_data` (object of key/value strings) - Arbitrary key/values to enter
@ -165,22 +166,25 @@ 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`.
- `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.
- `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

View File

@ -59,11 +59,11 @@ to the remote host.
The SSH communicator has the following options:
- `ssh_agent_auth` (boolean) - If true, the local SSH agent will be used to
authenticate connections to the remote host. Defaults to false.
- `ssh_agent_auth` (boolean) - If `true`, the local SSH agent will be used to
authenticate connections to the remote host. Defaults to `false`.
- `ssh_bastion_agent_auth` (boolean) - If true, the local SSH agent will
be used to authenticate with the bastion host. Defaults to false.
- `ssh_bastion_agent_auth` (boolean) - If `true`, the local SSH agent will
be used to authenticate with the bastion host. Defaults to `false`.
- `ssh_bastion_host` (string) - A bastion host to use for the actual
SSH connection.
@ -71,7 +71,7 @@ The SSH communicator has the following options:
- `ssh_bastion_password` (string) - The password to use to authenticate
with the bastion host.
- `ssh_bastion_port` (number) - The port of the bastion host. Defaults to 1.
- `ssh_bastion_port` (number) - The port of the bastion host. Defaults to `1`.
- `ssh_bastion_private_key_file` (string) - A private key file to use
to authenticate with the bastion host.
@ -80,51 +80,52 @@ The SSH communicator has the following options:
host.
- `ssh_disable_agent_forwarding` (boolean) - If true, SSH agent forwarding
will be disabled. Defaults to false.
will be disabled. Defaults to `false`.
- `ssh_file_transfer_method` (`scp` or `sftp`) - How to transfer files, Secure
copy (default) or SSH File Transfer Protocol.
- `ssh_handshake_attempts` (number) - The number of handshakes to attempt
with SSH once it can connect. This defaults to 10.
with SSH once it can connect. This defaults to `10`.
- `ssh_host` (string) - The address to SSH to. This usually is automatically
configured by the builder.
* `ssh_keep_alive_interval` (string) - How often to send "keep alive"
messages to the server. Set to a negative value (`-1s`) to disable. Example value:
"10s". Defaults to "5s".
messages to the server. Set to a negative value (`-1s`) to disable. Example
value: `10s`. Defaults to `5s`.
- `ssh_password` (string) - A plaintext password to use to authenticate
with SSH.
- `ssh_port` (number) - The port to connect to SSH. This defaults to 22.
- `ssh_port` (number) - The port to connect to SSH. This defaults to `22`.
- `ssh_private_key_file` (string) - Path to a PEM encoded private key
file to use to authenticate with SSH.
- `ssh_pty` (boolean) - If true, a PTY will be requested for the SSH
connection. This defaults to false.
* `ssh_read_write_timeout` (string) - The amount of time to wait for a remote
command to end. This might be useful if, for example, packer hangs on
a connection after a reboot. Example: "5m". Disabled by default.
- `ssh_timeout` (string) - The time to wait for SSH to become available.
Packer uses this to determine when the machine has booted so this is
usually quite long. Example value: "10m"
- `ssh_username` (string) - The username to connect to SSH with. Required
if using SSH.
- `ssh_proxy_host` (string) - A SOCKS proxy host to use for SSH connection
- `ssh_proxy_port` (Integer) - A port of the SOCKS proxy, defaults to 1080
- `ssh_proxy_password` (string) - The password to use to authenticate with
the proxy server. Optional.
- `ssh_proxy_port` (number) - A port of the SOCKS proxy. Defaults to `1080`.
- `ssh_proxy_username` (string) - The username to authenticate with the proxy
server. Optional.
- `ssh_proxy_password` (string) - The password to use to authenticate with
the proxy server. Optional.
- `ssh_pty` (boolean) - If `true`, a PTY will be requested for the SSH
connection. This defaults to `false`.
* `ssh_read_write_timeout` (string) - The amount of time to wait for a remote
command to end. This might be useful if, for example, packer hangs on
a connection after a reboot. Example: `5m`. Disabled by default.
- `ssh_timeout` (string) - The time to wait for SSH to become available.
Packer uses this to determine when the machine has booted so this is
usually quite long. Example value: `10m`.
- `ssh_username` (string) - The username to connect to SSH with. Required
if using SSH.
## WinRM Communicator
@ -132,23 +133,24 @@ The WinRM communicator has the following options.
- `winrm_host` (string) - The address for WinRM to connect to.
- `winrm_port` (number) - The WinRM port to connect to. This defaults to
5985 for plain unencrypted connection and 5986 for SSL when `winrm_use_ssl` is set to true.
- `winrm_username` (string) - The username to use to connect to WinRM.
- `winrm_insecure` (boolean) - If `true`, do not check server certificate
chain and host name.
- `winrm_password` (string) - The password to use to connect to WinRM.
- `winrm_port` (number) - The WinRM port to connect to. This defaults to
`5985` for plain unencrypted connection and `5986` for SSL when
`winrm_use_ssl` is set to true.
- `winrm_timeout` (string) - The amount of time to wait for WinRM to
become available. This defaults to "30m" since setting up a Windows
become available. This defaults to `30m` since setting up a Windows
machine generally takes a long time.
- `winrm_use_ssl` (boolean) - If true, use HTTPS for WinRM
- `winrm_insecure` (boolean) - If true, do not check server certificate
chain and host name
- `winrm_use_ntlm` (boolean) - If true, NTLM authentication will be used for WinRM,
- `winrm_use_ntlm` (boolean) - If `true`, NTLM authentication will be used for WinRM,
rather than default (basic authentication), removing the requirement for basic
authentication to be enabled within the target guest. Further reading for remote
connection authentication can be found [here](https://msdn.microsoft.com/en-us/library/aa384295(v=vs.85).aspx).
- `winrm_use_ssl` (boolean) - If `true`, use HTTPS for WinRM.
- `winrm_username` (string) - The username to use to connect to WinRM.