847 Commits

Author SHA1 Message Date
Sophia Castellarin
d9bbdab428
Merge pull request #11567 from soapy1/suse-hosts-mod
Set hostname according to hostname flag and ip for suse
2020-06-15 14:29:43 -05:00
sophia
fe7968315b Add option to allow/disable fstab modification
Defaults to allow modification of fstab
2020-05-29 15:29:21 -04:00
sophia
1dc761a6c4 Refactor out persisting a mount to it's own guest cap 2020-05-29 15:26:48 -04:00
sophia
d7bd29384e Remove fstab if it is unable to successfully mount 2020-05-29 15:26:48 -04:00
sophia
b511d23ae1 Refresh fstab when folders synced 2020-05-29 15:26:48 -04:00
sophia
298027b70e Automatically mount virtual box shared folder when machine reboots
This is done by adding the mount to fstab
ref: https://askubuntu.com/questions/252853/how-to-mount-a-virtualbox-shared-folder-at-startup

Note, add `nofail` to mount options so as to not stop machine from booting if device disappears
2020-05-29 15:26:48 -04:00
sophia
85fd3b79fe Refactor editin guest /etc/hosts into a util 2020-05-29 15:08:39 -04:00
sophia
fc79aa96dd Search for first free loopback address to insert hostname 2020-05-15 14:24:04 -04:00
sophia
f5d5baec40 Set hostname according to hostname flag and ip for suse 2020-05-15 13:30:23 -04:00
Rui Lopes
6719cab41a esxi guest: do not fail when we cannot set the ssh directory permissions in esxi 7.0 2020-05-08 20:20:03 +01:00
Chris Roberts
720c3012ce Use #systemd_networkd? guest check for renderer 2020-04-22 15:07:14 -07:00
Sophia Castellarin
bc4368f739
Merge pull request #11503 from soapy1/smb-symlinks
Smb symlinks
2020-04-20 12:35:38 -04:00
sophia
30ade2991b Emit warning message if using mfsymlink 2020-04-17 09:56:52 -04:00
Sophia Castellarin
5dc96f0886
Merge pull request #11498 from soapy1/ubuntu-w-networkmanager
Choose netplan renderer based on network config and available tools
2020-04-17 09:50:31 -04:00
Chris Roberts
40243a8f2f Adjust when the hook action is performed
With the adjustments provided in #11455 the location of injecting
within the call stack has been changed slightly. With the entire
stack now being generated before execution instead of dynamic
hooks being wrapped around actions at run time, this update
ensures that the method is called correctly after the entirety of
the synced folders action has completed.
2020-04-15 13:46:10 -07:00
Sophia Castellarin
ee87596a77
Merge pull request #11462 from soapy1/docker-provision-centos8
Docker provision centos8
2020-04-13 09:42:37 -04:00
sophia
538ee948ee Choose netplan renderer based on network config and available tools 2020-04-10 17:17:04 -04:00
sophia
307291b7f8 Add mfsymlinks as a default option for mounting smb folders 2020-04-08 14:52:37 -04:00
sophia
5104d075bd Add CentOS guest plugin 2020-04-06 13:48:39 -04:00
Sophia Castellarin
cf9a690bc9
Merge pull request #11482 from soapy1/systemd-cap-halt
Use systemd to halt system if available
2020-04-06 10:18:53 -04:00
sophia
d500daea03 Support centos flavors of redhat 2020-04-03 14:27:44 -04:00
sophia
338f13a2ae Use systemd to halt system if available 2020-04-01 15:43:10 -04:00
sophia
777f680837 Use systemd to rebot system if available 2020-04-01 13:57:07 -04:00
sophia
987ab17f4d Add suport for SMB on redhat 2020-03-25 12:27:04 -04:00
sophia
9d53e8ccab Recognize rhel8 flavor 2020-03-25 10:36:02 -04:00
Jeff Bonhag
6efdcd2068
Merge pull request #11430 from chrisroberts/winssh-hacks
Fix issues with Windows SSH provisioner (continued...)
2020-03-11 10:39:44 -04:00
Chris Roberts
7d44fef00e
Merge pull request #11428 from chrisroberts/fix/windows-reboot
Catch any StandardError exception while waiting for Windows reboot
2020-03-09 16:48:27 -07:00
Chris Roberts
7c2083d5da Update how delayed actions are stored to avoid accessing uninitialized value 2020-03-05 13:25:57 -08:00
Chris Roberts
ec9d23a531 Update public key cap to use powershell 2020-03-04 15:08:03 -08:00
Jeff Bonhag
df7c11a3a7 Fix issues with Windows SSH provisioner
Windows commands that run over SSH are wrapped in a script that writes a
special marker to the two output streams (stdout and stderr).  This
allows Vagrant to consume the output streams.

Unfortunately, this leads to a sort of chicken-and-egg problem where no
commands can be run before a wrapper script exists. For example, you
can't make a destination directory to upload the wrapper script without
first creating a wrapper script to make the directory. :)

This commit changes the behavior of the WinSSH communicator to assume
that the destination directory already exists for provisioning scripts.

It also moves the default `upload_path` from the shell provisioner
config so we can have OS-specific defaults.

