2604 Commits

Author SHA1 Message Date
Jeff Bonhag
38e986300b
Fix up tests to use new interface 2020-07-09 15:07:47 -04:00
Jeff Bonhag
61f59de69b
Extract StorageController object 2020-07-09 15:07:47 -04:00
Jeff Bonhag
8739c04aa9
Mock out storage controllers 2020-07-09 15:07:47 -04:00
Jeff Bonhag
8407d79100
Refactor disk configuration to use dynamic names
This commit adds a new VirtualBox provider helper method to return a
list of storage controllers so Vagrant can find a storage controller
with the desired characteristics (type IDE or SATA).

This still needs to get wired up to the disk cleanup method.
2020-07-09 15:07:46 -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
8e406184cb Add windows cap for building iso 2020-07-08 11:51:09 -05:00
sophia
b1d1c20ff7 Refactor building iso 2020-07-08 11:40:00 -05:00
sophia
4a77060805 Add linux cap 2020-07-08 11:15:26 -05: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
sophia
cbb66ed67f Update FreeBSD guest change hostname cap 2020-07-06 14:27:57 -05:00
Jeff Bonhag
2d4ecfbd23
Set rsync_command for Haiku guests
At the time of writing, the Haiku rsync lacks old-style --compress due
to its external zlib. Pass `-zz` to the guest rsync.

This works with or without the `--compress` flag in the host's
`rsync__args`.
2020-07-06 14:26:18 -04:00
Jeff Bonhag
a50432cf16
Install rsync on Haiku 2020-07-06 14:26:08 -04:00
sophia
1661d1f1cf Print help message if user provides and ambiguous option 2020-07-06 10:52:05 -05:00
Mingxiang Xue
035ae6d460 Fix sometimes-failed test cases that may depend on running order
Signed-off-by: Mingxiang Xue <mingxiangxue@gmail.com>
2020-07-03 20:40:02 +08:00
sophia
afae8c5640 Make tests check for output directory creation 2020-07-02 09:53:40 -05:00
sophia
ee90e11832 Test detach option 2020-06-30 17:24:25 -05:00
sophia
6bdec0fd82 Make alpine guest respect 'hostname' network config option 2020-06-30 16:44:23 -05: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
13c91d68a6
Only grab provider_config if provider key exists and config isn't empty 2020-06-30 14:23:34 -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
66fe2e2854
Ensure size param is set for a disk 2020-06-30 14:23:34 -07:00
Brian Cain
f8dfcadb70
Only convert BlockSizeBytes option for Hyper-V disk provider_config 2020-06-30 14:23:34 -07:00
Brian Cain
56645b7bc5
Finish up configure_disk_test unit tests 2020-06-30 14:23:34 -07:00
Brian Cain
99d244c4ed
Build out initial tests for configure_disks 2020-06-30 14:23:34 -07:00
Brian Cain
234bff9271
Add cleanup_disks_test unit test file 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
Brian Cain
9020868a93
Add initial files for Hyper-V disk configuration and management 2020-06-30 14:22:41 -07:00
sophia
8bad23d176 Update OpenBSD guest change hostname cap 2020-06-29 17:02:43 -05:00
sophia
7322c74eef Add optional arguments as a hash 2020-06-29 14:10:13 -05:00
Brian Cain
39c3ee7230
Update code style for map/each methods 2020-06-29 11:16:55 -07:00
Brian Cain
3caca048c8
Update setup to decouple disk attachment from user_data setup 2020-06-29 11:00:16 -07:00
Brian Cain
d6fc70dd68
Include volume_id in iso host cap params 2020-06-29 11:00:16 -07:00
Brian Cain
39a12de38f
Ensure meta-data is also included in cloud-init iso 2020-06-29 11:00:16 -07:00
Brian Cain
6797b96cae
Save file as user-data 2020-06-29 11:00:16 -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
sophia
db6d1b4aa6 Make darwin guest respect 'hostname' network config option 2020-06-29 12:03:12 -05: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 Castellarin
955f1f1b25
Merge pull request #11656 from soapy1/recover-from-missing-global-data
Add local machine to global index of machines if it does not exist
2020-06-17 15:18:48 -05:00
Jeff Bonhag
f9f2fc0dd5
Merge pull request #11654 from jbonhag/fix/loopback-forward
Fix #11640: Check port of loopback address
2020-06-16 14:54:16 -04:00
Sophia Castellarin
71185e3756
Merge pull request #11679 from soapy1/invalid-mask
Validate netmask value from VirtualBox
2020-06-16 09:36:19 -05:00
sophia
decd489a6d Overwrite outputfile if exists and update available 2020-06-16 09:32:40 -05:00
sophia
1ff6582fff Refactor out shared utility 2020-06-16 09:32:37 -05:00
sophia
e3e573c133 Rescue if an invalid netmask is provided 2020-06-15 17:06:07 -05: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
d9bbdab428
Merge pull request #11567 from soapy1/suse-hosts-mod
Set hostname according to hostname flag and ip for suse
2020-06-15 14:29:43 -05:00