939 Commits

Author SHA1 Message Date
hashicorp-copywrite[bot]
36a312ee26
add missing license headers and update copyright file headers to BUS-1.1 2023-08-10 21:53:25 +01:00
Chris Roberts
1dd008d65e
Merge pull request #12740 from rbrunckhorst/solaris-sed-fix
Fix sed command on Solaris guest
2022-11-08 15:09:08 -08:00
Sophia Castellarin
aee8d7b96e
Merge pull request #12785 from dustymabe/dusty-el9
Enhancements for EL guests capabilities
2022-08-01 12:10:40 -05:00
Paul Hinze
6f44de5076
Merge pull request #12813 from sni/patch-1
Update nfs_client.rb for rocky 9
2022-07-29 11:12:47 -05:00
Dusty Mabe
3ad20c4c7b guests: add Alma Linux guest support 2022-07-29 09:22:50 -05:00
Dusty Mabe
d82d0fb657 guests: make CentOS/RHEL flavor detection more dynamic
Instead of having to update these flavor.rb files every time a
new version of CentOS/RHEL come out let's dynamically pick up
the version (7,8,9) from the machine.

This was inspired slightly by the Rocky Linux guest flavor.rb.
2022-07-29 09:22:50 -05:00
Dusty Mabe
4336aff67d guests/centos: use GUEST_DETECTION_NAME='centos' to ID CentOS
This migrates the CentOS guest plugin to identify machines by
what is in os-release rather than based on if the /etc/centos-release
file exists.

It just so happens that the Rocky Linux plugin is set up to inherit
directly from :redhat (not :centos) and thus the CentOS flavor is
attempted before Rocky in the depth first search. For some reason
the rockylinux/8 vagrant box still has the /etc/centos-release file
in it even though it's only supposed to inherit from RHEL.

The almalinux/9 box does not have /etc/centos-release.
2022-07-29 09:22:50 -05:00
Dusty Mabe
3b1e277f72 guests: RHEL 9 and CentOS stream 9 are out 2022-07-29 09:22:50 -05:00
Sven Nierlein
8fe4ec4c8d
Update nfs_client.rb for rocky 9
Starting a rocky 9 box (having nfs shares) fails with: `No match for argument: nfs-utils-lib`.
Apparently Rocky 9 does not have a `nfs-utils-lib` but mounting nfs shares without nfs-utils-lib works fine.
So updating the nfs client install to only install `nfs-utils-lib` if the package is available. That way older rhel clones
should continue to work as well.
2022-07-21 13:49:31 +02:00
sophia
a3d4c170f0
Fix guest plugin issues 2022-04-25 12:24:47 -05:00
Ralf Brunckhorst
b8197a65b4 Fix sed command for Solaris
"sed -i" is specific to GNU sed and is not a posix standard option.
The default sed command in Solaris is not GNU sed though it is possible
to install the GNU-sed which includes /usr/bin/gsed
2022-04-17 09:37:56 +02:00
Chris Roberts
66b39d45f4
Merge pull request #12575 from chrisroberts/fix-coreos
Fix coreos network configuration
2021-11-05 10:39:26 -07:00
Chris Roberts
cae807fcf0 Configure each device individually to prevent orphan connections 2021-11-04 15:51:08 -07:00
Chris Roberts
8062242f7f Ignore errors when removing existing configurations 2021-11-04 15:26:34 -07:00
Chris Roberts
f9d1025688
Merge pull request #11880 from elastio/bug/11878-rsync-fails-on-windows
[WIP] Change `mkdir` command on Windows for rsync
2021-11-04 15:03:20 -07:00
Chris Roberts
657b2a39d9 Fix network configuration for coreos guests 2021-11-04 14:53:22 -07:00
Chris Roberts
45cb26348e Update atomic detection to prevent overlap with other guests 2021-11-04 14:52:52 -07:00
Chris Roberts
1cff8c7495 Pass values to exception and define exception message content 2021-11-02 16:42:11 -07:00
Dan Čermák
c4ced5459d
Add fallback for SLE 11 guest machines
SLE 11 does not ship systemd and then using systemctl poweroff does not
work. Therefore we fall back to using /sbin/shutdown for machines without
systemd.
This fixes https://github.com/hashicorp/vagrant/issues/12487
2021-08-06 12:55:32 +02:00
Chris Roberts
a8c5980afb Add Rocky Linux guest support 2021-07-02 15:32:48 -07:00
Dan Čermák
8ce38a639b
Use systemctl poweroff in the background instead of shutdown
We have started seeing occasional shutdown failures on openSUSE Tumbleweed with
Virtualbox inside a qemu virtual machine, where `shutdown -h now` would return
nil. While the machine is successfully turned off, the command fails and vagrant
reports an error.
This commit changes the shutdown command to launch in the background which
also triggers a shutdown, but always succeeds.
2021-07-01 09:31:50 +02:00
sophia
681253aed9 Retry network setup on debain
DAD (Duplicate Address Detection) check times out when we add IPv6 interfaces
2021-06-15 17:49:28 -05:00
Chris Roberts
a088fbba39 Properly wait for reboot process to start
This adds a check to the `#wait_for_reboot` method on the linux
    guest reboot capability to determine if the a reboot is still
    in process. This prevents the reboot process from being initiated
    and the `#ready?` check on the guest being called before the
    system shutdown process has shutdown the communicator process.