Finally, it introduces a Windows-specific #upload method which will
properly use a Windows path separator on a non-Windows host.
2020-03-04 15:08:03 -08:00
Chris Roberts
6f707c829d Catch any StandardError exception while waiting for Windows reboot
This prevents any unexpected connection related error from breaking
the wait loop while windows reboots. If an underlying problem unrelated
to the guest is causing exceptions, the exception will still be raised
to the user, simply after the loop has exceeded the defined maximum
wait time.

Fixes #11238
2020-03-03 17:02:04 -08:00
Chris Roberts
660166720b Update delayed execution implementation to utilized appended action hook 2020-03-03 16:23:31 -08:00
Chris Roberts
25659a6f6b Support properly setting up synced folders on Catalina
Since the root file system is marked as read-only, attempting to
link the shared directory to `/vagrant` will fail. If the guest
path is on the root file system and APFS is used, create the
link as a firmlink instead.
2019-12-18 13:11:30 -08:00
Jeff Bonhag
2fa44f5b8f
Fixes #11218: Update apk cache when installing rsync (#11220)
This ensures that rsync can be installed on an Alpine Linux machine where the
apk cache may not be current.

Display a warning if the vagrant-alpine plugin is installed, since Alpine guest
support has been merged into Vagrant core.
2019-12-17 12:34:53 -05:00
Brian Cain
fb7a9d5582
Remove trailing whitespace 2019-11-21 13:44:28 -08:00
Tomas Krizek
3519f82b24
guest/redhat: fix nfs client installation
CentOS 8+ and Fedora 30+ no longer have the alias "nfs" for "nfs-server"
systemd service.

This shouldn't break backward compatibility, since "nfs-server" service
is available on all supported redhat systems that have systemctl binary.

Fixes #10838
2019-11-21 13:11:29 -08:00
Jeff Bonhag
307123c1f2
Fixes #10753: Add reboot support for Linux guests (#11194)
This commit adds support for setting `reboot: true` while using the
shell provisioner with Linux guests.
2019-11-15 14:46:36 -05:00
Christoph Moench-Tegeder
6f6e58f4ae explicitly test the hostname we'll be setting
getent queries the system resolver for the hostname - but it's not
the resolver we're interested in. In fact, the hostname-to-be-set
may already exist in DNS (becuase DNS really is a nifty thing and
can do a lot of things which are not that possible with /etc/hosts
alone), in which case getent will "not fail" and vagrant will believe
the hostname had already been set.
Instead, query hostnamectl for the "static" hostname - that's the
one we will be setting, so we're ok IFF hostnamectl returns exactly
what we would be setting.
2019-11-01 15:41:04 +01:00
Brian Cain
00e0dc9279
Merge pull request #11076 from dcermak/suse_nfs_support
Update nfs & service daemon names for suse based hosts
2019-10-08 13:41:22 -07:00
Brian Cain
ea550289a9
Merge pull request #11100 from chkpnt/suse-hostname
Use hostnamectl instead of hostname to set the hostname under SUSE
2019-10-08 09:26:46 -07:00
Gregor Dschung
8442b6b59f Use hostnamectl instead of hostname to set the hostname under SUSE 2019-10-03 14:46:14 +02:00
Rui Lopes
ba71c30e04 retry the wait for a windows reboot on connect timeout errors 2019-09-28 12:20:10 +01:00
Dan Čermák
a3588c28a8
Update nfs & service daemon names for suse based hosts
- nfs.service got recently removed in openSUSE Tumbleweed and calling service
  restart nfs errors out on Tumbleweed. nfs.service has been an alias to
  nfs-client.target for a very long time and can thus be safely substituted.
- all actively supported versions of openSUSE & SLE are using systemd now
  => no reason not to use systemctl
2019-09-18 23:28:18 +02:00
Ladar Levison
690963669c Added fall through logic with error messages if OS is unrecognized.
This will print an error message but still exit with 0 if an
ephemeral hostname change was made, which seems more defenisve,
and user friendly to me.
2019-08-03 20:59:41 +05:30
Ladar Levison
53323ba54e Fix the hostname config logic for Alpine.
And allow those who like `vagrant` to go
Alpine skiing!
2019-08-03 15:19:51 +05:30
Tim Schumacher
39fb585295 alpine: Remove unneeded aliases in change_host_name 2019-07-26 08:32:36 +02:00
Tim Schumacher
a7f09f010c alpine: Convert nfs_client capability to seperate commands
The workaround for the broken repository should be safe to be removed,
since the last affected Alpine version (<=3.3) EOL'd in November of 2017.

The remaining important commands can be split out into seperate calls
of sudo(), which removes the need for manual exit-code checking
(since it aborts by itself when a command fails) and makes the code
easier to handle in general.
2019-07-26 08:31:12 +02:00
Tim Schumacher
77616b22b3 alpine: Use absolute paths for network configuration templates 2019-07-18 04:07:15 +02:00
Tim Schumacher
3b03944331 alpine: Replace capability strings with symbols
Those were introduced upstream in b29864f45097.
2019-07-18 03:35:48 +02:00
Tim Schumacher
2216d23048 alpine: Remove version and out-of-tree checks 2019-07-18 03:35:48 +02:00