124 Commits

Author SHA1 Message Date
Chris Roberts
443ff01ab7 Add key_type configuration option for ssh
Adds a new `key_type` option to the Vagrantfile ssh configuration. It
defaults to :auto which allows auto detection of key type to use.
Otherwise it can be set to an explicit type supported by Vagrant.
2024-01-10 11:37:50 -08:00
Chris Roberts
6e13612111 Add test coverage for architecture support 2023-09-14 16:15:03 -07:00
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
Paul Hinze
a916cddf68
Re-enable pending test since box_optional works again 2022-07-15 12:14:47 -05:00
Paul Hinze
6f9ea74e0e
Mark box_optional test as temporarily pending 2022-05-26 11:16:45 -05:00
Chris Roberts
e7a6f397da Updates for Ruby 3.0 2021-06-21 15:57:46 -07:00
sophia
e02bf717b9 Fully replace :nfs option with :type => :nfs for synced folders 2020-10-22 14:59:34 -05:00
sophia
f4640e49ff Ensure provider specific config gets transformed into common form 2020-10-06 16:27:20 -05:00
sophia
bc898e385d Update tests for synced folder typed hash 2020-08-19 15:00:40 -05:00
sophia
faad9f2717 Add tests 2020-08-19 15:00:40 -05:00
Sophia Castellarin
a2811909be
Merge pull request #11618 from jbonhag/fix/empty-box
Treat an empty box value as invalid
2020-08-07 11:18:33 -05:00
Sophia Castellarin
3d4b721a22
Merge pull request #11579 from soapy1/provisioner-communicator_required
Provisioner communicator required
2020-07-17 10:45:34 -05:00
Jeff Bonhag
352b955d09
Treat an empty box value as invalid
This fixes an issue where having a box name set to an empty string will
cause all Vagrant commands to fail with an error like:

ArgumentError: Malformed version number string (random box name)

This may be related to #10663.
2020-07-13 17:37:13 -04:00
Jeff Bonhag
de461fa47c
Fix a couple of tests
Use subject instead of invalid_subject because the validation assertions
test the subject double.

This also adds an additional check when validating the `size` attribute
because it is only required for disks of type `:disk`.
2020-07-09 15:33:19 -04:00
Jeff Bonhag
33ef2ca017
Add machine name to error messages 2020-07-09 15:11:31 -04:00
Jeff Bonhag
84d2c38cc2
Disallow multiple copies of the same ISO
This makes disk/dvd behavior more consistent, and makes it easier to
determine whether a dvd is already attached.
2020-07-09 15:09:10 -04:00
Jeff Bonhag
e21fb59380
DVD attachments should never be primary 2020-07-09 15:07:48 -04:00
Jeff Bonhag
8985369eab
Raise an error if disk files are re-used in config 2020-07-09 15:07:46 -04:00
Jeff Bonhag
c52eb1b44c
Feature: ISO attachment for VirtualBox
This builds on the existing disk functionality, and adds some special
IDE controller-related flavor.

Considerations for IDE controllers:
- Primary/secondary attachments, so that each port can have two devices
  attached
- Adding the ability to address a specific controller name for disk
  attachment

This also prevents a user from attaching multiple instances of the same
ISO file, because VirtualBox will assign each of these the same UUID
which makes disconnection difficult. However, if multiple copies of the
ISO are attached to different devices, removing the DVD config will
cause the duplicate devices to be removed.