2021-04-13 16:42:31 -07:00
Sophia Castellarin
dfc8cab1cc
Merge pull request #12281 from soapy1/smb-mount-name
Get folder mount name
2021-04-13 13:57:37 -05:00
sophia
82dde55e64 Get folder mount name 2021-04-06 16:25:08 -05:00
sophia
97e4fd2551 Import guest detection module 2021-04-05 16:34:56 -05:00
sophia
fad1819cb0 Detect fedora using os-releases id
OS releases was added to fedora in Feb 2012
c6a541628f
and released into both F17 and F18: https://bugzilla.redhat.com/show_bug.cgi?id=733117

Those have both been EOL'ed since 2014
2021-03-11 11:50:43 -06:00
Sophia Castellarin
6f1ab0ed5e
Merge pull request #12181 from soapy1/alpine-configure-networks
Check if interface exists before shutting it down
2021-02-23 13:21:19 -06:00
sophia
b30a87ce6c Extract os friendly mount name for vbox shared folders 2021-02-10 15:25:56 -06:00
sophia
b24d4252c5 Check if interface exists before shutting it down 2021-02-10 10:44:36 -06:00
Sophia Castellarin
a8363db300
Merge pull request #11791 from jbonhag/e/guest-openwrt
Guest support for OpenWrt
2020-12-22 15:05:48 -06:00
sophia
fffe6ea4a5 Add darwin version cap 2020-11-17 19:21:21 -06:00
sophia
8eea6a2301 Mount vmware synced folders for big sur guests 2020-11-17 19:21:21 -06:00
Chris Roberts
4751353a5f Fetch reboot env var at run time and keep constant values constant
Keep the default duration as a constant and fetch the custom environment
variable at run time with a fallback to the default. Set the sleep duration
into a constant and add tests covering the expected behaviors when the
default duration is in use as well as the override value. Also match the
environment variable up with the constant just for consistency.
2020-11-03 15:11:10 -08:00
Arthur Maltson
a2f5d615a0 Make max reboot retry duration configurable
Previously the maximum amount of time Vagrant would poll for whether a
machine has successfully reboot was hard coded to 120 seconds. This
change introduces the VAGRANT_MAX_REBOOT_RETRY_TIMEOUT environment
variable to allow this attribute to be configurable.

Add RSpec tests of the maximum retry logic. Since the maximum retries
are configured as a constant, we'd need to reload the class and that's
fairly ugly to do in RSpec.

Fixes #11695
2020-10-31 18:00:01 -04:00
Sophia Castellarin
8ad772629b
Merge pull request #11923 from soapy1/arch-smb
Install smbclient when setting up arch smb
2020-10-28 15:40:45 -05:00
sophia
12d5b56f14 Fix indentation 2020-10-28 12:35:36 -05:00
sophia
0979cfcf4c Don't use hostnamectl if not on system 2020-10-26 17:06:48 -05:00
sophia
0c283e5b50 Install smbclient when setting up arch smb
Leaving out smbclient from the install will cause a cyclical
dependency error.

```
Was getting error
Stderr from the command:

warning: dependency cycle detected:
warning: smbclient will be installed before its cifs-utils dependency
error: failed to commit transaction (conflicting files)
```
2020-09-23 11:59:42 -05:00
sophia
00e4810197 Add mount_name synced folder capability to get name of mount 2020-09-22 16:57:43 -05:00
sophia
3afd646a27 Fix osx guest smb mount 2020-09-22 16:56:11 -05:00
sophia
11aeafea5c Add tests for smb mount options driven through synced folder capabilities 2020-09-22 16:56:11 -05:00
sophia
583b3f5332 Persist smb mounts 2020-09-22 16:53:10 -05:00
sophia
7e698b757d Mount smb folders using mount options from cap 2020-09-22 16:53:10 -05:00
Sophia Castellarin
0d0935fce7
Merge pull request #11909 from soapy1/fstab-mod
Create fstab if does not exist
2020-09-22 14:29:09 -05:00
sophia
b6aebeacae Use '-r' xargs argument
This will pervent running sed if there are no results
passed to xargs
2020-09-16 10:36:55 -05:00
sophia
0831df2e7f Create fstab if does not exist 2020-09-15 15:38:32 -05:00
Sophia Castellarin
bc949da980
Merge pull request #11877 from soapy1/rhel-check-network-files
Check for existence of network files before trying to update them
2020-09-15 11:13:06 -05:00
Sophia Castellarin
3a407c9dfa
Merge pull request #11885 from soapy1/debian-host-name-order
Set hostname in /etc/hosts as first step to changing hostname
2020-09-15 11:11:12 -05:00
sophia
7370f24318 Check for existence of network files before trying to update them 2020-09-14 11:10:52 -05:00