Block a specific network adapter using config.vm.network?

19 views
Skip to first unread message

john.wal...@gmail.com

unread,
Apr 9, 2019, 12:51:03 PM4/9/19
to Vagrant
I am currently attempting to use vagrant with virtualbox to set up a vm using a bridge connection.  There are several different systems that will run this, but have different (some currently unknown to me) adapter names.  The issue is that these systems are running windows 10 with the newest version of wireshark use the npcap loopback adapter.

Is there any way to tell config.vm.network to ignore an adapter by name?  I.e. I would like the network adapter selection to ignore "Npcap Loopback Adapter" so the user does not have to manually select the other adapter if the system only has the loopback adapter and one other device.

Something like:
    config.vm.network 'public_network',
        ip: "192.168.1.2",
        bridge: [^(?!*Npcap*$).*]

Or:

    config.vm.network 'public_network',
        ip: "192.168.1.2",
        ignore: "Npcap Loopback Adapter"


I do appreciate any help in this.
Reply all
Reply to author
Forward
0 new messages