2013-09-04 22:51:56 +00:00
|
|
|
---
|
2013-09-06 16:50:43 +00:00
|
|
|
page_title: "config.vm - Vagrantfile"
|
2013-09-04 22:51:56 +00:00
|
|
|
sidebar_current: "vagrantfile-machine"
|
|
|
|
---
|
|
|
|
|
|
|
|
# Machine Settings
|
|
|
|
|
|
|
|
**Config namespace: `config.vm`**
|
|
|
|
|
|
|
|
The settings within `config.vm` modify the configuration of the
|
|
|
|
machine that Vagrant manages.
|
|
|
|
|
|
|
|
## Available Settings
|
|
|
|
|
2013-09-06 16:50:43 +00:00
|
|
|
`config.vm.boot_timeout` - The time in seconds that Vagrant will wait
|
|
|
|
for the machine to boot and be accessible. By default this is 300 seconds.
|
|
|
|
|
|
|
|
<hr>
|
|
|
|
|
2013-11-26 20:05:34 +00:00
|
|
|
`config.vm.box` - This configures what [box](/v2/boxes.html) the
|
2014-01-25 20:24:09 +00:00
|
|
|
machine will be brought up against. The value here should be the name
|
|
|
|
of an installed box or a shorthand name of a box in
|
2014-03-13 13:59:39 +00:00
|
|
|
[Vagrant Cloud](https://vagrantcloud.com).
|
2014-01-25 20:24:09 +00:00
|
|
|
|
|
|
|
<hr>
|
|
|
|
|
|
|
|
`config.vm.box_check_update` - If true, Vagrant will check for updates to
|
|
|
|
the configured box on every `vagrant up`. If an update is found, Vagrant
|
2014-02-03 10:46:35 +00:00
|
|
|
will tell the user. By default this is true. Updates will only be checked
|
|
|
|
for boxes that properly support updates (boxes from
|
2014-03-13 13:59:39 +00:00
|
|
|
[Vagrant Cloud](https://vagrantcloud.com)
|
2014-02-03 10:46:35 +00:00
|
|
|
or some other versioned box).
|
2013-09-04 22:51:56 +00:00
|
|
|
|
|
|
|
<hr>
|
|
|
|
|
2013-12-02 06:51:25 +00:00
|
|
|
`config.vm.box_download_checksum` - The checksum of the box specified by
|
|
|
|
`config.vm.box_url`. If not specified, no checksum comparison will be done.
|
|
|
|
If specified, Vagrant will compare the checksum of the downloaded box to
|
|
|
|
this value and error if they do not match. Checksum checking is only done
|
|
|
|
when Vagrant must download the box.
|
|
|
|
|
|
|
|
If this is specified, then `config.vm.box_download_checksum_type` must
|
|
|
|
also be specified.
|
|
|
|
|
|
|
|
<hr>
|
|
|
|
|
|
|
|
`config.vm.box_download_checksum_type` - The type of checksum specified
|
|
|
|
by `config.vm.box_download_checksum` (if any). Supported values are
|
|
|
|
currently "md5", "sha1", and "sha256".
|
|
|
|
|
|
|
|
<hr>
|
|
|
|
|
2013-11-26 00:54:39 +00:00
|
|
|
`config.vm.box_download_client_cert` - Path to a client certificate to
|
|
|
|
use when downloading the box, if it is necessary. By default, no client
|
|
|
|
certificate is used to download the box.
|
|
|
|
|
|
|
|
<hr>
|
|
|
|
|
|
|
|
`config.vm.box_download_insecure` - If true, then SSL certificates
|
|
|
|
from the server will not be verified. By default, if the URL is an HTTPS
|
|
|
|
URL, then SSL certs will be verified.
|
|
|
|
|
|
|
|
<hr>
|
|
|
|
|
2013-09-04 22:51:56 +00:00
|
|
|
`config.vm.box_url` - The URL that the configured box can be found at.
|
2014-03-13 13:59:39 +00:00
|
|
|
If `config.vm.box` is a shorthand to a box in [Vagrant Cloud](https://vagrantcloud.com)
|
2014-01-25 20:24:09 +00:00
|
|
|
then this value doesn't need to be specified. Otherwise, it should
|
|
|
|
point to the proper place where the box can be found if it isn't
|
|
|
|
installed.
|
2013-09-04 22:51:56 +00:00
|
|
|
|
2013-11-26 05:57:20 +00:00
|
|
|
This can also be an array of multiple URLs. The URLs will be tried in
|
|
|
|
order. Note that any client certificates, insecure download settings, and
|
|
|
|
so on will apply to all URLs in this list.
|
|
|
|
|
2014-03-13 01:29:32 +00:00
|
|
|
The URLs can also be local files by using the `file://` scheme. For
|
|
|
|
example: "file:///tmp/test.box".
|
|
|
|
|
2013-09-04 22:51:56 +00:00
|
|
|
<hr>
|
|
|
|
|
2014-01-25 20:24:09 +00:00
|
|
|
`config.vm.box_version` - The version of the box to use. This defaults to
|
|
|
|
">= 0" (the latest version available). This can contain an arbitrary list
|
|
|
|
of constraints, separated by commas, such as: `>= 1.0, < 1.5`. When constraints
|
|
|
|
are given, Vagrant will use the latest available box satisfying these
|
|
|
|
constraints.
|
|
|
|
|
|
|
|
<hr>
|
|
|
|
|
2014-10-16 15:16:01 +00:00
|
|
|
`config.vm.communicator` - The communicator type to use to connect to the
|
|
|
|
guest box. By default this is `:ssh`, but should be changed to `:winrm` for
|
|
|
|
Windows guests.
|
|
|
|
|
|
|
|
<hr>
|
|
|
|
|
2013-09-06 16:50:43 +00:00
|
|
|
`config.vm.graceful_halt_timeout` - The time in seconds that Vagrant will
|
|
|
|
wait for the machine to gracefully halt when `vagrant halt` is called.
|
2014-05-01 14:56:09 +00:00
|
|
|
Defaults to 60 seconds.
|
2013-09-04 22:51:56 +00:00
|
|
|
|
|
|
|
<hr>
|
|
|
|
|
|
|
|
`config.vm.guest` - The guest OS that will be running within this
|
|
|
|
machine. This defaults to `:linux`, and Vagrant will auto-detect the
|
|
|
|
proper distro. Vagrant needs to know this information to perform some
|
|
|
|
guest OS-specific things such as mounting folders and configuring
|
|
|
|
networks.
|
|
|
|
|
|
|
|
<hr>
|
|
|
|
|
|
|
|
`config.vm.hostname` - The hostname the machine should have. Defaults
|
|
|
|
to nil. If nil, Vagrant won't manage the hostname. If set to a string,
|
|
|
|
the hostname will be set on boot.
|
|
|
|
|
|
|
|
<hr>
|
|
|
|
|
|
|
|
`config.vm.network` - Configures [networks](/v2/networking/index.html) on
|
|
|
|
the machine. Please see the networking page for more information.
|
|
|
|
|
|
|
|
<hr>
|
|
|
|
|
2014-05-01 01:48:39 +00:00
|
|
|
`config.vm.post_up_message` - A message to show after `vagrant up`. This
|
|
|
|
will be shown to the user and is useful for containing instructions
|
|
|
|
such as how to access various components of the development environment.
|
|
|
|
|
|
|
|
<hr>
|
|
|
|
|
2013-09-04 22:51:56 +00:00
|
|
|
`config.vm.provider` - Configures [provider-specific configuration](/v2/providers/configuration.html),
|
|
|
|
which is used to modify settings which are specific to a certain
|
|
|
|
[provider](/v2/providers/index.html). If the provider you're configuring
|
|
|
|
doesn't exist or is not setup on the system of the person who runs
|
|
|
|
`vagrant up`, Vagrant will ignore this configuration block. This allows
|
|
|
|
a Vagrantfile that is configured for many providers to be shared among
|
|
|
|
a group of people who may not have all the same providers installed.
|
|
|
|
|
|
|
|
<hr>
|
|
|
|
|
|
|
|
`config.vm.provision` - Configures [provisioners](/v2/provisioning/index.html)
|
|
|
|
on the machine, so that software can be automatically installed and configured
|
|
|
|
when the machine is created. Please see the page on provisioners for more
|
|
|
|
information on how this setting works.
|
|
|
|
|
|
|
|
<hr>
|
|
|
|
|
|
|
|
`config.vm.synced_folder` - Configures [synced folders](/v2/synced-folders/index.html)
|
|
|
|
on the machine, so that folders on your host machine can be synced to
|
|
|
|
and from the guest machine. Please see the page on synced folders for
|
|
|
|
more information on how this setting works.
|
|
|
|
|
|
|
|
<hr>
|
|
|
|
|
|
|
|
`config.vm.usable_port_range` - A range of ports Vagrant can use for
|
|
|
|
handling port collisions and such. Defaults to `2200..2250`.
|
|
|
|
|
|
|
|
<hr>
|