164 Commits

Author SHA1 Message Date
Brian Cain
b2a89f8711
Remove old comment on vbox driver disk method 2020-02-10 12:58:11 -08:00
Brian Cain
773a3aeb7e
Add optional hash arguments to driver methods 2020-02-10 12:58:11 -08:00
Brian Cain
b9a72ce8ff
Make get_port_and_device disk method a driver method instead 2020-02-10 12:58:11 -08:00
Brian Cain
9a5ce8381b
Add comment field for new disks 2020-02-10 12:58:11 -08:00
Brian Cain
17b75db35b
Move disk driver methods into virtualbox version 5 2020-02-10 12:58:11 -08:00
Brian Cain
1e2570a599
Add methods for controller attaching 2020-02-10 12:58:11 -08:00
Brian Cain
7215764130
Remove medium vars from base driver 2020-02-10 12:58:11 -08:00
Brian Cain
e31b013df8
Ensure vmdk disks that are resized stay in original format 2020-02-10 12:58:11 -08:00
Brian Cain
16c38ed9f4
Fix params for attach_disk driver call 2020-02-10 12:58:11 -08:00
Brian Cain
4d4844fdef
Simplify params for virtualbox driver attach_disk 2020-02-10 12:58:11 -08:00
Brian Cain
6ba621ac92
Add ability to cleanup and close mediums for a guest 2020-02-10 12:58:11 -08:00
Brian Cain
0dfde12e9a
Add clone_disk method to virtualbox driver 2020-02-10 12:58:11 -08:00
Brian Cain
2e884207df
Rename disk_size variable
Use bytes instead of mb to align with flag used
2020-02-10 12:58:11 -08:00
Brian Cain
fcc9c55fa0
Begin to add code for resizing VMDK type disks 2020-02-10 12:58:11 -08:00
Brian Cain
4df346c5c6
Add resize for disks
Also add warnings in case disk resize request is smaller than original
disk size.
2020-02-10 12:58:11 -08:00
Brian Cain
7e686e6f70
Attach harddisk after creation 2020-02-10 12:58:11 -08:00
Brian Cain
2a3f9dad29
Remove uuid from params
No need to pass in machine uuid as it is a class variable already for the driver
2020-02-10 12:58:11 -08:00
Brian Cain
259cb5fcca
Attempt to create and attach disk to guest 2020-02-10 12:58:11 -08:00
Brian Cain
35c8db56ec
Add handling for configuring and creating disks with vbox provider 2020-02-10 12:58:11 -08:00
Brian Cain
cac56c983c
Add extra key for vbox driver with listing hdds 2020-02-10 12:58:11 -08:00
Brian Cain
5be7989f2d
Add basic driver methods for disk operations 2020-02-10 12:58:11 -08:00
Brian Cain
16cccd504a
Add virtualbox driver method for obtaining vm information 2020-02-10 12:58:11 -08:00
Brian Cain
fb4e6985e1
Fixes #11249: Add VirtualBox provider support for version 6.1.x
This commit adds support for VirtualBox version 6.1.x. It simply
inherits from the base 6.0.x provider class.
2019-12-11 13:25:11 -08:00
Chris Roberts
cf99438f1f Update base path on windows to use common file separator
On Windows the File::SEPARATOR ends up being `/` which causes
issues with the new way the path is being extracted from the
vbox information. When on Windows (even with WSL), automatically
convert the path to use common forward slash separator. This
fixes path modifications used for storing guest disks.
2019-01-29 11:09:25 -08:00
Chris Roberts
b8f5752a82 Update VM import for VirtualBox 6 driver
The dry run import with VirtualBox 6 no longer provides full paths
for disks. Extract base path from suggested settings file location
and use that to generate full path name using provided disk base
name.
2018-11-15 11:04:08 -08:00
Chris Roberts
c7721f619b Update VirtualBox driver ssh_port helper
Be more restrictive when matching the port forward used for
SSH. Allow matching simply on the guest port, but also include
extra matching criteria for cases where multiple results may
be returned.
2018-11-13 15:04:12 -08:00
Chris Roberts
9d728682c4 Add vbox provider driver for 6.0 2018-11-06 16:50:17 -08:00
Chris Roberts
de42681742 Inherit from common base since 5.1 driver has no changes 2018-11-06 16:50:17 -08:00
Brian Cain
6d0dfb2690
Fixes #10016: Add automount flag if specified with synced_folder
This commit adds a new option to virtualbox synced_folders called
`automount`, where if set to true, will supply the `--automount` flag to
virtualbox.
2018-10-22 15:45:32 -07:00
Chris Roberts
85dc0ebec9 Allow automatic mac address assignment with virtuabox provider 2018-10-01 11:05:28 -07:00
Stefan Scherer
f14e8bcbf2
Allow other providers in WSL 2018-05-02 22:36:17 +02:00
Brian Cain
f2954a64c6
Fix Hyper-v and VirtualBox check
Prior to this commit, the hyper-v and virtualbox system crash check
existed within the initialize function of the virtualbox provider. That
caused an issue when running with other providers, because the
virtualbox provider still gets initialized even if not used. This commit
changes that by placing the check inside of one of the virtualbox
provider actions that checks if virtualbox is installed and ready to
use. This action is action is used by the main vbox provider actions,
and should not be called when other providers are being used with
Vagrant.
2018-02-23 11:24:30 -08:00
Brian Cain
e8708232a5
(#9258) Exit if Hyper-V is enabled and VirtualBox provider is used
This commit adds a function on windows for the VirtualBox provider to
check if Hyper-V is enabled. If so, exit and display a warning to the
user that going forward will result in a system crash.
2018-02-08 11:20:41 -08:00
Brian Cain
b16ca2e384
Introduce flag for SharedFoldersEnableSymlinksCreate
Prior to this commit, the virtualbox synced folder option
`SharedFoldersEnableSymlinksCreate` was always enabled. This commit
introduces a config option and an environment variable which allows
users to configure the option globally or per synced_folder in their
Vagrantfile.
2018-01-09 14:33:24 -08:00
Jehiah Czebotar
7d73af5637
Virtualbox 5.2 support 2017-09-14 15:07:11 -04:00
Brian Cain
9b872c9e7e Cleanup virtualbox retryable commands
Reverting the changes done in 7d2f7dab977d51a21381577a5345f96c22142711
because they don't work and or update vagrant to invoke running the
vbox cli tool for every single forwarded port instead of forwarding them
all in one command.
2017-09-06 11:14:11 -07:00
Samuel Clark
2e775e8101 8468 - make more virtualbox commands retryable
Issue: https://github.com/mitchellh/vagrant/issues/8468

A lot of vboxmanage commands are flakey and frequently cause
bringing multiple machines up at once to fail, especially when
the host system is under heavy load. Most commands are also safe
to retry and just result in a no-op, so we can simply add
'retryable' to a lot of existing calls. For the others we need to
do a little bit of cleanup or reevaluate the parameters before
trying again.
2017-09-06 11:14:11 -07:00
nico.vanelslande
9aecd5e1a4 Improved resilience of the VirtualBox driver delete_unused_host_only_networks function by
ignoring VMs that may have been deleted between the calls to
'vboxmanage list vms' and 'vboxmanage showvminfo'
2017-09-06 11:13:14 -07:00
nico.vanelslande
56c8b9269a Improved resilience of the VirtualBox driver read_used_ports function by
ignoring VMs that may have been deleted between the calls to
'vboxmanage list vms' and 'vboxmanage showvminfo'
2017-09-06 11:13:14 -07:00
Chris Roberts
c5b3751a83 Properly handle exception raised when property does not exist 2017-06-19 14:04:57 -07:00
Richard Gareau
056f837fed Do not use UNC path for Solaris guest on Windows 2017-06-15 15:15:39 -07:00
Chris Roberts
3c44ce9742 Support vbox provider within WSL rootfs. Make Windows access easier.
Enables proper setup of VMs started from within WSL rootfs paths. Updates
setup for Windows access when working within the WSL to auto-detect settings
instead of relying on user defined environment variables.
2017-05-12 13:11:53 -07:00
Chris Roberts
83b0c87f52 Support running Vagrant within the Windows Subsystem for Linux 2017-05-08 10:21:01 -07:00
Chris Roberts
a0761eb2ea Allow initialization argument to be used in parent 2017-03-19 07:35:46 -07:00
Chris Roberts
edd8a10b29 Merge pull request #8326 from chrisroberts/refactor/vbox-5.1
Refactor the virtualbox 5.1 driver implementation
2017-03-06 08:36:17 -08:00
Chris Roberts
6d3ab39b27 Merge pull request #7035 from pravinchandar/4608
Fix for #4608: Support for port forwarding in an IP aliased environment
2017-03-03 15:57:04 -08:00
Chris Roberts
98c50ee1c8 Refactor the virtualbox 5.1 driver implementation 2017-03-02 14:42:37 -08:00
Indrek Ardel
b57b0e0d48 Add VirtualBox 5.1 driver 2016-07-13 15:34:25 +03:00
Seth Vargo
cb1749b375
8 network adapters, always 2016-06-11 20:00:16 +02:00
Seth Vargo
45e71eca15 Revert "Set max_network_adapters to 36 for Virtualbox" 2016-06-11 01:04:58 +02:00