253 Commits

Author SHA1 Message Date
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
Matija K
b387f0e15d Capability to mount smb shares in darwin guests 2015-05-24 12:39:28 +02:00
Seth Vargo
03b8105571 Super primitive implementation of Environment#push 2014-12-08 11:35:10 -08:00
Seth Vargo
b6c5ca6b7a Add Push command and tests 2014-12-08 11:35:10 -08:00
Mitchell Hashimoto
94b2a8a56b communicators/ssh: insert random key, remove insecure key 2014-10-24 09:58:18 -07:00
Mitchell Hashimoto
37a4000722 providers/virtualbox: more descriptive error if empty version [GH-4657] 2014-10-24 09:20:08 -07:00
Mitchell Hashimoto
cba76c3b68 core: VirtualBox is no longer the fallback, not hardcoded anywhere
This commit finally removes all traces of VirtualBox defaults from
Vagrant core. Vagrant now completely relies on its automated provider
detection to pick the best and most relevant provider that is available
on the system and for a specific development environment.

A "vagrant up" on one development environment might prefer VirtualBox,
another might prefer Docker. As a result of this commit (plus the few
prior), the developer doesn't need to know anymore and doesn't need to
specify a `--provider` flag. Vagrant just figures out the correct
provider.

Yay. :)
2014-10-23 16:32:36 -07:00
Mitchell Hashimoto
58f7310444 providers/virtualbox: detect conflict in name [GH-4681] 2014-10-21 15:56:32 -07:00
mpoeter
c20624bfdc Add support for linked clones for VirtualBox. 2014-09-09 19:17:04 +02:00
Mitchell Hashimoto
4138179207 commands/plugin: error if windows with space in dir [GH-4351] 2014-08-29 12:16:40 -07:00