From 8f10683a205381c0664694f9e8b1e8288ac1774a Mon Sep 17 00:00:00 2001 From: Esten Rye Date: Fri, 15 Mar 2019 20:22:51 -0500 Subject: [PATCH 1/2] Update incorrect documentation on vagrant builder. The packer option `vagrantfile_template` is not used. This change corrects the documentation with the correct option name. Closes #7414 --- website/source/docs/builders/vagrant.html.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/source/docs/builders/vagrant.html.md b/website/source/docs/builders/vagrant.html.md index 3668befaa..5efbbb66a 100644 --- a/website/source/docs/builders/vagrant.html.md +++ b/website/source/docs/builders/vagrant.html.md @@ -74,7 +74,7 @@ one, by using `global_id` instead of `source_box`. not recommended since OVA files can be very large and corruption does happen from time to time. -- `vagrantfile_template` (string) - a path to a golang template for a +- `template` (string) - a path to a golang template for a vagrantfile. Our default template can be found [here](https://github.com/hashicorp/packer/blob/a6d1d852bb0643e3593cc5d3dfe5ed80c4409b65/builder/vagrant/step_create_vagrantfile.go#L23-L30). So far the only template variables available to you are {{ .BoxName }} and {{ .SyncedFolder }}, which correspond to the Packer options `box_name` and From 19c72f78673d077bcdc1e8623b95d9e801817227 Mon Sep 17 00:00:00 2001 From: Esten Rye Date: Fri, 15 Mar 2019 20:51:40 -0500 Subject: [PATCH 2/2] Add additional detalis for Hyper-V users --- website/source/docs/builders/vagrant.html.md | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/website/source/docs/builders/vagrant.html.md b/website/source/docs/builders/vagrant.html.md index 5efbbb66a..402f66b10 100644 --- a/website/source/docs/builders/vagrant.html.md +++ b/website/source/docs/builders/vagrant.html.md @@ -78,7 +78,17 @@ one, by using `global_id` instead of `source_box`. vagrantfile. Our default template can be found [here](https://github.com/hashicorp/packer/blob/a6d1d852bb0643e3593cc5d3dfe5ed80c4409b65/builder/vagrant/step_create_vagrantfile.go#L23-L30). So far the only template variables available to you are {{ .BoxName }} and {{ .SyncedFolder }}, which correspond to the Packer options `box_name` and - `synced_folder` + `synced_folder`. + + You must provide a template if your default vagrant provider is Hyper-V. + Below is a Hyper-V compatible template. + + ```ruby + Vagrant.configure("2") do |config| + config.vm.box = "{{ .BoxName }}" + config.vm.network 'public_network', bridge: 'Default Switch' + end + ``` - `skip_add` (bool) - Don't call "vagrant add" to add the box to your local environment; this is necessary if you want to launch a box that is already