We may want to consider additional work to make the storage controllers
truly generic.
2020-07-09 15:07:27 -04:00
Brian Cain
497cb67b50
Include new disk ext cap methods in test mock ups 2020-06-30 14:23:34 -07:00
Brian Cain
b36db04b3d
Validate and get default disk extensions for provider
This commit updates the hyperv and virtualbox provider caps to validate
and also return the default disk extension.
2020-06-30 14:23:34 -07:00
Brian Cain
66fe2e2854
Ensure size param is set for a disk 2020-06-30 14:23:34 -07:00
Brian Cain
cf063c6e38
Update validation to look for if provider_config is empty not nil 2020-06-30 14:22:41 -07:00
Brian Cain
5258c68cf2
Fixup disk unit tests 2020-06-30 14:22:41 -07:00
Brian Cain
fe7705e694
Update how disk_ext default is set
Prior to this commit, the default value of disk_ext was set in the
finalize! method, and was really only valid for the virtualbox provider.
This commit updates that by moving the step into the validate function,
which has access to the machines provider.
2020-06-30 14:22:41 -07:00
Chris Roberts
c9a65ac75b
Merge pull request #11688 from chrisroberts/f-trigger-all
Fix trigger matching on `:all` special value
2020-06-15 14:15:26 -07:00
Sophia Castellarin
a2b70bc28a
Merge pull request #11566 from soapy1/network-hostname-flag
Add :hostname option to network config
2020-06-12 16:51:31 -05:00
sophia
b02a78c661 Change config option to allow_hosts_modification 2020-06-12 14:50:07 -05:00
sophia
7265dd2a84 Add :hostname option to network config
* hostname is a boolean
* a network that sets hostname should have a static ip address
* only one network may set hostname

can be set at `config.vm.network :public_network, hostname: true, ip: "192.168.0.1"`
2020-06-12 14:44:35 -05:00
sophia
ff0aea4493 Add option to disable modification of /etc/hosts on guest 2020-06-12 14:25:19 -05:00
Brian Cain
7b95826dd7
Add type as param for cloud_init config 2020-06-10 15:38:18 -07:00
Chris Roberts
916655dbd3 Fix trigger matching on :all special value
Updates the type to do a proper comparison when checking for
the `:all` special value as well as applied ignores.

Fixes #11599
2020-06-09 16:12:48 -07:00
Brian Cain
aeeb5dfc6f
Introduce cloud_init config for Vagrant
This commit adds the basic config class for defining cloud_init for a
given guest
2020-06-05 10:38:24 -07:00
sophia
672859e296 Add tests and docs 2020-05-29 15:34:46 -04:00
Chris Roberts
4546d804b1 Add support for configuring SSH connect timeout
Retains the original default value of 15 seconds for SSH connect
timeout. Allows users to modify this timeout via SSH communicator
option. Enforces integer values for timeout and validates custom
values are greater than 0.
2020-04-20 14:23:21 -07:00
Chris Roberts
d08c68ecf3 Adjust how trigger actions are inserted into the stack
This adjusts how triggers are implemented during a normal run. Any
defined triggers which are applicable are located and injected into
the run stack as the stack is built, including hook type triggers.

Support is included for dynamic hook lookup.

The data type used when defining triggers has also been relaxed to
support symbols, strings, or constants.
2020-03-17 15:07:36 -07:00
Brian Cain
dafb60ad4f
Update experimental feature flag for disk 2020-02-12 15:38:34 -08:00
Brian Cain
c179b2fb22
Include updated unit tests for disk ext update 2020-02-12 13:51:59 -08:00
Brian Cain
b11aa53294
Remove unused experimental flag for disk enablement 2020-02-10 13:03:58 -08:00
Brian Cain
718332b35e
Fixup disk tests 2020-02-10 12:58:11 -08:00
Brian Cain
f55aca091c
Wrap disk feature in experimental flag 2019-11-22 14:40:23 -08:00
Brian Cain
734aad1ede
Enforce unique names for disk config objects 2019-11-22 14:40:23 -08:00
Brian Cain
a457dee8b0
Set default disk to non-primary 2019-11-22 14:40:23 -08:00
Brian Cain
f01c90e676
Rename rspec test name 2019-11-22 14:40:23 -08:00
Brian Cain
87366cf4f3
Add basic disk config unit tests 2019-11-22 14:40:23 -08:00
Brian Cain
93828508ec
Update config/vm with tests for disk config 2019-11-22 14:40:23 -08:00
Brian Cain
68e21d8ac5
Merge pull request #10664 from chrisroberts/f-plugin-config-format
Fix format finalization of plugins in Vagrantfile
2019-02-12 10:00:14 -08:00
Brian Cain
0bc0bdd616
Merge pull request #10615 from briancain/introduce-typed-triggers
Introduce :type option for Vagrant triggers
2019-02-12 09:16:01 -08:00
Chris Roberts
2e58e002d6 Fix format finalization of plugins in Vagrantfile 2019-02-11 15:48:43 -08:00
Chris Roberts
61cf179b42 Add base address attribute to vm config 2019-02-01 14:47:11 -08:00