hashicorp / vagrant

Vagrant is a tool for building and distributing development environments.
https://www.vagrantup.com
Other
26.25k stars 4.44k forks source link

[vmware] - vagrant should respect custom defined bridged interfaces #10207

Open pale3 opened 6 years ago

pale3 commented 6 years ago

Vagrant version

2.1.4

Host operating system

Debian Stretch

Guest operating system

Windows 7

Vagrantfile

# -*- mode: ruby -*-
# vi: set ft=ruby :

Vagrant.configure(2) do |config|

  config.vm.box = "nxm/windows7"

    config.vm.provider :vmware_workstation do |v, override|
        v.vmx["memsize"] = "2048"

    v.vmx["ethernet1.connectionType"] = "custom"
    v.vmx["ethernet1.vnet"] = "/dev/vmnet2"
    v.vmx["ethernet1.present"] = "TRUE"
    v.vmx["ethernet1.virtualDev"] = "vmxnet3"     
    end

Expected behavior

Vagrant should use custom ConnectionType pointed to specific network interface only and not auto bridging all interfaces from host

Actual behavior

Custom interface is defined within VMX file & VM Settings, but apparently when vagrant boots up, it calls vmware-networks and previously defined bridged settings within vmware-netcfg get replaced by vmnet0 and vmnet8 which is respectively auto bridging and NAT

Steps to reproduce

  1. open vmware-netcfg
  2. add new interface as vmnet2 bridged to some specific host interface
  3. spawn vagrant up
pale3 commented 3 years ago

again 2y after, what is status with this?