Prior to this commit, if a debian system requested an DHCP address using
systemd-network, Vagrant would ignore it and instead use the configured
IP from the virtualbox network action. This commit fixes that by instead
looking if DHCP was requested, and if so, use that option for an IP.
Adds a `reboot` option which allows the guest to be rebooted after
the completion of a shell provisioning task. The guest must support
the `:reboot` capability. Like the `reset` option, the `reboot`
option may be provided without defining `inline` or `file` options
when a reboot may be required between other provisioners.
Fixes#8639
Adds a new `rsync__rsync_ownership` option to rsync based synced folders
which will allow rsync to use the `--chown` flag if it is available. The
`rsync` and `rsync-auto` commands have a new `--rsync-chown` flag which
can be used to force the option on folders when running the commands.
Fixes#7329#7332
This PR adds support for running command passed via the --command
flag as elevated tasks. The option is only valid for commands and
not when setting up a remote session. Logic has also been adjusted
for when communicator restrictions are applied and test coverage
has been added.
Extra options are extracted from the machine configuration for the
network being configured to allow for customized network manager
behavior. The network entries must be filtered to remove non-network
entries (like port forwards) before accessing by index.
Fixes#9546
Rescue and re-wrap any errors encountered when running the post
rsync capability. Rescue this exception type and notify of error
when encountered by rsync auto. Include test coverage.
Include config option within ssh_config command output template. Default
remote_user value to set username value. Include existence check on
provided config value to ensure file is available. Update tests to
include coverage on all changes. Add new options to the docs.
Both of these commands failed to default the options disabling
the provisioning from ignoring the sentinel file. This resulted
in different behavior than what was seen with the `up` and
`resume` commands which would only provision items with run set
to "always". This defaults the options to proper match the behavior
of `up` and `resume` to be consistent.
This also adds an extra `--no-start` flag to allow users to restore
a snapshot but not start the restored guest immediately.
Fixes#6752
When a large number of shares are defined it may cause the generated
command to exceed the maximum allowed length. To prevent this, only
allow 10 shares to be processed at a time.
Fixes#10483
Elevated commands can fail via winrm under certain conditions like
the machine name being changed. Detect this by checking for a known
exit code combined with known output included within stderr. If found,
attempt to re-execute the command using a machine prefixed username
if possible.
This commit introduces a special flag for enabling features that are not
ready for release. It can either be enabled by setting the
`VAGRANT_EXPERIMENTAL` flag to "1", or by setting it to a string of one
or more comma seperated values for specific features. It also adds a
couple of Vagrant developer focused methods for making it easier to
determine if the flag has been enabled, and if so, what features.
Prior to this commit, the package actions would create a temp dir in
the process of packaging and compressing a Vagrant box. This commit
ensures that the temp dir is removed once the command has completed so
that it doesn't leave around lots of temp directories.