change nic name ?

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

change nic name ?

Mathew Abraham
Hi guys,

Is it possible to change the nic name to custom one using vagrantfile ?  i.e instead of  'enp0s8'  could I specify 'ens100' ?

      c.vm.network :public_network, ip: 192.17.28.180 , netmask: '255.255.255.0'


[vagrant@ansible ~]$ ifconfig
enp0s3: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 10.0.2.15  netmask 255.255.255.0  broadcast 10.0.2.255
        inet6 xxxxxxxxxxxxxxx  prefixlen 64  scopeid 0x20<link>
        ether 09:00:30:1f:gc:83  txqueuelen 1000  (Ethernet)
        RX packets 45752  bytes 63057452 (60.1 MiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 7547  bytes 558118 (545.0 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

enp0s8: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.17.28.180  netmask 255.255.255.0  broadcast 192.17.28.255
        inet6 xxxxxxxxxxxxxx  prefixlen 64  scopeid 0x20<link>
        ether 09:00:30:gc:dc:92  txqueuelen 1000  (Ethernet)
        RX packets 86  bytes 8543 (8.3 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 55  bytes 8108 (7.9 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

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/dfda4d37-4f2f-427b-abc0-d0ad5eda9ba7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: change nic name ?

Alvaro Miranda Aguilera
hello

Why you need that?

The nic name is generated by linux based on thinks like pci port.

What requirement you have that relies on the nic name?

alvaro.


On 1 Dec 2017, at 13:07, Mathew Abraham <[hidden email]> wrote:

Hi guys,

Is it possible to change the nic name to custom one using vagrantfile ?  i.e instead of  'enp0s8'  could I specify 'ens100' ?

      c.vm.network :public_network, ip: 192.17.28.180 , netmask: '255.255.255.0'


[vagrant@ansible ~]$ ifconfig
enp0s3: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 10.0.2.15  netmask 255.255.255.0  broadcast 10.0.2.255
        inet6 xxxxxxxxxxxxxxx  prefixlen 64  scopeid 0x20<link>
        ether 09:00:30:1f:gc:83  txqueuelen 1000  (Ethernet)
        RX packets 45752  bytes 63057452 (60.1 MiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 7547  bytes 558118 (545.0 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

enp0s8: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.17.28.180  netmask 255.255.255.0  broadcast 192.17.28.255
        inet6 xxxxxxxxxxxxxx  prefixlen 64  scopeid 0x20<link>
        ether 09:00:30:gc:dc:92  txqueuelen 1000  (Ethernet)
        RX packets 86  bytes 8543 (8.3 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 55  bytes 8108 (7.9 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

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/dfda4d37-4f2f-427b-abc0-d0ad5eda9ba7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
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/52EBA1E0-FBE0-44AF-A2C7-BA4B9397431B%40gmail.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: change nic name ?

Mathew Abraham
Hi Alvaro,

Thanks, I was trying to keep the  nic name same for all the developers as my Ansible job configure the VM system  based on the nic name provided. If it differs for each VM then I have to make is as a parameter via data vars. I was just trying to reduce that parameter if possible.

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/0274468b-314c-4de3-b5ff-a1ec1c9bafdc%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: change nic name ?

Alvaro Miranda Aguilera
if you disable the new predictable naming you can end with eth0/eth1 etc

you may need to repackage the box or create one from iso.

check about net.ifnames=0 on boot kernel parameter.



On Sun, Dec 3, 2017 at 9:40 PM, Mathew Abraham <[hidden email]> wrote:
Hi Alvaro,

Thanks, I was trying to keep the  nic name same for all the developers as my Ansible job configure the VM system  based on the nic name provided. If it differs for each VM then I have to make is as a parameter via data vars. I was just trying to reduce that parameter if possible.

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/0274468b-314c-4de3-b5ff-a1ec1c9bafdc%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/CAHqq0eyvj93mefZH4yQYeFwCOdhgArBQROhR15HOid71rkcr2Q%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.