Commit Graph

791 Commits

Author SHA1 Message Date
Brian Cain 2f0c66f832
Only enable shared folder mounts on freebsd guests
Since the virtualbox guest additions seem to only be available for
freeBSD, move the shared folder functionality over to freebsd guests
rather than all BSD guests.
2019-03-08 11:03:23 -08:00
Brian Cain b2251d5bec
Update logger to display vboxvfs module rather than vboxsf
Ensure the logger displays the right vbox module used for mounting
shared folders
2019-03-07 10:49:38 -08:00
Brian Cain 0bfca8293a
Update from vboxsf to vboxvfs
BSD guests use vboxvfs module for mounting share folders
2019-03-07 10:35:37 -08:00
Brian Cain 554b096961
Fixes #8884: Introduce proper VirtualBox shared folders for BSD
This commit adds proper VirtualBox shared folder support for BSD guests.
It is essentially a copy of the linux capability.
2019-03-07 10:35:37 -08:00
Chris Roberts 927364652f
Merge pull request #10595 from danowar2k/master
- FIX for #10594
2019-02-26 14:09:31 -08:00
Chris Roberts ade5370db3 Add reboot output to guest capability 2019-02-01 15:47:02 -08:00
Daniel Poggenpohl 2d9ba0e906 - FIX for #10594 (more logical flow) 2019-01-17 14:59:52 +01:00
Daniel Poggenpohl d565f628fd - FIX for #10594 2019-01-17 14:21:53 +01:00
Brian Cain 65a7261853
Fixes #10585: Properly set DHCP for systemd-networkd ips
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.
2019-01-11 10:19:37 -08:00
Iku Iwasa 982534aaed Fix grep command for network interface of CoreOS guest 2019-01-04 00:25:35 +09:00
Chris Roberts 9f1e7d9895 Prevent nil dup as unsupported in 2.3 2018-12-20 07:43:43 -08:00
Chris Roberts a4a98d97fc Fix guest network configuration by properly extracting extra options
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
2018-12-19 16:08:47 -08:00
Brian Cain 796ff7b190
Remove logger from windows hostname cap 2018-11-05 14:12:16 -08:00
Brian Cain 377b900277
Only execute reboot check if guest communicator is ready 2018-11-02 16:33:36 -07:00
Brian Cain 142a6898bc
Add reboot cap for windows
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.
2018-11-02 15:25:57 -07:00
Brian Cain 54c8ebc31a
Fixes #10229: Add timeout for changing hostname on windows
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.
2018-11-02 09:23:00 -07:00
Brian Cain a1bb7b837a
Use semicolon over ampersand to separate commands 2018-10-24 15:27:33 -07:00
Brian Cain e8c6916ebc
Restart each interface if systemd-networkd or networkmanager is not used
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
2018-10-24 11:34:38 -07:00
Brian Cain 1761e65f26
Fixes #9763 #10300: Fall back on ifdown/ifup tools for network restart
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
2018-10-23 14:47:12 -07:00
Brian Cain 0c5d55e69c
Fixes #9763, #10300: Split out how hostname is set with Debian hosts
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.
2018-10-16 12:00:25 -07:00
Chris Roberts 48d358adcb Add winrm and upload commands 2018-10-04 13:26:41 -07:00
Chris Roberts 11b0d58fa0 Include communicator on call 2018-10-01 08:43:49 -07:00
Chris Roberts 1797798760 Fix module name 2018-09-28 07:59:39 -07:00
Chris Roberts ff021fcab4 Update redhat change host name capability to support systemd
Update capability to use guest inspection module for determining
correct actions to execute. When systemd is in use restart the
correct active service, either NetworkManager or networkd. Default
to using the original service restart when systemd service is not
found.
2018-09-20 16:44:08 -07:00
Joe Doss 19aa9578c7 Exit 1 if we cannot set the hostname. 2018-09-20 15:28:37 -07:00
Joe Doss c14a4a09f7 Switch if statements, check for systemctl, and switch to is-active. 2018-09-20 15:28:37 -07:00
Joe Doss 94954739b5 Simplified if statements. 2018-09-20 15:28:37 -07:00
Joe Doss 80006251f4 Add in logic to restart NetworkManager if it is enabled. 2018-09-20 15:28:36 -07:00
John Rizzo b7d702ab5f
Update mount_shared_folder.rb
This change allows special characters in the password such as ) which will cause cmdkey to fail without the quotes.
2018-09-18 13:34:32 -07:00
Brian Cain 11c619bff6
Merge pull request #10092 from jmaness/patch-1
[#10098] Filter out empty strings and loopback interfaces when constructing the list of network interfaces
2018-08-31 10:03:49 -07:00
Brian Cain 9ec2eae5c9
Merge pull request #9976 from Biteable/fix-cmd-command
Allow shared folders to be mounted after installing MSYS2
2018-08-07 13:13:05 -07:00
Jeremy Maness a73fb9c139 - Filter out empty strings when constructing the list of network interfaces
- Sort interfaces properly whose name does not contain a numeric suffix (e.g. lo)
- Filter out loopback interfaces
2018-08-04 21:16:51 -04:00
Brian Cain b3da2bd21f
(#9614) Add back check for Solaris derived guests
This commit adds back the `uname` test 93c571adbf
removed to catch any solaris 11 derived guests like openindiana
2018-08-01 14:25:04 -07:00
Chris Roberts 584b288b8f
Merge pull request #9935 from whitel/fix-for-#9878
Fixes the change in packaging for nfs in f28 (#9878)
2018-07-27 10:22:42 -07:00
William Bowling 4ec865b69d
Make sure that the correct cmd is run
After installing msys2, there is another `cmd` on the path which prevents shared folders from being mounted. Explicitly calling `cmd.exe` fixes the issue
2018-07-02 13:15:10 +10:00
langdon f0b9d025e4 Fixes the change in packaging for nfs in f28 (#9878). However, removed part of the unit test which will be very difficult to fix (I expect). The unit test is still doing a good test that nfs and rpcbind work though. If you go far enough back, you need to bury the error out too. 2018-06-18 12:16:23 -04:00
Trey Tabner c218267436
Merge branch 'master' into debian-systemd-networkd 2018-06-13 12:49:50 -05:00
Chris Roberts 6f76275f9e
Merge pull request #9867 from jnahorny/fix-9592-systemd-networkd
Fix issue 9592 when systemd-networkd is used by Debian guest
2018-06-08 16:08:27 -07:00
Trey Tabner 59474f80fd Increase priority and support multiple networks 2018-05-30 10:10:36 -05:00
Jaroslaw Gorny 995c43dd0c Fix issue 9592 when systemd-networkd is used by Debian guest 2018-05-25 00:06:20 +02:00
Igor Mazur 66b2866373
Shorten if 2018-05-23 11:17:40 +03:00
Igor Mazur 07bbaf9ac5
Fix fo tests (symbol and string dhcp) 2018-05-22 23:29:53 +03:00
Igor Mazur be096c3ef4
Fix for ubuntu 17.10+ netplan
https://github.com/hashicorp/vagrant/issues/9570
2018-05-21 23:48:40 +03:00
Brian Cain 728a9135c8
(#9726) Update netplan config generation to detect NetworkManager
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.
2018-05-10 13:02:05 -07:00
Chris Roberts c571249000 Support VirtualBox shared folders using builtin kernel module
Check error output if initial mount command fails to determine if
the builtin module should be used for mounting instead.
2018-05-07 13:02:19 -07:00
Jose Luis Duran 53acd20548
Fix network configuration on FreeBSD hosts
There was a missing space within `sed` parameters that caused the
`rc.conf` file to be wrongly created as `rc.conf-e`.
2018-04-19 16:25:16 -03:00
Brian Cain f1de9821e1
Merge pull request #8099 from chrisroberts/windows/shared-folder-path
Fix virtualbox shared folders path
2018-04-10 09:16:06 -07:00
Chris Roberts 97dd9e0469 Adjust priority of network configuration file for debian guests
This adjusts the priority of the network configuration file from 99
to 50 making it easier for customized configuration.

Fixes #9592
2018-04-02 12:08:06 -07:00
Brian Cain 696ffa4e30
Merge pull request #9528 from artw/master
less specific string grep to fix PhotonOS 2.0 detection
2018-03-22 10:31:29 -07:00
Brian Cain ab24bd2cf1
Merge pull request #9600 from kinvolk/kosy/coreos
Identify operating systems closely related to CoreOS
2018-03-22 10:11:43 -07:00