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.
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`.
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.
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.
* 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"`
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.
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.
This commit introduces some basic functionality for typed triggers:
- command
- action
Command triggers are triggers that will run before or after a given
sub-command.
Action triggers are for running triggers before or after internal
actions for Vagrant. This could be before or after a provision step,
before or after synced folders, or networking, etc.