Commit Graph

819 Commits

Author SHA1 Message Date
Chris Roberts 6f578590a9 Skip forwarded port if disabled in docker provider 2017-03-09 10:28:41 -08: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
Patrick Lang 8cf2240383 Finish hooking up hv.enable_virtualization_extensions 2017-03-02 14:06:39 -08:00
Patrick Lang 6900fc3904 Starting support for Hyper-V nested virtualization 2017-03-02 14:06:21 -08:00
Paul Stengel d98c5b8c00 Do better at finding ssh_info for Docker 2017-01-05 17:41:39 -05:00
Bjorn Brala f808f74009 Harden VMCX support. Vagrant now checks if your Windows version has support for vmcx and then uses the VMCX file. 2016-12-14 15:14:56 +01:00
Chris Roberts 23c41f4461 Merge pull request #7867 from bbrala/hyperv-package
Package Hyper-V boxes
2016-12-07 13:37:47 -08:00
Bjorn Brala 10181f7c8a When you set the memory of a HyperV machine to something lower than the original range it fails. 2016-11-23 08:39:49 +01:00
Chris Roberts 1b04d3da26 Merge pull request #7854 from bbrala/import-vmcx-script
Add support for vmcx (Hyper-V binary config format) to the Hyper-V import script
2016-11-14 13:50:07 -08:00
Bjorn Brala 37a525fbbc Little bit of cleanup. 2016-10-20 22:43:00 +02:00
Bjorn Brala e6093dd709 The virtual machine doesnt need 'Virtual Machines' in its path, this is created when importing. 2016-10-19 21:03:48 +02:00
Bjorn Brala c075c026be Keyboard language setting made my comment bad 2016-10-19 20:56:52 +02:00
Bjorn Brala 055bed5918 removed an extra echo and added proper error message when there is incompatibilities. Appearantly importing into a compressed folder wont work and will result in an error. 2016-10-19 20:55:56 +02:00
Brian Retford 418064519d Move dynamic memory settings into conditional block 2016-10-14 18:53:44 -07:00
Jake Ballard 803fff7f03 Fix issue with missing slash in paths
It was failing to create files below the machines\default\hyperv folder, rather it was creating folders named 'hypervSnapshots', 'hypervVirtual Hard Disks', and 'hypervVirtual Machines'. This was causing the files to not be removed when destroying the vm, and an error when subsequently bringing it up again.
2016-10-11 15:31:28 -05:00
Bjorn Brala 42efd5c198 Make the Virtual Hard Disks directory if importing from XML to keep it consistant across config types 2016-10-09 21:10:56 +02:00
Bjorn Brala 8744caebcf Small typo in options 2016-10-09 20:39:17 +02:00
Bjorn Brala 7b03bf335b Whitespace 2016-10-08 16:44:24 +02:00
Bjorn Brala debe50957b Refactor the import script to fully use Compare-VM for creating the new VM.
Implemented the differencing disk for vmcx.
This means the disk is now copied by Hyper-V (Powershell) instead of Ruby for new machines.
This does mean EFI Firmware now does work for machines since it is quite a feep copy. Compare-VM will report incompatibilities should they be found.
2016-10-08 16:38:42 +02:00
Bjorn Brala a77da314e5 Only check for .vmcx if there is no XML found to not risk breaking older vagrant boxes that added an XML file manually 2016-10-07 20:38:05 +02:00
Björn Brala 6ed612e93b Move package_setup_files to general lib to minimize code duplication 2016-10-07 17:31:15 +02:00
Björn Brala a4d41d0a0e Move code for set-folders for packing VirtualBox to general 2016-10-06 15:07:13 +02:00
Bjorn Brala 5877e8fe22 Sart refactor duplicate classes 2016-10-06 08:55:59 +02:00
Bjorn Brala 8619267cd9 Fix getting mac address from the driver. 2016-10-06 08:29:05 +02:00
Bjorn Brala 5d0de9486e Remove some logging from the package action. 2016-10-06 08:28:52 +02:00
Theron Boerner 391c5be08e Remove --interactive flag from Docker command
See: GH-7597. Due to the childprocess gem setting STDIN to a pipe,
Docker will fail as it requires STDIN to be a TTY if run with
--interactive.
2016-10-05 14:38:20 -05:00
Bjorn Brala 0970a5a67b Generate metadata.json in root of package. 2016-10-05 14:42:46 +02:00
Bjorn Brala be2e9e79aa FIrst draft of packaging of Hyper-V boxes. Need to refactor the package_* files since right now they are copies of the virtualbox versions, might just put them in general. 2016-10-05 13:48:48 +02:00
Bjorn Brala 133e2a7b0f Broke Path argument in mini refactor. 2016-10-04 20:06:10 +02:00
Bjorn Brala 2fc93277fd change argument to vm_config_file so it isn't the same as variable in powershell script. 2016-10-02 18:45:51 +02:00
Bjorn Brala 1ec1cf8177 Update Hyper-V import command and the driver to check for configuration type and call the correct import script. 2016-10-02 16:10:58 +02:00
Bjorn Brala b041c1955c Add support for vmcx files, new binary format for Hyper-V configurations. 2016-10-02 16:10:16 +02:00
tfanning d350fd0d28 Resolve whitespace 2016-07-26 13:56:20 +01:00
tfanning 344fc0ea7b Implement auto_start_action and auto_stop_action 2016-07-26 13:41:01 +01:00
Indrek Ardel b57b0e0d48 Add VirtualBox 5.1 driver 2016-07-13 15:34:25 +03:00
Rory Plaire d3859a33aa Fixing version check and catch statement in get_vm_status
Use the version of Hyper-V instead of Powershell to determine which
exception is thrown by Get-VM. Also fixing an invalid catch statement,
since Powershell can not use variables to match thrown exceptions in
catch.
2016-06-18 17:13:24 -07: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
Seth Vargo 63bbbc0335 Merge pull request #7372 from nicolasvan/virtualbox-race-condition-on-vmexists
Make virtualbox vm_exists? more resilient to VirtualBox transient failures
2016-06-06 19:19:22 -04:00
David O'Rourke 60fd777806 prepare_nfs_settings: Use scoped hash override when reading static IPs. 2016-06-03 15:19:23 +01:00
Seth Vargo e270e7df27
provider/docker: Add -u flag to exec 2016-05-31 20:05:27 -04:00
Seth Vargo cfac24779c
provider/docker: Separate -i and -t flags for exec 2016-05-31 20:05:27 -04:00
Seth Vargo bf96b3348b
provider/docker: Add docker-exec command
This adds a new core command, `docker-exec`, which allows the user to
exec into an already-running container.

