|
|
|
|
@ -72,19 +72,6 @@ builder.
|
|
|
|
|
|
|
|
|
|
### Optional:
|
|
|
|
|
|
|
|
|
|
- `boot_command` (array of strings) - This is an array of commands to type
|
|
|
|
|
when the virtual machine is first booted. The goal of these commands
|
|
|
|
|
should be to type just enough to initialize the operating system
|
|
|
|
|
installer. Special keys can be typed as well, and are covered in the
|
|
|
|
|
section below on the boot command. If this is not specified, it is assumed
|
|
|
|
|
the installer will start itself.
|
|
|
|
|
|
|
|
|
|
- `boot_wait` (string) - The time to wait after booting the initial virtual
|
|
|
|
|
machine before typing the `boot_command`. The value specified should be
|
|
|
|
|
a duration. For example, setting a duration of "1m30s" would cause
|
|
|
|
|
Packer to wait for 1 minute 30 seconds before typing the boot command.
|
|
|
|
|
The default duration is "10s" (10 seconds).
|
|
|
|
|
|
|
|
|
|
- `configuration_version` (string) - This allows you to set the vm version when
|
|
|
|
|
calling New-VM to generate the vm.
|
|
|
|
|
|
|
|
|
|
@ -126,24 +113,6 @@ builder.
|
|
|
|
|
disable dynamic memory and have at least 4GB of RAM assigned to the
|
|
|
|
|
virtual machine.
|
|
|
|
|
|
|
|
|
|
- `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
|
|
|
|
|
unattended Windows installs, which look for an `Autounattend.xml` file on
|
|
|
|
|
removable media. By default, no floppy will be attached. All files listed
|
|
|
|
|
in this setting get placed into the root directory of the floppy and the
|
|
|
|
|
floppy is attached as the first floppy device. Currently, no support
|
|
|
|
|
exists for creating sub-directories on the floppy. Wildcard characters
|
|
|
|
|
(`*`, `?`, and `[]`) are allowed. Directory names are also allowed, which
|
|
|
|
|
will add all the files found in the directory to the floppy.
|
|
|
|
|
|
|
|
|
|
- `generation` (number) - The Hyper-V generation for the virtual machine. By
|
|
|
|
|
default, this is 1. Generation 2 Hyper-V virtual machines do not support
|
|
|
|
|
floppy drives. In this scenario use `secondary_iso_images` instead. Hard
|
|
|
|
|
@ -162,21 +131,6 @@ builder.
|
|
|
|
|
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 Packers
|
|
|
|
|
inbuilt HTTP server. The files in this directory will be available
|
|
|
|
|
over HTTP to the virtual machine. This is useful for hosting kickstart
|
|
|
|
|
files and so on. By default this value is unset and the HTTP server is
|
|
|
|
|
not 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`. Since Packer often runs in parallel, a randomly
|
|
|
|
|
available port in this range will be repeatedly chosen until an
|
|
|
|
|
available port is found. To force the HTTP server to use a specific
|
|
|
|
|
port, set an identical value for `http_port_min` and `http_port_max`.
|
|
|
|
|
By default the values are 8000 and 9000, respectively.
|
|
|
|
|
|
|
|
|
|
- `mac_address` (string) - This allows a specific MAC address to be used on
|
|
|
|
|
the default virtual network card. The MAC address must be a string with
|
|
|
|
|
no delimiters, for example "0000deadbeef".
|
|
|
|
|
@ -267,41 +221,27 @@ builder.
|
|
|
|
|
supported by various exotic operating systems, but this emulation requires
|
|
|
|
|
additional overhead and should only be used if absolutely necessary.
|
|
|
|
|
|
|
|
|
|
## Boot Command
|
|
|
|
|
## Http directory configuration reference
|
|
|
|
|
|
|
|
|
|
<%= partial "partials/common/HTTPConfig" %>
|
|
|
|
|
### Optional:
|
|
|
|
|
|
|
|
|
|
<%= partial "partials/common/HTTPConfig-not-required" %>
|
|
|
|
|
|
|
|
|
|
The `boot_command` configuration is very important: it specifies the keys to
|
|
|
|
|
type when the virtual machine is first booted in order to start the OS
|
|
|
|
|
installer. This command is typed after `boot_wait`, which gives the virtual
|
|
|
|
|
machine some time to actually load the ISO.
|
|
|
|
|
## Floppy configuration reference
|
|
|
|
|
|
|
|
|
|
As documented above, the `boot_command` is an array of strings. The strings
|
|
|
|
|
are all typed in sequence. It is an array only to improve readability within
|
|
|
|
|
the template.
|
|
|
|
|
<%= partial "partials/common/FloppyConfig" %>
|
|
|
|
|
|
|
|
|
|
The boot command is "typed" character for character over the virtual keyboard
|
|
|
|
|
to the machine, simulating a human actually typing the keyboard.
|
|
|
|
|
### Optional:
|
|
|
|
|
|
|
|
|
|
<%= partial "partials/builders/boot-command" %>
|
|
|
|
|
<%= partial "partials/common/FloppyConfig-not-required" %>
|
|
|
|
|
|
|
|
|
|
The example shown below is a working boot command used to start an Ubuntu
|
|
|
|
|
12.04 installer:
|
|
|
|
|
## Boot Configuration Reference
|
|
|
|
|
|
|
|
|
|
``` json
|
|
|
|
|
[
|
|
|
|
|
"<esc><esc><enter><wait>",
|
|
|
|
|
"/install/vmlinuz noapic ",
|
|
|
|
|
"preseed/url=http://{{ .HTTPIP }}:{{ .HTTPPort }}/preseed.cfg ",
|
|
|
|
|
"debian-installer=en_US auto locale=en_US kbd-chooser/method=us ",
|
|
|
|
|
"hostname={{ .Name }} ",
|
|
|
|
|
"fb=false debconf/frontend=noninteractive ",
|
|
|
|
|
"keyboard-configuration/modelcode=SKIP keyboard-configuration/layout=USA ",
|
|
|
|
|
"keyboard-configuration/variant=USA console-setup/ask_detect=false ",
|
|
|
|
|
"initrd=/install/initrd.gz -- <enter>"
|
|
|
|
|
]
|
|
|
|
|
```
|
|
|
|
|
<%= partial "partials/common/bootcommand/BootConfig" %>
|
|
|
|
|
|
|
|
|
|
For more examples of various boot commands, see the sample projects from our
|
|
|
|
|
[community templates page](/community-tools.html#templates).
|
|
|
|
|
### Optional:
|
|
|
|
|
<%= partial "partials/common/bootcommand/BootConfig-not-required" %>
|
|
|
|
|
|
|
|
|
|
## Integration Services
|
|
|
|
|
|
|
|
|
|
|