Commit Graph

57 Commits

Author SHA1 Message Date
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
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
Seth Vargo cb1749b375
8 network adapters, always 2016-06-11 20:00:16 +02:00
nico.vanelslande 163e1997a6 Make virtualbox vm_exists? more resilient to VirtualBox transient failures.
We know that the vm does not exist if we get VBOX_E_OBJECT_NOT_FOUND.
For any other error, this may well be VirtualBox getting confused and it is probably
worth retrying...
2016-05-31 13:23:56 +01:00
Seth Vargo d565c2f07e Check both stderr and stdout
Different vbox versions print this to different streams, so check both
just to be sure
2016-03-17 10:52:10 -04:00
Indrek Ardel ea66e22d2e Use UNC paths for shared folders on Windows host 2015-11-05 18:55:34 +02:00
Mitchell Hashimoto 9f05d22eb0 providers/virtualbox: cloning can do a non-linked clone 2015-10-08 12:03:58 -04:00
Mitchell Hashimoto 6e187aaefb providers/virtualbox: v4.2 and 4.3 support 2015-10-08 08:57:21 -04:00
Mitchell Hashimoto d519d927fa Merge branch 'VB-linked-clone-support' of https://github.com/mpoeter/vagrant into mpoeter-VB-linked-clone-support 2015-10-06 13:50:34 -04:00
Mitchell Hashimoto 061a91d09b providers/virtualbox: workaround IPv6 routing bug in VB
VirtualBox has a bug where the IPv6 route is lost on every other
configuration of a host-only network. This is also triggered when a VM
is booted.

To fix this, we test the route-ability of all IPv6 networks, and
reconfigure if necessary. This is very fast but we still only do this if
we have any IPv6 networks.
2015-09-30 18:19:37 -07:00
Mitchell Hashimoto 0d50f454ea providers/virtualbox: VB5 support 2015-09-30 17:29:23 -07:00
Mitchell Hashimoto ec0b0fb7f9 providers/virtualbox: IPv6 host only networks 2015-09-30 17:23:25 -07:00
Mitchell Hashimoto b118ab10c8 providers/virtualbox: remove windows UNC path [GH-5933] 2015-07-13 08:38:41 -07:00
Manuel Pöter f4d1d068f9 Merge branch 'master' into VB-linked-clone-support 2015-07-13 10:56:17 +02:00
Jean-Francois Bibeau 415837c544 moved function to platform utils, added unit test as per @sethvargo 2015-04-06 16:51:55 -04:00
Jean-Francois Bibeau 7d17574a76 changing windows/virtualbox shared path names to UNC format to allow > 256 characters 2015-03-18 15:29:43 -04:00
Paul Hinze 88ab9f7402 providers/virtualbox: read netmask from dhcpservers
This should fix the cleaning up of the default VirtualBox dhcpserver,
which we've been fighting with for ages over in #3083. We were checking
for a structure _including_ a netmask, but the driver was not populating
netmask.
2015-01-21 10:51:39 -08:00
Seth Vargo d2874064f4 Use .key? instead of .has_key? 2015-01-05 18:29:01 -05:00
William Kolean 084d2c06de enable symlinks before adding shared folder 2015-01-01 16:00:17 -05:00
Paul Hinze 25ff636ee2 providers/virtualbox: cleanup default vbox dhcp server
fixes #3083

Detect the presence of the default DHCP server that comes in a fresh
VirtualBox install and clean it up to prevent it from colliding with
Vagrant-managed network config.

In order to accomplish this, we:

 - add a `remove_dhcp_server` call to the virtualbox driver
 - fix dhcp options parsing to allow `:dhcp_{ip,lower,upper}`
   configuration options to make it through (so a user can override the
   removal behavior with some explicit configuration)
 - add the full `:network_name` to the details returned from
   `:read_dhcp_servers`, so we can have a durable value to pass to
   `:remove_dhcp_server`

Note that we do have to eat one more `VBoxManage list dhcpservers` for
each network interface to support this, but this seemed like a nominal
cost
2014-11-30 22:03:52 -06:00
Paul Hinze 24b6f21d1d providers/virtualbox: extract reading dhcpservers from hostonlyifs
This is just a refactor, no behavior change.

Instead of stitching together dhcpserver info in the structure returned
from `read_host_only_interfaces`, sprout a new driver method called
`read_dhcp_servers` to return that information separately.

This means that driver clients (well there's really only _one_ client in
`ProviderVirtualBox::Action::Network`) have to do a bit more work to get
interface and DHCP server information.