- Fixes #6566
- Fixes #5193
- Fixes #4904
- Fixes #4057
- Fixes #4179
- Fixes #4903
2016-05-31 20:05:26 -04: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 38f23fe001
providers/docker: Allow TCP and UDP ports on same number
This commit changes the way ports are aggregated in the Docker provider.
Previously ports were aggregated by their "number", but that is not a
truly unique representation. Instead, the protocol is now taken into
account when generating the port map.

Fixes GH-5527
2016-05-30 17:23:44 -04:00
Seth Vargo e2fadbcf08
Add a log message when the VM master is missing 2016-05-29 01:19:56 -04:00
Seth Vargo 1e7c8e8d6c
Use LF instead of CRLF 2016-05-29 01:18:24 -04:00
Seth Vargo d3d88f5d91 Merge pull request #7126 from jjulien/iss_6742
Fixed linked clone failure when master VM is missing
2016-05-29 01:14:04 -04:00
Seth Vargo b11f8cbd1b Merge pull request #7293 from ericpulvino/master
Set max_network_adapters to 36 for Virtualbox
2016-05-29 00:55:44 -04:00
Seth Vargo 3d2390fc94
Give a unique, prefixed name to all tempfiles
This commit basically grepped the code base for all uses of Dir.mktmpdir
and Tempfile.new/open and ensures the value is unique within the
code base and also prefixed with `vagrant-`.

Previously, most invocations of these commands simply used "vagrant",
thus making them indistinguishable when trying to identify leaks.
2016-05-28 23:22:34 -04:00
Ray Ruvinskiy e42f346b1d
Make `start` action run provisioners if VM is running
Previously, there was no one gesture that would start a VM if it was not
running and run the appropriate provisioners regardless of its original
state. `vagrant up` did nothing if the VM was running, while
`vagrant provision` did nothing if the VM was not running.

