Commit graph

3735 commits

Author SHA1 Message Date
oss-core-libraries-dashboard[bot]
395d9424cd
[COMPLIANCE] Update Copyright and License Headers (Batch 6 of 7) (#13760)
Some checks failed
/ sync-acceptance (push) Waiting to run
Vagrant Ruby Tests / Vagrant unit tests on Ruby 3.1 (push) Has been cancelled
Vagrant Ruby Tests / Vagrant unit tests on Ruby 3.2 (push) Has been cancelled
Vagrant Ruby Tests / Vagrant unit tests on Ruby 3.3 (push) Has been cancelled
Vagrant Ruby Tests / Vagrant unit tests on Ruby 3.4 (push) Has been cancelled
Co-authored-by: hashicorp-copywrite[bot] <110428419+hashicorp-copywrite[bot]@users.noreply.github.com>
2025-12-22 16:47:48 +05:30
oss-core-libraries-dashboard[bot]
baad494090
[COMPLIANCE] Update Copyright and License Headers (Batch 5 of 7) (#13764)
Co-authored-by: hashicorp-copywrite[bot] <110428419+hashicorp-copywrite[bot]@users.noreply.github.com>
2025-12-22 16:47:10 +05:30
oss-core-libraries-dashboard[bot]
1a8c7eb042
[COMPLIANCE] Update Copyright and License Headers (Batch 4 of 7) (#13762)
Co-authored-by: hashicorp-copywrite[bot] <110428419+hashicorp-copywrite[bot]@users.noreply.github.com>
2025-12-22 16:46:54 +05:30
oss-core-libraries-dashboard[bot]
ea57f40b89
[COMPLIANCE] Update Copyright and License Headers (#13752)
Some checks failed
/ sync-acceptance (push) Has been cancelled
Vagrant Ruby Tests / Vagrant unit tests on Ruby 3.1 (push) Has been cancelled
Vagrant Ruby Tests / Vagrant unit tests on Ruby 3.2 (push) Has been cancelled
Vagrant Ruby Tests / Vagrant unit tests on Ruby 3.3 (push) Has been cancelled
Vagrant Ruby Tests / Vagrant unit tests on Ruby 3.4 (push) Has been cancelled
Co-authored-by: hashicorp-copywrite[bot] <110428419+hashicorp-copywrite[bot]@users.noreply.github.com>
2025-12-04 17:07:40 +05:30
Sebastien Dionne
81e6dfa595
Merge pull request #13731 from survivant/main
Fix typos and linguistic errors in documentation / hacktoberfest
2025-11-21 10:52:25 +05:30
Taru Garg
91e63ec18d
chore: clean whitespaces 2025-11-19 17:25:52 +05:30
Taru Garg
dc373e4fc0
fix(provisioner/ansible): Allow for selection of inventory arg based on the ansible-core version 2025-11-18 18:24:12 +05:30
Conner Crosby
8867704e59
Replace deprecated Ansible inventory file option
This was done because the --inventory-file option for Ansible is
anticipated to be removed as of the ansible-core package version '2.23'.
2025-11-05 13:04:15 +05:30
Corey Hemminger
4978fab045
Add Vbox 7.2 support (#13709)
* Add Vbox 7.2 support

Signed-off-by: Corey Hemminger <hemminger@hotmail.com>

* update comment for 7.2

Signed-off-by: Corey Hemminger <hemminger@hotmail.com>

---------

Signed-off-by: Corey Hemminger <hemminger@hotmail.com>
2025-08-19 13:54:24 +05:30
Taru Garg
a241e79fc4
Fix Ansible Install capability for RHEL like system with version >= 10 (#13701)
On RHEL-like systems with major version >= 10, the current Ansible installation logic incorrectly parses the version from rpm -E %dist. This is because the current inline sed command that only extracts the first character of the version string—so for version 10, it extracts only 1, resulting in an incorrect download URL.
2025-08-07 20:07:19 +05:30
Taru Garg
df215db4ae
Update box add action to pass arch correctly (#13699)
Currently, during the box add action env[:architecture] gets passed down to add_direct, however, there is no architecture in env, the correct arch which is set in Vagrantfile is box_architecture, this PR changes the action to pass down the correct parameter.

Closes: #13698, #13697
2025-07-31 21:16:30 +05:30
Taru Garg
56a91e9afd
fix(networking): Allow configuring guest network when there is more than one interface attached (#13686)
* Add support for configuring guest network when there are more than 1 interfaces attached
2025-06-19 10:22:21 +05:30
Taru Garg
d275631a24 tests(guests/linux): Added tests for fstab cleanup 2025-06-06 01:42:34 +05:30
Taru Garg
e08fbad643
fix(provider/docker): Ensure auto-assigned container name starts with valid characters (#13678)
* Ensure container name starts with valid characters when name is auto-assigned
2025-06-03 20:45:26 +05:30
Chris Roberts
849591beb7
Merge pull request #13670 from hashicorp/fix-hyperv-diff-import
Fix hyperv import failure due to lack of resources
2025-05-21 09:25:34 -07:00
Chris Roberts
6a4d7a7411
Merge pull request #13669 from hashicorp/hyperv-guest-id
Extract hyperv guest ID from result if needed
2025-05-21 09:04:20 -07:00
Chris Roberts
6a0f875833
Fix hyperv import failure due to lack of resources
When importing a box that was built with more resources than is
available on the current system, import would fail. If the memory
and/or cpu values are set in the Vagrantfile configuration, provide
them when importing the guest. This allows the values to be modified
prior to registering the new guest preventing a resource unavailability
error.

Fixes #12180
2025-05-20 18:10:49 -07:00
Chris Roberts
318e3dd064
Extract hyperv guest ID from result if needed
Result from import may be received in an array. Detect if the result
is an array and extract the first result. Otherwise, if the result
is not a string, force an error.
2025-05-20 18:02:20 -07:00
Chris Roberts
cc16c60b43
Add basic oscdimg detection on Windows
Check for the oscdimg executable on both the PATH and known installation
location. When not found, provider a user friendly error message about
the missing executable and a helper link on where it can be found.
2025-05-20 17:52:39 -07:00
Chris Roberts
f4fc2c742a
Update cloud-init behavior and iso generation
This includes a couple modifications to the cloud-init behavior.
First, the cloud-init wait action will now write a sentinel file
after successfully waiting for cloud-init. This results in subsequent
boots of the machine to skip executing the cloud-init wait command
as cloud-init is only executed on the initial boot.

Second, the cloud-init setup action will check for the sentinel file
written by the cloud-init wait action, and if detected it will skip
the cloud-init setup. When creating the ISO for cloud-init, a second
sentinel file will be used to log the path of the generated ISO
file. If the file exists, the ISO generation process will be skipped.
2025-05-14 12:57:03 -07:00
Chris Roberts
b216228bf0
Fix syntax in constant definition, add test coverage for ranges
Adds missing comma in the constant definition and add test coverage
for when no configuration file is available to validate acceptable
addresses within defined constant values.
2025-05-13 09:35:57 -07:00
Chris Roberts
497e2daeca
Make box add failure messages more helpful
This adjusts the failure detection and errors raised when a box
cannot be added. New errors are added for when a requested provider
on a box does not support an architecture, and for when the no
providers on a box support an architecture. When box supports
an architecture but not with the requested provider, a list of
supported providers will be returned in the error message. If
a version constraint is requested and cannot be satisfied due
to provider and architecture filtering, the list of valid versions
will be provided.

Small change to the version list in the error output: the list
has been reversed so the most recent versions are listed first.
2025-04-30 17:50:27 -07:00
Chris Roberts
89a5bb2086
Fix VirtualBox private network setup
Include network display name within the output of the
`#read_host_only_interfaces` driver method. When matching
the private network name, use the `#read_host_only_interfaces`
method and not the `#read_host_only_networks` method which
is darwin specific. Backport the `display_name` inclusion
to old driver versions for consistent behavior.

Fixes #13655
2025-04-28 10:08:43 -07:00
Chris Roberts
eee6fefd67
Add a :none communicator
Adds a communicator which does not provide communication to the
guest machine. All methods for the communicator are simply stubbed
with a successful result. This allows a guest to be configured
with the `:none` communicator and Vagrant to properly `up` it.

This currently lacks any user notification or guards within
configuration to verify guest configuration does not rely on
the communicator. It is wrapped as experimental to allow early
access to the basic functionality without making it generally
available.
2025-04-22 15:50:36 -07:00
Chris Roberts
12af53a6a3
Prefer pwsh executable over powershell excutable
Prefer to use the pwsh executable over the powershell executable
as the pwsh exectuable will be faster loading than the powershell
executable. If the pwsh executable is not found, the powershell
executable will be used instead. The preference can be overridden
using the VAGRANT_PREFERRED_POWERSHELL environment variable.
2025-04-15 14:15:56 -07:00
Chris Roberts
cc355dd0ef
Fix box add action to include architecture
If only one provider is available for the architecture, it is
selected, but when actually selecting it the architecture
constraint was not included. Depending on the order of the provider
list, the wrong value would be chosen.
2025-04-09 14:43:07 -07:00
Chris Roberts
93534c172c
Merge pull request #13645 from hashicorp/smb-mount-fail
Remove nofail option from smb synced folder mount options
2025-04-08 17:21:31 -07:00
Chris Roberts
a3f10873c5
Merge pull request #13644 from chrisroberts/vbox-hostonly-iface
Use interface name for hostonly network configuration
2025-04-08 17:20:25 -07:00
Chris Roberts
d9186eaca0
Merge pull request #13643 from chrisroberts/hyperv-primary
Update primary disk detection in hyperv
2025-04-08 17:19:30 -07:00
Chris Roberts
b37a04534f
Merge pull request #13640 from chrisroberts/arch-networking
Fix arch guest networking setup
2025-04-08 17:17:51 -07:00
Chris Roberts
d67398e89b
Remove nofail option from smb synced folder mount options
The `nofail` option results in failures being improperly suppressed
resulting in a successful run with a failed mount. Removing this
option so mounting failures will properly fail the process.
2025-04-08 15:46:01 -07:00
Chris Roberts
7e283bd185
Use interface name for hostonly network configuration
When provided a name for the hostonly network in the VirtualBox
provider, always use the interface name in the final configuration.
2025-04-08 14:54:55 -07:00
Chris Roberts
a8e61a3daf
Update primary disk detection in hyperv
Select the first disk as the primary disk when locating the
primary disk within the hyperv provider.
2025-04-08 13:27:55 -07:00
Chris Roberts
f4d9f75878
Fix arch guest networking setup
Updates network configuration capability in Arch Linux guest to
properly handle NetworkManager. Extracts NetworkManager setup
into reusable module.
2025-04-08 08:56:26 -07:00
Chris Roberts
e4dc350ace
Add dvd disk support to Hyper-V provider 2025-04-07 15:56:02 -07:00
Chris Roberts
ea25996b21
Update Vagrant behavior outside of installers
Remove customized require behaviors and modify the bin executable
to check for missing tools that Vagrant expects to exist when
running outside of an installer.
2025-04-02 11:40:17 -07:00
Chris Roberts
64d1603fd5
Fix alpine networking for public network
Updates the alpine guest network configuration for public network
entry with `use_dhcp_assigned_default_route` to use the `udhcpc`
command instead of the `dhclient` command which is not included.
2025-03-28 09:50:57 -07:00
Chris Roberts
4f79fe59c6
Provide configurable retries for connect on SSH communicator
Adds two new options to the SSH connect configuration: `connect_retries`
and `connect_retry_delay`. Provides user configurable values used when
establishing the SSH connection. Previous behavior would retry generally
by the default value without a pause between attempts. Updated behavior
will retry the number of times set within the config (unless value is
provided directly to connect call) and each retry will pause based on
the delay value set in the config (unless value is provided directly
to the connect call).
2025-03-20 17:44:47 -07:00
Chris Roberts
78ec3f2ea9
Update amazonlinux guest network configuration
Adds suppport for configuring networking on amazonlinux when
network devices are handled by networkd. When not handled by
networkd, falls back to using the redhat capability.
2025-03-20 14:20:34 -07:00
Chris Roberts
75726b112a
Update RHEL guest networking
Recent versions of RHEL based guests have updated network configuration.
Detect the correct location of the network configuration files, and
configure the guest based on the detected location.

Fixes #13616
2025-03-19 17:42:11 -07:00
Chris Roberts
3fde423e96
Merge pull request #13622 from hashicorp/vagrant-go-rm
Remove vagrant-go implementation
2025-03-17 14:55:38 -07:00
Chris Roberts
e3a8d7f2cf
Remove vagrant-go implementation 2025-03-17 14:14:42 -07:00
Allison Larson
bc9f0b8c4c
Merge pull request #13564 from eszense/rmi-patch
docker/provider: handle variation in error text during image removal
2025-03-14 16:46:16 -07:00
Allison Larson
6729d2546c provider/docker: add test case for podman message to #rmi 2025-03-14 16:22:13 -07:00
Allison Larson
d1f699b76b
Merge pull request #13606 from allisonlarson/catch-io-timeout-error
Catch IO::Timeout when waiting for communicator
2025-03-13 10:18:52 -07:00
Allison Larson
b6c7a15581 Catch IO::Timeout when waiting for communicator
Ruby 3.2 introduced a new error, `IO:TimeoutError`, for blocking
operations. Formerly, this case would return `Errno::ETIMEDOUT`. Catch
the new error while waiting for the communicator so that the retries can
be correctly attempted.

https://bugs.ruby-lang.org/issues/18630
2025-03-12 16:21:06 -07:00
Allison Larson
5564b8a1fd Determine compatible version when checking outdated box
When a request to check an outdated box (or update a box), add explicit
architecture compatibility check in addition to ensuring the version is
newer than before.

The architecture compatibility checks allow boxes that were marked as an
"unknown" architecture to see new "unknown" architectures as viable
update options, if an architecture specific provider is not available.
In the scenario that the existing version/provider has an explicit
architecture defined, a new version/provider with an "unknown"
architecture is not considered compatible.

This architecture check can be bypassed by explicitly setting
`config.vm.box_architecture = nil` in the Vagrantfile.
2025-03-03 14:58:45 -08:00
Allison Larson
834e84fa6e Include arch constraint when checking global outdated boxes 2025-02-26 15:59:56 -08:00
Chris Roberts
b375e4d5b6
Remove activation at startup, add helper
This removes the gem activation from the startup and adds a
helper for properly activating gems based on the defined
runtime constraints of the vagrant specification at loading
time.
2024-11-06 17:33:00 -08:00
Chris Roberts
b5d62e2d81
Merge pull request #13343 from tnaroska/docker_build_containerd_fix
Fix#13342 adapt docker provider build for containerd storage
2024-11-01 14:07:00 -07:00