From 0361f9aa7234095883c6d30e69153059c9e19e3b Mon Sep 17 00:00:00 2001 From: Meitar M Date: Thu, 5 Mar 2020 21:22:09 -0500 Subject: [PATCH 1/4] Document ability to specify which host-only network. Although it has been possible to specify a specific VirtualBox host-only network to attach a machine's NIC to, this was never mentioned by the documentation in the VirtualBox provider's networking section. I had to spelunk through the issue tracker to find an example of this. This patch adds a code example along with a short description of the ability in human language prose, and a link to the relevant section in the VirtualBox User Manual about "Host-Only Networking." --- .../source/docs/virtualbox/networking.html.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/website/source/docs/virtualbox/networking.html.md b/website/source/docs/virtualbox/networking.html.md index cef045b1e..59ca17eb4 100644 --- a/website/source/docs/virtualbox/networking.html.md +++ b/website/source/docs/virtualbox/networking.html.md @@ -10,6 +10,22 @@ description: |- # Networking +## VirtualBox Host-Only Networks + +By default, private networks are [host-only networks](https://www.virtualbox.org/manual/ch06.html#network_hostonly), +because those are the easiest to work with. In VirtualBox, since you can +create multiple host-only networks, it is also possible to specify which +host-only network you want to the Vagrant Virtualbox provider to use for +a given interface. To do this, use the `:name` symbol with the name of +the host-only interface to use. + +```ruby +Vagrant.configure("2") do |config| + config.vm.network "private_network", type: "dhcp", + :name => "vboxnet3" +end +``` + ## VirtualBox Internal Network The Vagrant VirtualBox provider supports using the private network as a From 9951656cb65d67a84c62ae86ae510ce607eee7f8 Mon Sep 17 00:00:00 2001 From: Meitar M Date: Fri, 6 Mar 2020 17:44:51 -0500 Subject: [PATCH 2/4] Fix typo and use keyword argument syntax for consistency. --- website/source/docs/virtualbox/networking.html.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/website/source/docs/virtualbox/networking.html.md b/website/source/docs/virtualbox/networking.html.md index 59ca17eb4..b1e4c1be7 100644 --- a/website/source/docs/virtualbox/networking.html.md +++ b/website/source/docs/virtualbox/networking.html.md @@ -15,14 +15,14 @@ description: |- By default, private networks are [host-only networks](https://www.virtualbox.org/manual/ch06.html#network_hostonly), because those are the easiest to work with. In VirtualBox, since you can create multiple host-only networks, it is also possible to specify which -host-only network you want to the Vagrant Virtualbox provider to use for +host-only network you want the Vagrant VirtualBox provider to use for a given interface. To do this, use the `:name` symbol with the name of the host-only interface to use. ```ruby Vagrant.configure("2") do |config| config.vm.network "private_network", type: "dhcp", - :name => "vboxnet3" + name: => "vboxnet3" end ``` From 945e623f6d1166e82ac79e577410ada3a0fc3db9 Mon Sep 17 00:00:00 2001 From: Meitar M Date: Fri, 6 Mar 2020 17:46:04 -0500 Subject: [PATCH 3/4] Remove referencese to symbol syntax. --- website/source/docs/virtualbox/networking.html.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/source/docs/virtualbox/networking.html.md b/website/source/docs/virtualbox/networking.html.md index b1e4c1be7..3614002a9 100644 --- a/website/source/docs/virtualbox/networking.html.md +++ b/website/source/docs/virtualbox/networking.html.md @@ -16,7 +16,7 @@ By default, private networks are [host-only networks](https://www.virtualbox.org because those are the easiest to work with. In VirtualBox, since you can create multiple host-only networks, it is also possible to specify which host-only network you want the Vagrant VirtualBox provider to use for -a given interface. To do this, use the `:name` symbol with the name of +a given interface. To do this, use the `name` argument with the name of the host-only interface to use. ```ruby From 9f0d4ef074057747f766e75f47a7871ea761e99c Mon Sep 17 00:00:00 2001 From: Meitar M Date: Fri, 6 Mar 2020 18:35:55 -0500 Subject: [PATCH 4/4] Actually remove all references to symbol syntax. --- website/source/docs/virtualbox/networking.html.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/source/docs/virtualbox/networking.html.md b/website/source/docs/virtualbox/networking.html.md index 3614002a9..58c5ef6c4 100644 --- a/website/source/docs/virtualbox/networking.html.md +++ b/website/source/docs/virtualbox/networking.html.md @@ -22,7 +22,7 @@ the host-only interface to use. ```ruby Vagrant.configure("2") do |config| config.vm.network "private_network", type: "dhcp", - name: => "vboxnet3" + name: "vboxnet3" end ```