Prior to this commit, Vagrant would attempt to path expand a file that
didn't exist if it was left out of the passed in arguments and no
`--url` was used for external box uploading. This commit fixes that by
adding some additional validation for the passed in box file.
Prior to this commit, if you went to validate your Vagrantfile and
wanted to ignore the provider, Vagrant would still fail as it checks if
there are any registered providers that are installed and usable. This
commit mocks out all registered providers to bypass that for the
validate command so that Vagrant can just validate the config and ignore
any provider config blocks.
In some cases the E1000 NIC type is the only acceptable value. Since
defaulting causes breakages to existing boxes, leave the default value
as `nil` but check the VirtualBox version in use and print warning to
user if VirtualBox version is vulnerable and E1000 NIC types are
configured for use within defined network adapters.
Be more restrictive when matching the port forward used for
SSH. Allow matching simply on the guest port, but also include
extra matching criteria for cases where multiple results may
be returned.
This commit updates how the trigger `run` inline option works by only
applying `Shellwords.split` to the inline command if it is going to be
run on non-Windows hosts. Otherwise pass the inline script directly to
be executed by Powershell.
When running a shell provisioner elevated with winrm a scheduled
task is created to bypass permissions issues. If the name of the
computer has changed this may no longer work. To prevent errors
this PR updates the implementation to fetch the computer name
and prepends it to the username before creating the task.
This commit introduces a proper reboot cap for Windows guests. Once it
initiates a reboot on the guest, it calls out to the wait_for_reboot cap
to block on until the guest is finished rebooting.
The project local metadata file may contain invalid information to properly
lookup the configured box. This may occur if the file has been moved,
modified, or the backing box has been removed. In those cases, fall back
to the configuration defined in the Vagrantfile to load the box.
Prior to this commit, if Windows was slow to reboot, Vagrant would fail
to find the right IP address to upload the wait_for_reboot script to.
This commit fixes this race condition by adding a timeout to ensure that
Vagrant can retry. It also properly catches an exception in the winrm
ready? method for checking if a guest is properly ready for
communications.
In recent Rubies the first dependency to satisfy the constraint will
be used regardless if higher versions are available in subsequent
sources. Move custom source to start of list when resolving plugins
to provide desired behavior.
This commit adds a new flag to the `vagrant validate` command which
allows users to completely ignore the provider block of a config file.
This is useful for when you are running `vagrant validate` in CI and
don't want to install a valid provider to check the syntax of your
Vagratnfile. When the flag is invoked, a warning will be displayed
saying that the provider block will be ignored and not validated.
This commit is a workaround due to how older debian and ubuntu systems
fail to properly restart networking. Instead of relying on the init
scripts or ifup/down tools to restart each interface, this commit
instead restarts each interface individually
This commit adds some additional logic that falls back to using the
ifdown/ifup tools to restart networking. On Ubuntu 14.04, the init
script was designed to always fail to restart newtorking, so it needs
to use the ifdown/up tools instead. This commit will use the networking
init script as a last resort to restart networking, assuming other
commands haven't broken networking already.
https://bugs.launchpad.net/ubuntu/+source/ifupdown/+bug/1301015
If the type of error changes on retry the messages will effectively
spam the user display with alternating messages. Log each message
sent and only re-display each message once within 10 seconds.
Prior to this commit, Vagrant would prompt for smb username and password
every time, even if only smb_username was defined. This commit changes
that by allowing a "default" username from the Vagrantfile, with the
option of overriding it.
Prior to this commit, the hostname was set with one big bash script and
attempted to determine what tools are available. This commit changes
that by splitting out that tool check on the Vagrant side of things with
the GuestInspection class, and adds back restarting networking to get a
DHCP lease with the change rather than using `dhclient`. This pattern
matches how hostnames are set in the redhat capability.
This commit introduces a new uploader class for uploading files and
splits up some commonly used functionality between it and the downloader
class into a curl helper library.
Prior to this commit, when creating the ControlPath tmp dir for
socket path, Vagrant would simply rely on `rand(1000)` for making unique
dirs for rsyncing files which could result in collisions. This commit
updates that be properly using `Dir.mktmpdir` with a `vagrant-rsync-`
prefix.
This commit introduces a new option to the core trigger feature: `ruby`.
It can be defined to run ruby code when the trigger is configured to
fire. If you give the ruby block an env and machine argument, the
defined ruby code can use those variables internally.
Dynamically generate RDP information when applicable via provider
if supported. When no RDP port is provided ignore RDP in config
and omit from output.
This commit adds a new option `abort`, which when configured, will exit
the Vagrant process completely. If set to `true`, it will exit cleanly
with exit code 0. Otherwise, the exit code can be configured.
Prior to this commit, the puppet provisioner would not properly set its
environment variables, if any were configured in the Vagrantfile. This
commit separates those properly with semicolons when calling out to
puppet apply.
Reloading the Vagrantfile causes issue with multiple evaluations
where users expect single evaluation. Instead of allowing local
plugin installation to happen prior to command execution, force
halt after installation and the command to be re-run. This will
prevent multiple loads of the Vagrantfile within a single run.
If you have a vagrant box with proc mounted with
proc /proc proc defaults,hidepid=2 0 0
ps output will be limited to owned process
sudo should extend output
Due to the Vagrantfile being loaded prior to plugin loading to determine
project local plugin information the Vagrant.has_plugin? helper will always
return false when the Vagrantfile is first loaded. To prevent this behavior
we can check for plugins in the plugin data files prior to the plugins
being loaded, and after they have been loaded we can fallback to the
original specification based check.
Since we are no longer extracting information based on key value due
to localization issues, use start and end locations to extract data.
This prevents errors when extra information is included like Scope.
Force the vagrantfile and configuration loader to be rebuilt after
plugins have been loaded to properly allow newly introduced plugin
configurations to be properly supported within the Vagrantfile.