Change the semantics of `vagrant up`, via the start actions of the providers,
to go through the provisioning logic even if the VM is already running.
The semantics of `run: "once"` vs `run: "always"` are respected.

Tested with the VirtualBox provider but not the others.

Resolves #4421
2016-05-27 19:00:33 -04:00
Seth Vargo 68329817ad Merge pull request #7290 from phyber/fix/master/prepare_nfs_settings_machine_ip_fix
prepare_nfs_settings: Try harder to get all machine IPs.
2016-05-27 18:38:03 -04:00
Seth Vargo 8c11b537ba
Allow Mac/Windows users to use Docker native 2016-05-27 17:36:07 -04:00
Seth Vargo db1f98ffd6 Merge pull request #7298 from till/t/docker-for-mac-beta
Change: disable the linux switch (Docker for Mac/Windows, etc.)
2016-05-27 17:25:13 -04:00
Seth Vargo efdb148f61
Move pre-flight package validation to middleware
This commit separates the scratch and output directory creation from the
main package middleware into its own PackageSetupFolders middleware.
Additionally, the validation that ensures an output file does not exist
is moved into a validation function that can be shared across multiple
methods.

This refactor permits a pre-flight check to ensure box packaging would
be successful before actually stopping the VM.

Fixes GH-7351
2016-05-27 17:07:04 -04:00
Seth Vargo 08550b6888 Merge pull request #7108 from jtopper/fix_hyperv_status_exception
HyperV: Reinstate compatibility with PowerShell 4
2016-05-20 10:46:01 -04:00
Jon Topper 0a7c20a93a Determine status behaviour based on PS version 2016-05-13 17:50:24 +01:00
Jon Topper df4caf0757 Add snapshots to Hyper-V driver 2016-05-13 16:58:08 +01:00
David O'Rourke 985f1d4dda prepare_nfs_settings: Fix add_ips_to_env!, spec test passes again. 2016-05-10 11:16:21 +01:00
till 647bd6114c Change: disable the linux switch (Docker for Mac/Windows, etc.) 2016-05-08 21:35:12 +02: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
David O'Rourke ed708645b2 prepare_nfs_settings: Try harder to get all machine IPs.
Vagrant was not behaving correctly in configurations where there was
a static IP on a VirtualBox `intnet` interface and a DHCP `:hostonly`
interface configured.

Since `machine_ip` attempted to get static addresses `||` dynamic
addresses, it would simply use the static machine address and
continue.

This commit corrects this behaviour by collecting all static and
dynamic addresses into the `machine_ip` array instead of just one or
the other.

The result of this is a correctly generated `/etc/exports` on the
host machine, allowing NFS mounts to work correctly in this type of
environment.
2016-05-05 14:41:03 +01:00
Seth Vargo 6c01aaf6ab Merge pull request #7090 from mac2000/master
hyperv differencing disk
2016-04-17 23:14:29 +05:30
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
Seth Vargo 5b336949b5 Merge pull request #7050 from md55/snapshots-in-virtualbox41
Adds snapshot commands in VirtualBox 4.1
2016-03-17 10:48:03 -04:00
John Julien e0ecda961c Fixed linked clone failure when master VM is missing
If the master VM is removed, but the master_id file exists, Vagrant
would still attempt to clone using the master_id rather then
importing re-importing first.

Fixes #6742
2016-03-09 19:33:47 -06:00
Matt Wrock 508492faae fixes #7098 only specifying Hyper-V generation if the parameter is supported 2016-03-04 23:42:17 -08:00
Marchenko Alexandr 51d7c98d49 hyperv differencing disk 2016-03-01 17:23:38 +02: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
Kevin Blair 026243c88b Typo
Changed message to match HyperV terminology
2016-02-16 14:58:42 +00:00
Kevin Blair 343a43cae6 Preserve Disk Image Name
detect and preserve the original name of the disk image rather than forcing it to be disk
2016-02-16 14:57:53 +00: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 06a1461081 Merge pull request #6662 from lukebakken/fixes/lrb/gh-4503-hyper-v-admin-privs
Fix for 4503
2015-12-14 15:56:55 -08:00
Luke Bakken 57187c9f88 Add method to detect if a Windows user is a member of the "Hyper-V Administrators" group.
Modify Hyper-V provider to require a user to either be an Administrator or a member of "Hyper-V Administrators"
2015-12-10 07:04:39 -08:00
Timur Alperovich a56e118b16 Use <prefix>::1 as the IPv6 adapter IP.
Set the IPv6 adapter IP to be <prefix>::1. Otherwise, guest to host
communication over IPv6 is not routed correctly. This means that
consumers should not specify <prefix>::1 IP addresses to VirtualBox,
which should be a reasonable restriction.

