diff options
Diffstat (limited to 'devdocs/vagrant/virtualbox%2Fnetworking.html')
| -rw-r--r-- | devdocs/vagrant/virtualbox%2Fnetworking.html | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/devdocs/vagrant/virtualbox%2Fnetworking.html b/devdocs/vagrant/virtualbox%2Fnetworking.html new file mode 100644 index 00000000..0290178f --- /dev/null +++ b/devdocs/vagrant/virtualbox%2Fnetworking.html @@ -0,0 +1,20 @@ +<h1 id="networking"> Networking </h1> <h2 id="virtualbox-internal-network"> VirtualBox Internal Network </h2> <p>The Vagrant VirtualBox provider supports using the private network as a VirtualBox <a href="https://www.virtualbox.org/manual/ch06.html#network_internal">internal network</a>. By default, private networks are host-only networks, because those are the easiest to work with. However, internal networks can be enabled as well.</p> <p>To specify a private network as an internal network for VirtualBox use the <code>virtualbox__intnet</code> option with the network. The <code>virtualbox__</code> (double underscore) prefix tells Vagrant that this option is only for the VirtualBox provider.</p> <div class="highlight"><pre class="highlight ruby" data-language="ruby">Vagrant.configure("2") do |config| + config.vm.network "private_network", ip: "192.168.50.4", + virtualbox__intnet: true +end +</pre></div> +<p>Additionally, if you want to specify that the VirtualBox provider join a specific internal network, specify the name of the internal network:</p> <div class="highlight"><pre class="highlight ruby" data-language="ruby">Vagrant.configure("2") do |config| + config.vm.network "private_network", ip: "192.168.50.4", + virtualbox__intnet: "mynetwork" +end +</pre></div> +<h2 id="virtualbox-nic-type"> VirtualBox NIC Type </h2> <p>You can specify a specific NIC type for the created network interface by using the <code>nic_type</code> parameter. This is not prefixed by <code>virtualbox__</code> for legacy reasons, but is VirtualBox-specific.</p> <p>This is an advanced option and should only be used if you know what you are using, since it can cause the network device to not work at all.</p> <p>Example:</p> <div class="highlight"><pre class="highlight ruby" data-language="ruby">Vagrant.configure("2") do |config| + config.vm.network "private_network", ip: "192.168.50.4", + nic_type: "virtio" +end +</pre></div><div class="_attribution"> + <p class="_attribution-p"> + © 2010–2018 Mitchell Hashimoto<br>Licensed under the MPL 2.0 License.<br> + <a href="https://www.vagrantup.com/docs/virtualbox/networking.html" class="_attribution-link">https://www.vagrantup.com/docs/virtualbox/networking.html</a> + </p> +</div> |
