262 Commits

Author SHA1 Message Date
Brian Cain
5ca382727d
Raise error if argument is provided with --all-global flag
This commit raises an error if additional arguments are provided to the
suspend command when the `--all-global` flag is used.
2018-05-11 15:43:14 -07:00
Stefan Scherer
f14e8bcbf2
Allow other providers in WSL 2018-05-02 22:36:17 +02:00
Brian Cain
fd3d78746c
(#9717) Improve messaging around not finding requested provider
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.
2018-04-26 09:43:58 -07:00
Brian Cain
0054c5aae6
Raise error if incomplete trigger block is defined 2018-04-20 10:51:38 -07:00
Brian Cain
600557ff24
Move strings to translation file 2018-04-20 10:51:38 -07:00
Chris Roberts
f3c5e86f28
Merge pull request #9504 from zachflower/feature/vagrant-aliases
Vagrant aliases
2018-04-06 15:39:18 -07:00
Sergii Bondarenko
62740e2240 #9298: Increase stability of determination of a current WSL instance 2018-02-28 10:08:01 -08:00
Zachary Flower
f46ebf5240 throw an exception when whitespace is found within an alias keyword 2018-02-16 13:28:57 -07:00
Brian Cain
e8708232a5
(#9258) Exit if Hyper-V is enabled and VirtualBox provider is used
This commit adds a function on windows for the VirtualBox provider to
check if Hyper-V is enabled. If so, exit and display a warning to the
user that going forward will result in a system crash.
2018-02-08 11:20:41 -08:00
Chris Roberts
81cbdae62a Make powershell error generalized 2017-12-21 09:55:19 -08:00
Brian Cain
0d7ad9f18f
Merge pull request #9275 from zachflower/validate_ip_addresses
Add a clean error message for invalid IP addresses
2017-12-15 11:22:03 -08:00
Brian Cain
144c402f3b
Merge pull request #9252 from briancain/9055/master/pretty-print-nameerror-exceptions
Print more helpful error message for NameEror exceptions
2017-12-15 09:19:26 -08:00
Brian Cain
627babe15e (#9055) Print more helpful error message for NameEror exceptions
This commit adds some additional handling for when Vagrant loads config
files. Instead of showing the basic ruby exception, it prints a more
helpful error message and tries to direct the user to the line number
and file where the exception is occuring.
2017-12-14 15:31:48 -08:00
Zachary Flower
4a4183398b Add a clean error message for invalid IP addresses 2017-12-14 14:57:21 -07:00
Zachary Flower
abb1149190 Raise an exception when the template cannot be found, and update tests accordingly 2017-11-17 12:20:03 -07:00
Brian Cain
f0f60a1075 (#4666) Remove duplicate export folders before writing /etc/exports
Prior to this commit, if you set up multiple folders to export with NFS
on linux with the exact same hostpath, the template used to write
/etc/exports would end up placing the same path with the same IP in
/etc/exports and cause an error preventing the folders from being
properly mounted. This commit fixes that by first looking at which
folders are being exported and if there are any duplicates. If so,
remove the duplicates and only export 1 hostpath folder. If these
duplicate folders have differing nfs linux options, an exception must be
thrown because we cannot assume which options the user intended to
export with.
2017-09-05 16:05:14 -07:00
Chris Roberts
ad5bc23088 Validate powershell prior to powershell use
Adds powershell validation to ensure powershell is available on
the PATH and checks powershell version to ensure meets the
defined minimum powershell version.
2017-07-31 15:05:41 -07:00
Brian Cain
87b7514603 (#7188) Clean up vagrant snapshot restore/delete error messages
This commit adds some better handling around the snapshot restore and
delete commands for the virtualbox provider. If a user attempts to restore from
a vm that does not exist, instead of exiting 0 it will raise an
exception saying the virtual machine has not been created yet.
Addtionally, if a user attempts to restore from a snapshot id that does
not exist, instead of printing a complicated exception from the
virtualbox cli tool, it prints a more useful error message telling the
user that the snapshot does not exist.
2017-06-07 09:12:20 -07:00
Brian Cain
eadb0ac831 Raise exception if provider doesn't have snapshot capability
Prior to this commit, if a user attempted to use the `vagrant snapshot
save` or `vagrant snapshot list` commands on a vm whose provider did not
support snapshots, it would simply print a warning. This commit changes
that behavior by instead raising an error.
2017-05-26 15:22:25 -07:00
Brian Cain
6ddba4f7b3 (#7810) Enforce unique snapshot names
Prior to this commit, the vagrant snapshot plugin would save snapshots
with existing names which lead to duplicate snapshot names being saved.
This commit fixes that by checking to see if the given snapshot name
already exists and if so, fails telling the user the given snapshot name
already exists. If a user passes a --force flag, vagrant will first
delete the existing snapshot, and take a new one with the given name.
2017-05-25 16:28:17 -07:00
Chris Roberts
3c44ce9742 Support vbox provider within WSL rootfs. Make Windows access easier.
Enables proper setup of VMs started from within WSL rootfs paths. Updates
setup for Windows access when working within the WSL to auto-detect settings
instead of relying on user defined environment variables.
2017-05-12 13:11:53 -07:00
Chris Roberts
e8e38a4007 Halt Vagrant if within WSL and attempting to operate out of rootfs 2017-05-08 15:21:39 -07:00
Chris Roberts
4df4f77bf6 Match WSL installed Vagrant with Windows installed Vagrant 2017-05-08 10:21:01 -07:00
Chris Roberts
83b0c87f52 Support running Vagrant within the Windows Subsystem for Linux 2017-05-08 10:21:01 -07:00
Chris Roberts
78e2bb513c Merge pull request #8531 from chrisroberts/network/guest-rhel
guests/rhel: Update network configuration
2017-05-01 15:56:25 -07:00
Chris Roberts
414184b76b guests/rhel: Update network configuration
Properly detects NetworkManager on guest as well as devices controlled
by NetworkManager. Provides configuration option to enable/disbale
NetworkManager control on devices.
2017-04-26 13:15:33 -07:00
Chris Roberts
2acded113c Retry SSH connection on Errno::ECONNABORTED
In some cases the SSH connection may be aborted while waiting
for setup. This includes aborted connections in the list of
applicable exceptions to retry on while waiting for the connection
to become available.

Fixes #8520
2017-04-25 13:38:24 -07:00
Chris Roberts
df069deac0 Validate plugin sources and report errors if detected. 2017-04-04 17:53:04 -07:00
Chris Roberts
e2acb5250a Add command deprecation helper module 2017-02-24 06:22:39 -08:00
Chris Roberts
fb85bb1c7b Include plugin initialization error class 2016-11-16 13:18:35 -08:00
Chris Roberts
da45ca707c Add md5 and sha1 checksum support to Downloader.
Allows checksum validation on downloaded files via Util::Downloader
using MD5 and/or SHA1 checksums. This also integrates checksum validation
support with the shell provisioner for downloaded remote files.
2016-11-09 16:05:39 -08:00
Chris Roberts
d1a778dbfb Include error handling when subprocess commands fail 2016-10-31 07:42:30 -07:00
Chris Roberts
c39b3fbb76 guests/openbsd: Check package installation after installing package
The `pkg_add` command will return `0` when a package requested for
installation is not found. This adds a validation check to ensure
the rsync package is actually installed on the guest.
2016-10-25 12:16:52 -07:00
Seth Vargo
3b2ffae400
guests/bsd: Print a very descriptive error when mounting vbox folders
BSD-based guests do not support VirtualBox shared folders. This is a
common source of confusion in Vagrant. This new error clearly explains
that this is not a bug in Vagrant and provides instructions on how to 
disable them.
2016-07-18 21:12:58 -04:00
Seth Vargo
7e88266999
guests/linux: Properly escape and retry vbox shared folder mounting 2016-07-18 21:12:57 -04:00
Seth Vargo
177b7784dd
guests/darwin: Allow ipv6 static networks 2016-06-19 12:01:52 -04:00
Seth Vargo
6284a9ac50
guests/bsd: Move NFS mounting logic into shared
A number of the BSD guests used very old mounting options or just
ignored some parameters entirely. This fixes that.

- Closes #7474
- Fixes #7466
2016-06-17 21:04:23 -04:00
Reed Loden
7d81728e45 Add checksum validation for the VirtualBox installs on Windows and OS X
Use Vagrant::Util::FileChecksum to validate the downloaded VirtualBox
installers.

SHA-256 checksums for VirtualBox files are available at
https://www.virtualbox.org/download/hashes/5.0.10/SHA256SUMS.

Fixes #6611.
2015-11-28 00:04:41 -08:00
Mitchell Hashimoto
1405395d81 core: catch EINVAL on setting env vars [GH-6017] 2015-11-23 09:39:51 -08:00
Mitchell Hashimoto
9e1a119a4b Merge pull request #6475 from nikelmwann/linux-host-use-xfreerdp
Prefer xfreerdp for RDP connections on Linux hosts.
2015-11-18 15:12:47 -08:00
Mitchell Hashimoto
d69d7047b2 Merge pull request #6386 from legal90/fix-osx-nic-order
Fix network configuration in OS X (Darwin) guests
2015-11-18 14:33:51 -08:00
Gilles Cornu
9bfdaf7e75 provisioners/ansible: introduce ansible_local
With this change, the existing host-based Ansible provisioner is
refactored to share a maximum of code with this new guest-based Ansible
provisioner.

At this stage of development, the existing unit tests are intentionally
modified as little as possible, to keep safe the existing funtionalities.

Other issues resolved by this changeset:
 - Display a warning when running from a Windows host [GH-5292]
 - Do not run `ansible-playbook` in verbose mode when the `verbose` option
   is set to an empty string.
2015-11-08 10:42:48 +01:00
Mitchell Hashimoto
dad5962ebb hosts/darwin: support virtualbox install 2015-11-04 15:47:56 -08:00
Mitchell Hashimoto
d4ddb3c2f3 commands/provider 2015-11-04 14:20:48 -08:00
Eric Winkelmann
e687f81fce Re-word Linux RDP error to include xfreerdp.
Changed the name of the error LinuxRDesktopNotFound to
LinuxRDPClientNotFound and re-worded error text in
templates/locales/en.yml to include `xfreerdp` when listing supported
RDP clients.
2015-11-02 23:42:01 -08:00
Mikhail Zholobov
f930fa94af Move "cant_read_mac_addresses" error to the global space
Now it is used not only by Windows, but by Darwin guests as well.
2015-10-09 14:57:41 +03:00
Mitchell Hashimoto
f0ddac8c9a providers/virtualbox: clone 2015-10-08 12:33:55 -04:00
Manuel Pöter
f4d1d068f9 Merge branch 'master' into VB-linked-clone-support 2015-07-13 10:56:17 +02:00
Mitchell Hashimoto
71940c60ba providers/virtualbox: error if uid mismatch 2015-07-06 18:13:59 -06:00
Mitchell Hashimoto
36fa04fd1e providers/virtualbox: catch subprocess launch error [GH-1483] 2015-07-05 17:01:06 -07:00