412 Commits

Author SHA1 Message Date
Paul Hinze
0fef7cc416
Port push plugins
This uses the new Push plugin support added to the plugin SDK in https://github.com/hashicorp/vagrant-plugin-sdk/pull/106 to make the following changes:

 * The plugin manager on the Go side now registers push plugins
 * The the _remote_ plugin manager on the Ruby side now calls over to
   the go side to get push plugins
 * All the wiring is hooked up such that when a push plugin is replaced
   with its remote GRPC-client-wielding equivalent, the messages are
   ferried around.
2022-04-25 12:26:21 -05:00
sophia
a128d98dea
Move to_proto to config classes 2022-04-25 12:24:21 -05:00
sophia
0e40c2eb97
to_proto save point 2022-04-25 12:24:20 -05:00
sophia
abf0dddd12
Clean up parsing examples/test 2022-04-25 12:24:19 -05:00
sophia
0923f1edf2
Collect config for Vagrantfile config element that does not exist in Ruby 2022-04-25 12:24:17 -05:00
Rui Lopes
fcdc63ff89 let the user configure the cloud_init mime part content-disposition filename 2020-10-28 15:57:45 -05: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
23901fddf5 Simplify vm config for determining fstab modification setting 2020-08-21 11:10:01 -05:00
Chris Roberts
cd2d84fda7 Adjust synced folder collection class 2020-08-19 15:00:40 -05:00
sophia
2239ee8582 Create Hash with type attribute 2020-08-19 15:00:40 -05:00
sophia
cde39e26ba Make mount options a synced_folder capability 2020-08-19 15:00:40 -05:00
sophia
afd2a28f60 Add synced_folder_capability 2020-08-19 15:00:40 -05:00
sophia
e7e956ca12 Fix a few deprecation warnings for ruby 2.7 2020-08-10 16:32:54 -05:00
Chris Roberts
5003bb6e15 Updates to address all Ruby deprecations and warnings
This includes updates for resolving all warnings provided by Ruby
for deprecations and/or removed methods. It also enables support
for Ruby 2.7 in the specification constraint as all 2.7 related
warnings are resolved with this changeset.
2020-08-10 13:05:41 -07: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
Jeff Bonhag
abf4a4c9c5
Display machine name in error message
Co-authored-by: Brian Cain <bcain@hashicorp.com>
2020-07-31 15:19:29 -04: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
eecf1dbe57
Add validation error for empty box
This commit adds a unique error message for an empty box value. It
requires modifications to vagrantfile.rb because some Vagrantfile config
is used before validation occurs.
2020-07-13 17:46:28 -04: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
52c1267b2c
Show duplicate values in error messages
This also prevents nil showing up as a duplicate value for disk configs
when `file` is undefined.
2020-07-09 15:10:50 -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
88c2bc2be1
Merge pull request #11541 from briancain/feature/hyperv-disk-mgmt
[Feature] Hyper-V Virtual Hard Disk Management
2020-07-06 15:24:29 -07:00
Sophia Castellarin
71620f6803
Merge pull request #11631 from soapy1/error-nfs-on-win
Error nfs on win
2020-07-02 10:19:06 -05:00
Brian Cain
d35feb62a3
Simplify key check for provider option config 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
c063ca6100
Replace invalid disk name characters with underscore 2020-06-30 14:23:34 -07:00
Brian Cain
96d19264b6
Automatically remove invalid file characters for disk name
This commit copies what Vagrant does to filter out guest names with
invalid characters, and applies the same regex to disk names.
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
754928a206
Ensure provider_config is a hash before calling .empty? 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
192caab02d
Fix provider_config merging for disk config 2020-06-30 14:22:41 -07:00
Brian Cain
cafb6ec239
Remove extra provider_config option 2020-06-30 14:22:41 -07:00
Brian Cain
a3c2e31f01
Set default disk format for vmware_desktop 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
Sophia Castellarin
4704606056
Merge pull request #11570 from soapy1/mount-shared-folders
Automatically mount virtual box shared folder when machine reboots
2020-06-12 14:11:21 -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
sophia
66a3b58c08 Add provider capaiblity :has_communicator 2020-06-09 09:33:11 -05:00
Brian Cain
492a532ef5
Remove freezing symbols in disk/trigger conig 2020-06-08 15:02:44 -07:00