Commit Graph

129 Commits

Author SHA1 Message Date
Brian Cain 9b872c9e7e Cleanup virtualbox retryable commands
Reverting the changes done in 7d2f7dab97
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
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
Eric Pulvino 45e52e3bf1 Updated ./plugins/providers/virtualbox/driver/base.rb file, set max_network_adapters to 36 for Virtualbox so all 36 adapters are cleared prior to programming interfaces. This fix is per issue 7286 --> https://github.com/mitchellh/vagrant/issues/7286 2016-05-08 00:11:22 -04: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
Evgeniy N 890820eaf6 Add snapshot commands
Fixed error remains in other versions:
  return [] if e.extra_data[:stdout].include?("does not have")
should be
  return [] if e.extra_data[:stderr].include?("does not have")

Many methods are the same in different version_X, and should be moved to Base class.
2016-02-18 11:47:07 +06:00
Pravinchandar Raajendiran af9d0df635 Fix for #4608
Added support for Port forwarding in an IP aliased environment. The change
makes the following forwarding rule(s) possible.

Ex: eth0 is ip aliased to have a range of IP addresses 10.20.30.0/24.

In the Vagrant file, we can now have an entry like the following and
it will just work! Note the host port 8081 is the same for both .1 and .2.

  Vagrant.configure("2") do |config|
    config.vm.network "forwarded_port", guest: 80, host: 8080
    config.vm.network "forwarded_port", guest: 81, host: 8081, host_ip: 10.20.30.1
    config.vm.network "forwarded_port", guest: 82, host: 8081, host_ip: 10.20.30.2
  end
2016-02-14 22:16:24 +11:00
Mitchell Hashimoto 3c2fab9d0d providers/virtualbox: more robust lookup for VBoxManage on Win 2015-11-20 15:56:14 -08:00
Mitchell Hashimoto a75b14b769 providers/virtualbox: wrap version set in mutex 2015-11-19 11:19:56 -08:00
Mitchell Hashimoto fb511a43d9 providers/virtualbox: store version on instance as well 2015-11-19 11:02:00 -08:00
Mitchell Hashimoto d56c8fda18 providers/virtualbox: cache VirtualBox version [GH-6468] 2015-11-19 11:00:02 -08:00
Indrek Ardel 4a7aa83e58 Use UNC paths for shared folders on Windows host 2015-11-05 18:56:24 +02: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 c36b682e40 providers/virtualbox: fix error if no snapshots 2015-10-07 22:22:55 -04:00
Mitchell Hashimoto 8c0e38b397 providers/virtualbox: snapshot restore 2015-10-07 16:48:29 -04:00
Mitchell Hashimoto c635352b89 providers/virtualbox: list snapshots, progress for delete 2015-10-07 16:41:58 -04:00
Mitchell Hashimoto d0e8ecfc73 providers/virtualbox: snapshot save/delete 2015-10-07 16:16:53 -04:00
Mitchell Hashimoto 0586412f9d providers/virtualbox: fix some crashing bugs 2015-10-06 16:22:48 -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 2299715b41 providers/virtualbox: code review comments 2015-10-01 17:01:27 -04:00
Mitchell Hashimoto 05fbb4ced2 providers/virtualbox: more support 2015-10-01 08:50:47 -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
Manuel Pöter 772f276ee3 Port support for linked clones to VirtualBox 5.0 driver. 2015-07-16 13:27:24 +02: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
Mitchell Hashimoto 36fa04fd1e providers/virtualbox: catch subprocess launch error [GH-1483] 2015-07-05 17:01:06 -07:00
Seth Vargo a59247d4e5 Trailing comma 2015-05-30 11:01:32 -07:00
Seth Vargo c0c7d77ea9 Merge pull request #5647 from Stanzilla/support_vb5
Support Virtualbox 5.0 (beta) by adding a driver, referencing it in the ...
2015-05-30 11:00:37 -07:00
Benjamin Staneck 7a94eba0b4 Port changes from pull request #5495 to the vb_5 module to fix #4815 here, too. 2015-05-09 02:03:33 +02:00
Benjamin Staneck 4d3e0cac62 Support Virtualbox 5.0 (beta) by adding a driver, referencing it in the list of acceptable versions/drivers, and autoloading the file in the virtualbox plugin file. 2015-04-28 17:53:48 +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
Mitchell Hashimoto 4f44ae5379 providers/virtualbox: interpolation added to error [GH-5308] 2015-02-24 10:48:59 -08:00