This is a strange question.
I’m currently working with a Vagrantfile where I’m tryin launch a Ubuntu VM. The bringing log show me:
WARNING: The VMX file for this box contains a setting that is automatically overwritten by Vagrant
WARNING: when started. Vagrant will stop overwriting this setting in an upcoming release which may
WARNING: prevent proper networking setup. Below is the detected VMX setting:
WARNING:
WARNING: ethernet0.pcislotnumber = "160"
WARNING:
WARNING: If networking fails to properly configure, it may require this VMX setting. It can be manually
WARNING: applied via the Vagrantfile:
WARNING:
WARNING: Vagrant.configure(2) do |config|
WARNING: config.vm.provider :vmware_desktop do |vmware|
WARNING: vmware.vmx["ethernet0.pcislotnumber"] = "160"
WARNING: end
WARNING: end
WARNING:
WARNING: For more information: https://www.vagrantup.com/docs/vmware/boxes.html#vmx-allowlisting
Although this does not affect my ability to start and use this VM, I just want to change the ethernet0.pcislotnumber to verify it. After reading the article VMX Allowlisting and Predictable Network Interface Names , I started to change the Vagrantfile but no matter how I tested the ethernet0.pcislotnumber ALWAYS 160, I can not understand why?
The following is the configuration information:
OS: macOS Sonoma 14.5 (Apple Silicon)
Vagrant: 2.4.1
provider: vmware_fusion, 13.5.2 Pro
BoxOS: ubuntu-24.04
Vagrantfile:
Vagrant.configure("2") do |config|
# Box Setting
config.vm.box = "ubuntu-24.04"
config.vm.box_url = "LOCAL_URL/ubuntu-24.04.json"
config.vm.box_version = "2.0.0"
# VM Setting
config.vm.provider :vmware_fusion do |v|
v.gui = false
v.nat_device = "vmnet2"
v.vmx["ethernet0.pciSlotNumber"] = "10"
end
end
However, after running vagrant up and checking the VMX file or run ip a in system,
- I see that the
pciSlotNumberforethernet0is not set to 10, but remains at its default value 160. - I try to add second interface
ethernet1and just changeethernet1.pciSlotNumber, the value always 256. - I even manually changed VMX but it was still 160 for ethernet0 after
vagrant up.
I’m not sure if this is a bug, or if I’m doing something wrong. Is there a specific range of values that pciSlotNumber should be within? Or is there a specific way to set pciSlotNumber that I’m not aware of?
Any help would be greatly appreciated. Thanks in advance!