But this gives us (a) a cleaner and more consistent driver interface and
(b) groundwork for a fix for #3083, which will require interacting with
DHCP servers outside of the context of host-only interfaces.
2014-11-30 22:03:52 -06:00
Mitchell Hashimoto a6c0989bc6 Revert "Merge pull request #4616 from crypt1d/master"
This reverts commit aec69c4627, reversing
changes made to 88754d2904.
2014-10-23 09:30:46 -07:00
Mitchell Hashimoto aec69c4627 Merge pull request #4616 from crypt1d/master
Consider the host_ip value when handling port collisions
2014-10-23 09:26:31 -07:00
Mitchell Hashimoto 2a8f74f54a providers/virtualbox: style 2014-10-23 09:12:41 -07:00
Mitchell Hashimoto 7287604450 Merge pull request #4671 from jramnani/fix/master/nfs_exports_file_for_freebsd_guests
Fix #4658. Bad NFS exports file on OS X & BSD hosts.
2014-10-23 09:12:00 -07:00
Mitchell Hashimoto 58f7310444 providers/virtualbox: detect conflict in name [GH-4681] 2014-10-21 15:56:32 -07:00
Jeff Ramnani bd5fd7ab18 Fix #4658. Bad NFS exports file on OS X & BSD hosts.
For FreeBSD guests, Virtualbox can sometimes report the private network
interface IP address as "0.0.0.0".  This will cause an invalid NFS
exports file to be generated for FreeBSD and OS X hosts.

Fixed by not allowing Virtualbox to report a guest IP address of
"0.0.0.0".
2014-10-20 12:35:30 -05:00
crypt1d ca1456ff82 initial changes for forwarding port modifications 2014-10-10 13:01:04 +02:00
mpoeter c20624bfdc Add support for linked clones for VirtualBox. 2014-09-09 19:17:04 +02:00
Mitchell Hashimoto ae1a03903e providers/virtualbox: error if can't read VM name [GH-4047] 2014-08-08 10:49:07 -07:00
Keith Shook 93f84f53e5 Ensure VirtualBox virtual disks are stored in the correct directory round 2 2014-07-02 10:08:44 -04:00
Keith Shook 0912ddaf5f Ensure VirtualBox virtual disks are stored in the correct directory on Windows hosts 2014-07-02 08:55:00 -04:00
Akzhan Abdulin bf2e8deebe VirtualBox driver should replace only last occurence of suggested VM name. 2014-07-02 08:52:31 -04:00
Kalman Hazins bb052366f7 Change symbols inside hashes to 1.9 JSON-like syntax 2014-05-22 12:35:12 -04:00
Mitchell Hashimoto b08c1a62ce Removing some old files 2014-04-29 16:48:12 -07:00
Mitchell Hashimoto c1f14320bd providers/docker: process-level lock on host machine up 2014-04-21 13:55:13 -07:00
Mitchell Hashimoto afb61b1466 providers/virtualbox: synced folder supports the "disable" method 2014-04-21 13:55:12 -07:00
Oscar Renalias 094be9dc50 Fixes mitchellh/vagrant #3361 for VirtualBox 4.3.x, including internal networks 2014-03-31 21:31:51 +03:00
Oscar Renalias 0314453f46 Fixes mitchellh/vagrant #3361 for VirtualBox 4.3.x 2014-03-31 20:36:16 +03:00
Mitchell Hashimoto d4b3f226dd providers/virtualbox: fix missing interpolation [GH-3277] 2014-03-20 17:57:17 -07:00
Mitchell Hashimoto a8fa2d5ffe providers/virtualbox: import progress works on Windows 2014-03-12 20:02:05 -07:00
Marc Schlaich 5694c7dc2f providers/virtualbox: retry list vms [GH-2831] 2014-03-12 16:23:32 +01:00
Mitchell Hashimoto 56e85bc989 Merge pull request #2906 from frosario/cable_connected
providers/virtualbox: connect cable for bridged networking
2014-02-03 03:05:16 -08:00
Freddie Rosario cd0c7dfbd9 Bugfix for github issue 2890.
Changing default behavior of vagrant up to enable "cableconnected" on bridged network devices
2014-01-28 10:54:39 -05:00
Mitchell Hashimoto eae2edf063 providers/virtualbox: retry list hostonlyifs [GH-2831] 2014-01-15 19:55:31 -08:00
Paul Hinze c25172d0f7 providers/virtualbox: support DHCP interfaces for NFS
Previously, we required a host-only interface with a static IP for NFS
to work in VirtualBox, because we needed access to the guest's IP in
order to properly configure mount commands.

After boot, VirtualBox exposes the IP addresses of a guest's network
adapters via the "guestproperty" interface.

This adds support for reading VirtualBox guest properties to the
VirtualBox driver and utilizes that support to prepare NFS settings,
which removes the necessity for a static IP for NFS to work.

In this commit we also start building out scaffolding for unit testing
vbox actions and drivers.

Test plan:
 - Prepare a Vagrantfile with the following:
   * private network with type: :dhcp
   * synced folder with nfs: true
 - Boot a VM from this Vagrantfile using the virtualbox provider
 - Machine should boot successfully with working synced folder
2013-12-03 10:21:28 -05:00
Mitchell Hashimoto 2d957cdaab providers/virtualbox: internal networks [GH-2020] 2013-11-25 11:13:46 -08:00