1313 Commits

Author SHA1 Message Date
Sophia Castellarin
990d94ed9d
Merge pull request #12152 from dpausp/fix-nixos-networking
Fix network config for recent NixOS releases
2021-03-08 15:42:10 -06:00
Tobias dpausp
2d1a82bcf0 Fix network config for recent NixOS releases
The old config style doesn't build anymore on the current
release NixOS 20.09. It stopped working some releases ago.
2021-01-25 00:19:34 +00:00
Alvaro Miranda Aguilera
def5ccc42e
Update Vagrantfile.min.erb 2021-01-23 12:05:41 +01: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
bedd141381
Merge pull request #11721 from jbonhag/f/ssh-nil-exit-status
Raise an error on nil exit status
2020-08-07 10:55:58 -05:00
cam
67fdc3855f HyperV - Adding ability to disable Enhanced session transport type 2020-08-06 16:04:21 -07:00
Cameron Jack
41948a1ca9 Moving hyper-v enhanced session message to I18n 2020-08-06 16:04:21 -07:00
Sophia Castellarin
c17ba03904
Merge pull request #11773 from soapy1/cloud-init-wait-action
Add cloud init wait action
2020-08-06 16:28:45 -05:00
sophia
a1d429a4e8 Raise more descriptive error if cloud init fails 2020-08-06 15:47:36 -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
b41db6bebe Output cloud init messages to user
Co-authored-by: Jeff Bonhag <jbonhag@hashicorp.com>
2020-07-31 12:10:43 -05:00
Brian Cain
50766b2f14
Merge pull request #11767 from briancain/fix/ensure-isolated-disk-checks
Ensure VirtualBox Disk capability works only off of guest attached disks
2020-07-29 12:57:55 -07:00
sophia
0a5a940e58 Raise an error if cloud-init is not found on guest 2020-07-29 12:50:50 -05:00
Brian Cain
e2c844db74
Properly determine disk recovery
Because Vagrant no longer determines `all_disks` through `vboxmanage
list hdds`, it can't rely on unattached disks existing in `all_disks`.
This commit fixes that by including the results from `list hdds` to
determine if Vagrant needs to reattach a disk created by Vagrant that
failed to be attached previously.
2020-07-27 13:31:28 -07:00
Sophia Castellarin
cb1ade9332
Merge pull request #11523 from soapy1/install-autocomplete-cmd
Install zsh autocomplete
2020-07-23 13:59:36 -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
Brian Cain
0198c17c56
Merge pull request #11400 from rmunn/feature/arch-network-with-systemd-networkd
Use systemd-networkd on Archlinux guests
2020-07-16 14:34:54 -07: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
1d46cd3882
Update templates/locales/en.yml
Co-authored-by: Sophia Castellarin <sophia@hashicorp.com>
2020-07-09 15:11:35 -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
ff9f9c40e8
Differentiate between controller "not found" errors
This commit adds a new error message to be raised if a VM has no
supported storage controllers. This lets us differentiate between two
different "controller not found" scenarios:

1. If we are looking for a controller that we're expecting to find (i.e.
one that was recorded in the disk metadata file)
2. If we are poking around for the *best* controller to use in a
configuration task
2020-07-09 15:10:50 -04:00
Jeff Bonhag
724687a601
Fix stale controller state
This was causing multiple dvds to be attached to the same port/device.
2020-07-09 15:09:10 -04:00
Jeff Bonhag
e01b51fa43
Disk management with a single controller
.configure_disks is responsible for determining the disk controller(s)
to use, given the machine configuration and the current disk config.
When a machine has a single controller, use it for all attachments.

When a machine has multiple controllers, attach disks to the SATA
controller and DVDs to the IDE controller.

This commit also returns additional attachment information
(controller/port/device) with the disk metadata.
2020-07-09 15:07:49 -04:00
Jeff Bonhag
c9bdcb6839
Error on unsupported storage controller type 2020-07-09 15:07:49 -04:00
Jeff Bonhag
53f7412821
Make VirtualBoxDisksDefinedExceedLimit error generic
Create a #limit method in the StorageController class so we can
customize the error message when a storage controller is full.
2020-07-09 15:07:49 -04:00
Jeff Bonhag
1e6eb0d636
Raise an error if primary disk can't be found 2020-07-09 15:07:49 -04:00
Jeff Bonhag
b9705214bd
Replace backticks with single quotes 2020-07-09 15:07:48 -04:00
Jeff Bonhag
958023dbb9
Create #get_controller method in driver
This makes it easier to check if the required controller can be found,
and automatically raise an error if it is not.

Add a #storage_bus method to the StorageController class as a shorthand
way to check the general storage controller type.
2020-07-09 15:07:48 -04:00
Jeff Bonhag
3a515cc7d6
Error if the required storage controller not found
This commit adds a new error type that can be raised whenever a storage
controller of the required type is not found. This indicates that a user
needs to either add the storage controller manually or change their disk
configuration.

It also removes the last hardcoded instance of "SATA Controller" as a
default argument.
2020-07-09 15:07:48 -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
Sophia Castellarin
02ef62dcff
Merge pull request #11694 from soapy1/host-cap-build-iso
Build iso for Darwin host
2020-07-07 10:29:52 -05: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
Brian Cain
4130cfe497
Properly check for disk paths when cleaning up disks in hyper-v 2020-06-30 14:23:34 -07:00
Brian Cain
42718437ab
Initial commit of cloud_init setup action
This commit introduces a new builtin action for preparing and
configuring guests cloud_init configs as an iso to be attached later by
the disk actions
2020-06-29 11:00:16 -07:00
Jeff Bonhag
9af48e5764
Raise an error on nil exit status
This commit changes the SSH communicator to raise an error if Vagrant
doesn't receive an exit status from an SSH command, for example if the
command is terminated by the OOM-killer.
2020-06-26 13:25:59 -04:00
sophia
e1d104a8e3 Build iso for Darwin host 2020-06-15 09:55:15 -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 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
Brian Cain
2f2ae4e4b6
Delete extra space in error string 2020-06-05 10:55:45 -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
sophia
64f5a9e57f Validate communicator type 2020-05-29 15:33:43 -04:00
sophia
9b6c562016 Set run config for provisioner 2020-05-29 15:33:43 -04:00
sophia
fe7968315b Add option to allow/disable fstab modification
Defaults to allow modification of fstab
2020-05-29 15:29:21 -04:00
sophia
b511d23ae1 Refresh fstab when folders synced 2020-05-29 15:26:48 -04:00
sophia
1058a38f46 Clean up output to user 2020-05-29 15:10:13 -04:00