Fixes #6658
2015-12-09 17:22:02 -08:00
Seth Vargo aca1e041f6 Rename network to interface 2015-12-08 11:05:39 -05:00
Seth Vargo 9ba8cfcd50 Separate logic into other functions for readability 2015-12-08 10:52:54 -05:00
Timur Alperovich bcf61d001b Only consider the VM interfaces in the IPv6 fixup.
Vagrant should only consider the host-only interfaces used by the
virtual machine in the IPv6 fixup code. There may be other interfaces
present on the system with IPv6 addresses that for various reasons
would fail the routing check (for example, an interface with no
machines attached).

The patch changes the behavior to not scan all of the host-only
interfaces and adds a unit test for the behavior (that the correct IP
is validated).

Lastly, there is a small fix here that may not be an issue for most
people where the IPv6 prefix was asummed to be a multiple of 16 for
the purposes of constructing the UDP probe datagram. This assumption
has been removed.

Fixes #6586
2015-12-08 10:44:07 -05:00
Seth Vargo f20c08f57f Return nil if the VM is not running when looking at forwarded ports 2015-11-24 16:33:09 -05:00
Seth Vargo 844cca9013 Skip nil IP addresses in ipv6 fix
Fixes GH-6558
2015-11-23 17:20:20 -05:00
Seth Vargo 7b89ecc230 Add public_address cap for VirtualBox
Fixes GH-5978
2015-11-23 16:23:22 -05:00
Mitchell Hashimoto 24799575c3 providers/hyperv: fix error 2015-11-23 12:06:11 -08:00
Mitchell Hashimoto b23b48a614 providers/hyper-v: support more than one NIC [GH-4346] 2015-11-23 12:05:37 -08:00
Mitchell Hashimoto 55e872eda4 Merge pull request #6118 from mjaverto/patch-1
Fix Win 10 Enterprise Vagrant Error
2015-11-23 11:45:23 -08:00
Mitchell Hashimoto dbf419abad providers/virtualbox: ignore unknown status interfaces [GH-6061] 2015-11-23 10:15:32 -08:00
Mitchell Hashimoto 3c2fab9d0d providers/virtualbox: more robust lookup for VBoxManage on Win 2015-11-20 15:56:14 -08:00
Mitchell Hashimoto 270c0726df Merge pull request #6552 from mitchellh/f-cache-vbox
providers/virtualbox: cache VirtualBox version [GH-6468]
2015-11-19 11:20:09 -08:00
Mitchell Hashimoto a75b14b769 providers/virtualbox: wrap version set in mutex 2015-11-19 11:19:56 -08:00
Seth Vargo 825bd6d5ef Run provisioner cleanup tasks before destroying the VM 2015-11-19 11:14:31 -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
Mitchell Hashimoto 6f3ed13f75 providers/virtualbox: run provisioners on suspend resume 2015-11-18 17:16:23 -08:00
Mitchell Hashimoto 925d7c5bf6 Revert "Make DHCP IP configurable"
This reverts commit 004fe0e7bb.
2015-11-18 17:11:58 -08:00
Seth Vargo 96a815e84e Merge pull request #6538 from mitchellh/sethvargo/pr-6325
Make DHCP IP configurable
2015-11-18 16:41:30 -08:00
Seth Vargo e9f4bca380 Revert "#5186: Warning: Authentication failure. Retrying... after packaging box" 2015-11-18 16:35:35 -08:00
Seth Vargo 48df85008c Rebase and cleanup conditional 2015-11-18 16:31:44 -08:00
Tristan Rivoallan 2c6ef938c7 Fix failing network test 2015-11-18 16:29:46 -08:00
Tristan Rivoallan 004fe0e7bb Make DHCP IP configurable
This makes it possible to have DHCP attribute IPs to guests under
various subnets
2015-11-18 16:29:46 -08:00
Seth Vargo 42d0c3637c Merge pull request #6406 from markus-perl/5186
#5186: Warning: Authentication failure. Retrying... after packaging box
2015-11-18 16:23:44 -08:00
Mitchell Hashimoto d425193e42 Merge pull request #6493 from Ingramz/master
Re-enable UNC paths for shared folders on Windows hosts
2015-11-18 15:20:21 -08:00
Mitchell Hashimoto d89bd56d27 Merge pull request #6373 from caleblloyd/patch-1
Hyper-V: select boot device by VM generation
2015-11-18 14:16:54 -08:00
Mitchell Hashimoto baea923e9c commands/up: automatically install providers 2015-11-05 13:58:15 -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
Markus Perl 61466c8e65 #5186: Warning: Authentication failure. Retrying... after packaging box 2015-10-17 23:00:39 +02:00
Mitchell Hashimoto efa01abb12 providers/virtualbox: if no box, don't import the master 2015-10-16 10:30:04 -07:00
Seth Vargo c88d52082a Merge pull request #6296 from tomfanning/master
Hyper-V set mac address
2015-10-14 13:02:53 -04:00
Mitchell Hashimoto 36cfc77167 providers/virtualbox: make prepare clone a core thing 2015-10-08 16:02:37 -04:00
Mitchell Hashimoto 5ea24e39d0 providers/virtualbox: unify import/clone 2015-10-08 13:07:05 -04:00
Mitchell Hashimoto 4908cd9cd9 providers/virtualbox: copy SSH key 2015-10-08 12:58:06 -04:00
Mitchell Hashimoto e9922d1754 providers/virtualbox: discard state if cloning 2015-10-08 12:50:02 -04:00
Mitchell Hashimoto dbcc936a71 kernel/v2: box is optional if clone is set 2015-10-08 12:41:16 -04:00
Mitchell Hashimoto f0ddac8c9a providers/virtualbox: clone 2015-10-08 12:33:55 -04:00
Mitchell Hashimoto c5c3ba616b providers/virtualbox: some progress 2015-10-08 12:09:46 -04:00
Mitchell Hashimoto 9f05d22eb0 providers/virtualbox: cloning can do a non-linked clone 2015-10-08 12:03:58 -04:00
Mitchell Hashimoto 20310dce0c noop 2015-10-08 11:59:30 -04:00
Mitchell Hashimoto 44d484e2e0 providers/virtualbox: ability to customize linked clone snapshot 2015-10-08 11:58:47 -04:00
Mitchell Hashimoto 6e187aaefb providers/virtualbox: v4.2 and 4.3 support 2015-10-08 08:57:21 -04:00
Mitchell Hashimoto 7480b65e9d providers/virtualbox: use caps for snapshot list 2015-10-08 08:46:36 -04:00
Mitchell Hashimoto ed4df21c85 commands/snapshot: push and pop 2015-10-07 22:52:27 -04:00
Mitchell Hashimoto c36b682e40 providers/virtualbox: fix error if no snapshots 2015-10-07 22:22:55 -04:00
caleblloyd 00894b5a27 hyper-v boot device by generation fixes #6372 2015-10-07 20:25:09 -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 2c936b2e37 providers/virtualbox: tidying up the linked clone feature 2015-10-06 14:11:41 -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
tomfanning 41beaac074 Hyper-V set mac address 2015-09-22 11:35:55 +01:00
Manuel Pöter 2a2f0a4751 Use hash of machine name for lock file to avoid problems with invalid characters for file names. 2015-08-12 14:25:54 +02:00
Mike Averto 587c88e65a Fix Win 10 Enterprise Vagrant Error
This fixes error for Win 10 Enterprise:

