Hi everyone,
I have the following, simple Vagrantfile
:
Vagrant.configure("2") do |config|
config.vm.box = "ubuntu/jammy64"
config.vm.provider "virtualbox" do |vb|
vb.memory = "2048"
vb.cpus = 6
end
end
vagrant up
starts a new box with NAT network adapter enabled.
In addition to this NAT adapter, I’d like to have a second adapter configured as “Host-only Adapter”.
I just can’t get this working … If I add:
config.vm.network "private_network", type: "dhcp", name: "VirtualBox Host-Only Ethernet Adapter", adapter: 2
Vagrant gives me this:
A host only network interface you’re attempting to configure via DHCP
already has a conflicting host only adapter with DHCP enabled. The
DHCP on this adapter is incompatible with the DHCP settings. Two
host only network interfaces are not allowed to overlap, and each
host only network interface can have only one DHCP server. Please
reconfigure your host only network or remove the virtual machine
using the other host only network.
There is no second “host-only” adapter configured! The only interface configured is NAT:
Name: checkmk_cisco_plugin_default_1685949029121_49064
...
NIC 1: MAC: 02E64CD3E142, Attachment: NAT, Cable connected: on, Trace: off (file: none), Type: 82545EM, Reported speed: 0 Mbps, Boot priority: 0, Promisc Policy: deny, Bandwidth group: none
NIC 1 Settings: MTU: 0, Socket (send: 64, receive: 64), TCP Window (send:64, receive: 64)
NIC 2: disabled
NIC 3: disabled
NIC 4: disabled
NIC 5: disabled
NIC 6: disabled
NIC 7: disabled
NIC 8: disabled
...
My host-OS is Windows 10.
Once the VM is created (after vagrant up
, vagrant halt
), I can edit the VM using the VB GUI and add the Network device without any issue, as long as I use the VB GUI to start the VM.
But I can’t get it to work with Vagrant.
BR,
Marc