public_network and gateway

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

public_network and gateway

Mathew Abraham
Hi guys,

I got a setup for public_network with static IP

 c.vm.network :public_network, ip: n[0], netmask: '255.255.255.0'

However When the last bit is executed i.e. "Configuring and enabling network interfaces.."  it clears my manual GATEWAY entry in ifcfg-enp0s8 because of this other servers cannot ping my VM. Is there any way to

a) Configure gateways for interface via vagrant? 
b)or tell vagrant  not to delete gateway configs ?

VirtualBox Guest Additions: Starting.
Redirecting to /bin/systemctl start vboxadd.service
Redirecting to /bin/systemctl start vboxadd-service.service
Unmounting Virtualbox Guest Additions ISO from: /mnt
==> wcs_local_env: Checking for guest additions in VM...
==> wcs_local_env: Setting hostname...
==> wcs_local_env: Configuring and enabling network interfaces...
    wcs_local_env: SSH address: 127.0.0.1:2200
    wcs_local_env: SSH username: vagrant
    wcs_local_env: SSH auth method: private key
==> wcs_local_env: Mounting shared folders...
    wcs_local_env: /vagrant => C:/disc/vagrant
==> wcs_local_env: Machine already provisioned. Run `vagrant provision` or use the `--provision`
==> wcs_local_env: flag to force provisioning. Provisioners marked to run always will still run.

Thanks,
Mathew

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/vagrant-up/c2103655-0ab1-4f0e-8211-2e60786d9b9f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: public_network and gateway

Alvaro Miranda Aguilera
hello

vagrant wont setup gw in that fixed ip setup, better tell vagrant not configure and do it over a provision script. you can add run: "always" to have it run all the time.

Alvaro.

On Tue, Dec 5, 2017 at 2:37 PM, Mathew Abraham <[hidden email]> wrote:
Hi guys,

I got a setup for public_network with static IP

 c.vm.network :public_network, ip: n[0], netmask: '255.255.255.0'

However When the last bit is executed i.e. "Configuring and enabling network interfaces.."  it clears my manual GATEWAY entry in ifcfg-enp0s8 because of this other servers cannot ping my VM. Is there any way to

a) Configure gateways for interface via vagrant? 
b)or tell vagrant  not to delete gateway configs ?

VirtualBox Guest Additions: Starting.
Redirecting to /bin/systemctl start vboxadd.service
Redirecting to /bin/systemctl start vboxadd-service.service
Unmounting Virtualbox Guest Additions ISO from: /mnt
==> wcs_local_env: Checking for guest additions in VM...
==> wcs_local_env: Setting hostname...
==> wcs_local_env: Configuring and enabling network interfaces...
    wcs_local_env: SSH address: 127.0.0.1:2200
    wcs_local_env: SSH username: vagrant
    wcs_local_env: SSH auth method: private key
==> wcs_local_env: Mounting shared folders...
    wcs_local_env: /vagrant => C:/disc/vagrant
==> wcs_local_env: Machine already provisioned. Run `vagrant provision` or use the `--provision`
==> wcs_local_env: flag to force provisioning. Provisioners marked to run always will still run.

Thanks,
Mathew

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/vagrant-up/c2103655-0ab1-4f0e-8211-2e60786d9b9f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/vagrant-up/CAHqq0eyzCLXq4mfi8rnR6Wqzy%2B_7kLqaqTbnD5Y0%3D_JZ8T7Kog%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: public_network and gateway

Mathew Abraham
Thanks Alvaro, I now tried an inline provision script with run always just to set gateway and it is working

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/vagrant-up/0770b1a9-8a34-4503-b51e-647239c10d35%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.