Vagrant host-only networking

112 views
Skip to first unread message

Alex

unread,
Jan 13, 2016, 6:49:17 AM1/13/16
to Vagrant
Hello,
I have a couple of quick questions. I'm playing around with vagrant and I set up a private network with
  config.vm.network "private_network", ip: "172.28.128.11"

1- After vagrant destroy there is still the virtualbox interface up on the host machine
vboxnet0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
 ether
0a:00:27:00:00:00
 inet
172.28.128.1 netmask 0xffffff00 broadcast 172.28.128.255

there are no virtualbox/ruby/vagrant running
ps -ef |grep -iE "virtualbox\|vagrant\|ruby"
returns empty.
Shouldn't vagrant destroy remove also virtual interfaces?

2- I can specify the static IP of the guest vm, but how can I set the static 172.28.128.1 on my host interface?

Thanks

vagrant --version

Vagrant 1.7.3
VirtualBox Version 5.0.10 r104061
OSX El Capitan 10.11.2 (15C50)

Alvaro Miranda Aguilera

unread,
Jan 14, 2016, 12:52:36 AM1/14/16
to vagra...@googlegroups.com
Hello Alex

Without vagrant, when you create a private network in virtualbox you can specify parameters on that virtual network/swithc. like dhcp on/off, ip for the host.

When you put private_network ip "192.168.128.2" vagrant will create/configure this network in the Virtualbox, and use 192.168.128.1 for the host, and 192.168.128.2 for the guest.

It will do it automatically.

After you delete all the boxes in that network, you can delete the network with VirtualBox GUI, or using VBoxManage command.

Alvaro

--
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/0213871d-74d3-46d4-bac8-1f5a21cde76c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages