Prior to this commit, providers like docker would fail to be brought up
because they do not store box objects like virtualbox or vmware
provider guests. This commit fixes that by making sure the box object
exists before writing the metadata file to disk.
This commit introduces the `--force` flag to the reload command. This
change means that if the flag is included, the halt step of the reload
will forcefully shutdown the virtual machine rather than a graceful
halt.
Prior to this commit, if the args key was a string rather than an array
of strings, the `join` command would fail when appending the arguments
to the run command for a given script. This commit updates that by
ensuring the `args` option is an array prior to joining the arguments.
Prior to this commit, the `Util::Powershell.execute_inline`
method didn't properly join the passed in command and instead attempted
to execute the array of strings. This commit updates that
behavior to join the command array prior to inserting it into the full
powershell command.
When performing a box update and the box version has been updated
to be different than the installed version, perform a lookup for
the latest available installed box to allow the update command to
continue successfully
Only move new exports file to destination without sudo when the
file has write access and the directory has write access. Always
use sudo when changing file ownership.
When a guest is created, the box metadata information is stored in the
machine data directory. This allows modifications to happen to the
Vagrantfile definition of the box in use (box name change, box version
change, etc) while still allowing the Machine instance of an active
guest successfully load the box currently backing it.
If starting a process while running from within AppImage adjust
the LD_LIBRARY_PATH of the subprocess when the executable exists
outside of the AppImage. This prevents issues of invalid dynamic
library lookups when the AppImage contains common named libraries.
Prior to this commit, the run trigger option wouldn't catch for failures
outside of the #Subprocess.execute raising exceptions. This commit fixes
that by inspecting the exit code result of the subprocess and using the
new `exit_codes` option to determine how to move forward with the
trigger.
When the configured directory for FTP push has too many files, it will
generate an exception and fail due to a stack overflow. When this happens
just rescue out the exception and re-raise a custom error to provide
some context to the user on the actual problem.
`vagrant up` may hang at the "Configuring and enabling network
interfaces..." step when private networks and PTY allocation for SSH
are used.
The newer version of `nmcli` that is part of CentOS now will open a
pager (i.e. `less`) for certain commands if it finds a tty. This
causes the invocations of `nmcli` in `guest_inspection.rb` to hang.
`nmcli` disables the use of a pager in 'terse' (`-t`) output mode,
while still returning enough information for the uses in
`guest_inspection.rb`.
Adds the final line of output to tests and properly simulates
failure. Fix with type casting to prevent calling methods on
nil and drop the final entry as it's not valid.
Fixes#9806
The base chef provisioner class will set the node name automatically
if not provided in the configuration. Since the chef apply provisioner
does not provide a node_name option, setting it will invalidate the
configuration. This checks for the node name before attempting to
use it.
Fixes#9901
Prior to this commit, when setting up private networks on Ubuntu using
netplan, it assumed that the guest was using systemd, the suggested
default tool to manage networking, and did not take into account devices
that could be managed with NetworkManager. This commit fixes that by
looking at the devices managed on the guest to see if its managed by
NetworkManager, and if so, use that renderer for netplan instead of
networkd.
Prior to this commit, the hyper-v provider called an action on a machine
that hadn't fully finished initializing. This commit fixes that by
moving up the initialization of the triggers object next to the rest of
the instance variables of the machine object.
This commit uses the internal helper SafeExec rather than using the
Kernel class directly. It also adds a test to ensure that if the `-t`
option is used, it will call SafeExec.
Prior to this commit, vagrant would halt if it could not parse the
metadata file for a box to check for updates with. This commit changes
that to behave like when vagrant fails to download a metadata file and
continue on but warn the user it failed to check for box updates.
This commit adds a bit more helpful messaging for the user when asking
for a provider that might not exist or does not follow the correct
casing. If it can find a match on a provider it knows about, it will
suggest it.