configuring host-only network with Virtualbox

23 views
Skip to first unread message

Alceu Rodrigues de Freitas Junior

unread,
Dec 11, 2018, 5:32:58 AM12/11/18
to Vagrant
Hello there,

I'm new to this group, and I've being using Vagrant for a while now, always with Virtualbox.

Yesterday I decided to have two VM's talking to each other through a host-only network. Since I couldn't find proper documentation about it (https://www.vagrantup.com/docs/virtualbox/networking.html), I went through Google results and found them quite confusing, specially this Github issue below:


Trying that configuration just generate errors stating that ":hostonly" was not a valid option.

After doing more research, I end up with this configuration:

config.vm.network "private_network", type: "dhcp"

Which seems it would work if not just create a new host-only interface instead using the already available one!

In this lab, I was trying to make a already existing VM (not created with Vagrant) to be in the same host-only network with the Vagrant one. I ended up shutting down the Vagrant managed VM and changing it's configuration manually, which is a workaround at best.

What I'm missing over here? I found a bit confusing have to define a "private network" when I want to use a "hostonly" with Virtualbox (I know, Vagrant is suppose to use support several different virtualization products, but there is nothing wrong in providing a product specific configuration in the Vagrantfile too).

Thanks!

Alceu

Alvaro Miranda Aguilera

unread,
Dec 14, 2018, 1:19:05 PM12/14/18
to vagra...@googlegroups.com
hello host only is.. vm to host only

you need a private network to vm to vm can talk

like this:

--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
 
GitHub Issues: https://github.com/mitchellh/vagrant/issues
IRC: #vagrant on Freenode
---
You received this message because you are subscribed to the Google Groups "Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vagrant-up+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vagrant-up/c4b2848c-f4b2-4018-99b5-61f8a91e5a43%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


--
Alvaro

Reply all
Reply to author
Forward
0 new messages