An error occurred while executing a PowerShell script. This error
is shown below. Please read the error message and see if this is
a configuration error with your system. If it is not, then please
report a bug.

Script: get_vm_status.ps1
Error:

C:\HashiCorp\Vagrant\embedded\gems\gems\vagrant-1.7.4\plugins\providers\hyperv\scripts\get_vm_status.ps1 : Unable to
find type [Microsoft.HyperV.PowerShell.VirtualizationOperationFailedException].
At line:1 char:1
+ &('C:\HashiCorp\Vagrant\embedded\gems\gems\vagrant-1.7.4\plugins\prov ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (Microsoft.Hyper...FailedException:TypeName) [get_vm_status.ps1], Ru
   ntimeException
    + FullyQualifiedErrorId : TypeNotFound,get_vm_status.ps1
2015-08-09 12:44:49 -04: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 bac5d039db providers/docker: pull setting, default false [GH-5932] 2015-07-15 11:08:01 -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
Mitchell Hashimoto f1618f5ec8 providers/docker: don't remove image on reload for build cache 2015-07-09 14:23:26 -06:00
Adrian Guenter 9bdefb5c59 Don't destroy built Docker image on reload 2015-07-09 16:15:56 -04:00
Mitchell Hashimoto 536ea0729b providers/virtualbox: name for private network chooses right interface
[GH-5389]
2015-07-08 18:35:44 -06:00
Mitchell Hashimoto 9dd87b289e providers/docker: validate config after HandleBox [GH-5667] 2015-07-08 17:45:32 -06:00
Mitchell Hashimoto be21604d45 providers/docker: style on custom Dockerfile 2015-07-08 16:07:57 -06:00
Mitchell Hashimoto 8d725c1f27 Merge pull request #5482 from duro/support-named-dockerfile
Support for Docker 1.5.0 named Dockerfile
2015-07-08 16:06:13 -06:00
Mitchell Hashimoto 0b6938d8ab core: don't prepare folders in disable ode 2015-07-08 15:43:42 -06:00
Mitchell Hashimoto 1c203405d2 providers/docker: fix crash if host VM file can't be foundJ:wq
gs
2015-07-08 12:31:24 -06:00
Mitchell Hashimoto 606a8fdde2 providers/docker: validate create args is list [GH-4850] 2015-07-08 10:25:32 -06:00
Mitchell Hashimoto 855aa66ad9 providers/docker: better error on suspend 2015-07-08 10:18:43 -06:00
Mitchell Hashimoto dbf0af2e3f providers/docker: don't pull if image is built 2015-07-08 10:10:43 -06:00
Mitchell Hashimoto c2cae80de5 providers/dock: pull image prior to starting 2015-07-08 10:09:15 -06:00
Mitchell Hashimoto 72b3ccd64f providers/docker: use new b2d box 2015-07-07 16:06:04 -06:00
Mitchell Hashimoto cd18eddb1c providers/virtualbox: fix bug, make message clearer 2015-07-06 18:18:13 -06:00
Mitchell Hashimoto 71940c60ba providers/virtualbox: error if uid mismatch 2015-07-06 18:13:59 -06:00
Mitchell Hashimoto 709f20b54f Merge pull request #5651 from nspaeth/docker-download
Implement docker download method
2015-07-06 15:34:27 -06:00
Mitchell Hashimoto 36fa04fd1e providers/virtualbox: catch subprocess launch error [GH-1483] 2015-07-05 17:01:06 -07:00
Manuel Pöter 9d63ca4dd2 Acquire lock to prevent concurrent creation of master VM for the same box. 2015-06-03 13:31:43 +02:00
Seth Vargo 9dddcdb8de Merge pull request #5691 from bergman/list-of-nics-to-bridge-to 2015-05-30 12:02:17 -07:00
Seth Vargo 08f240668b Minor cleanup 2015-05-30 12:02:10 -07:00
Seth Vargo 388c2f2383 Merge pull request #5539 from vvchik/vlanid
HyperV provider: VlanID configuration possibility
2015-05-30 11:46:43 -07:00
Seth Vargo 39a1a5c7ba Merge pull request #5207 from mwrock/switch_name
select a Hyper-V switch based on a network_name
2015-05-30 11:45:09 -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
Joakim Bergman 2b3411965a virtualbox: handle a list of bridged nics
This change allows you to specify multiple network interfaces to bridge
to, picking the first found.

```ruby
config.vm.network "public_network",
  bridge: ["en4: Thunderbolt Ethernet",
           "en6: Broadcom NetXtreme Gigabit Ethernet Controller",
           "en0: Wi-Fi (AirPort)"]
```
2015-05-07 18:23:11 +02:00
Seth Vargo 3b10a3165a Merge pull request #5495 from jfbibeau/windows_unc_paths
Proposed fix for #4815 - Windows UNC path to allow > 256 characters
2015-05-06 14:06:38 -07:00
Nathan a6f300f3e9 Implement download method
Use the same method as upload, in a different order
2015-04-28 15:35:39 -05: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
Volodymyr Babchynskyy 9a0aab4bd7 Improved behavior for case if vlan_id is not set 2015-03-30 10:17:29 -06:00
Volodymyr Babchynskyy 9e23d16d9c merged vlan_id changes for hyperv by tomassrnka 2015-03-30 08:37:29 -06:00
ssugar fd557592d4 only set EFI secure boot for gen 2 machines in hyperv provider 2015-03-30 20:00:16 +07: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
Adam Duro be81f09a60 Supporting a named Dockerfile for Docker 1.5.0 2015-03-13 17:30:42 -07:00
Mitchell Hashimoto 4f44ae5379 providers/virtualbox: interpolation added to error [GH-5308] 2015-02-24 10:48:59 -08:00
Mitchell Hashimoto 47ea548026 Merge pull request #5210 from tomassrnka/5209-vm-import-secure-boot
providers/hyperv: import respects box's original Secure Boot setting
2015-02-24 10:03:13 -08:00
Mitchell Hashimoto 104f2106ce Merge pull request #5302 from cubetto/fix-docker-no-space-to-build
providers/docker: build docker image from /var/lib/docker
2015-02-24 09:47:08 -08:00
Hugues Lismonde 887f94260e Support Regexp usage for bridge configuration 2015-02-11 11:07:03 +01:00
cubetto 2e659bf12c Update host_machine_build_dir.rb 2015-02-07 20:33:55 -03: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
Tomas Srnka 21e2f33fb0 Fix for: [hyperv]: VM import process does not respect Secure Boot option from image #5209 2015-01-17 21:31:37 +01:00
Matt Wrock 87195f8336 use :bridge instead of network_name to align with site docs 2015-01-17 11:39:32 -08:00
Matt Wrock 0b6e65380a select a switch ased on a network_name 2015-01-17 01:06:56 -08:00
Volodymyr Babchynskyy a9ac168b19 Added possibility to configure memory, cpus count, and vmname in vagrantfile 2015-01-14 16:59:01 +02:00
Dan Carley 7529b66ea2 Disable insert_key for boot2docker host
Vagrant >1.7 is unable to login to the default boot2docker host if it has
been halted and brought back up again.

This is because the insecure SSH keypair is replaced but boot2docker doesn't
persist filesystem changes between reboots. So when next brought up Vagrant
tries to use the new keypair which is no longer valid and subsequently isn't
able to login.

Prevent this from happening by disabling the `ssh.insert_key` option on
versions where it is available.
2015-01-08 11:23:37 +00:00
Seth Vargo d2874064f4 Use .key? instead of .has_key? 2015-01-05 18:29:01 -05:00
Mitchell Hashimoto d5dae4b492 Merge pull request #5042 from legal90/fix-post-comm
providers/virtualbox: Add 'post-comm' to the list of valid events
2015-01-05 12:00:34 -08:00
Mitchell Hashimoto d5c1c28a2b Merge pull request #5094 from wkolean/docker-vbox-symlink-fix
enable symlinks before adding shared folder
2015-01-05 09:49:56 -08:00
Tomas Srnka 2620042c26 Fix catching "Start-VM" exceptions on Hyper-V during starting up VM 2015-01-04 00:05:50 +01:00
William Kolean 084d2c06de enable symlinks before adding shared folder 2015-01-01 16:00:17 -05:00
Mikhail Zholobov e828927cee providers/virtualbox: Add 'post-comm' to the list of valid events 2014-12-21 01:09:55 +03:00
Gilles Cornu 40a22ff99a providers/docker: fix support of agent forwarding 2014-12-07 11:02:50 +01: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
Chris Jones b19abebdf0 Grammar fix to the network interface bridge question 2014-10-31 15:16:02 -04:00
Mitchell Hashimoto 37a4000722 providers/virtualbox: more descriptive error if empty version [GH-4657] 2014-10-24 09:20:08 -07:00
Mitchell Hashimoto b656bf4ae5 providers/docker: build output [GH-3739] 2014-10-23 15:03:09 -07:00