Got stuck and getting the following message while creating virtual machine using vagrant up
controlplane: Which interface should the network bridge to?
I have provided following answers
ethernet adapter
wireless lan adapter
wireless lan adapter wi-fi
Wi-Fi adapter
Ethernet adapter Ethernet 2
But still I am getting the same question
What vagrant script are you using, and what platform are you running it on? If you’re using the vagrant script from the CKA archive (on Windows – it doesn’t work on MacOS), I’d need a bit more info to tell you want’s up here.
I downloaded the vagrant script from the following the github repo
I am using this script on windows 11 machine
Script Execution
PS C:\devops\kodeadm\certified-kubernetes-administrator-course\kubeadm-clusters\virtualbox> vagrant up
Bringing machine ‘controlplane’ up with ‘virtualbox’ provider…
Bringing machine ‘node01’ up with ‘virtualbox’ provider…
Bringing machine ‘node02’ up with ‘virtualbox’ provider…
==> controlplane: Importing base box ‘ubuntu/jammy64’…
==> controlplane: Matching MAC address for NAT networking…
==> controlplane: Setting the name of the VM: controlplane
==> controlplane: Clearing any previously set network interfaces…
==> controlplane: Specific bridge ‘Intel(R) Wi-Fi 6E AX211 160MHz’ not found. You may be asked to specify
==> controlplane: which network to bridge to.
==> controlplane: Available bridged network interfaces:
==> controlplane: When choosing an interface, it is usually the one that is
==> controlplane: being used to connect to the internet.
==> controlplane:
controlplane: Which interface should the network bridge to?
I am using this script on windows 11 machine
Hi Rob
I resolved this issus. Able to install all three VM’s in virtual box using vagrant script only.
First issue was with my Virtual box installation. I did the installation again and then in vagrant script file I changed the build_mode to “NAT”.
Not sure why the script failed to figure out your specific network configuration, but using the NAT setting in the script is just fine if you don’t need bridging. If you decide you do, ask, since the guy who wrote the script is a pretty good Windows engineer.
After virtual box installation I tried with bridge build mode first. It’s created the controlplane machine only. This was the following output
Bringing machine ‘controlplane’ up with ‘virtualbox’ provider…
Bringing machine ‘node01’ up with ‘virtualbox’ provider…
Bringing machine ‘node02’ up with ‘virtualbox’ provider…
==> controlplane: Importing base box ‘ubuntu/jammy64’…
==> controlplane: Matching MAC address for NAT networking…
==> controlplane: Setting the name of the VM: controlplane
==> controlplane: Clearing any previously set network interfaces…
==> controlplane: Preparing network interfaces based on configuration…
controlplane: Adapter 1: nat
controlplane: Adapter 2: bridged
==> controlplane: Forwarding ports…
controlplane: 22 (guest) => 2222 (host) (adapter 1)
==> controlplane: Running ‘pre-boot’ VM customizations…
==> controlplane: Booting VM…
==> controlplane: Waiting for machine to boot. This may take a few minutes…
controlplane: SSH address: 127.0.0.1:2222
controlplane: SSH username: vagrant
controlplane: SSH auth method: private key
controlplane: Warning: Connection reset. Retrying…
controlplane: Warning: Connection aborted. Retrying…
controlplane: Warning: Connection reset. Retrying…
controlplane: Warning: Connection aborted. Retrying…
controlplane:
controlplane: Vagrant insecure key detected. Vagrant will automatically replace
controlplane: this with a newly generated keypair for better security.
controlplane:
controlplane: Inserting generated public key within guest…
controlplane: Removing insecure key from the guest if it’s present…
controlplane: Key inserted! Disconnecting and reconnecting using new SSH key…
==> controlplane: Machine booted and ready!
==> controlplane: Checking for guest additions in VM…
controlplane: The guest additions on this VM do not match the installed version of
controlplane: VirtualBox! In most cases this is fine, but in rare cases it can
controlplane: prevent things such as shared folders from working properly. If you see
controlplane: shared folder errors, please make sure the guest additions within the
controlplane: virtual machine match the version of VirtualBox you have installed on
controlplane: your host and reload your VM.
controlplane:
controlplane: Guest Additions Version: 6.0.0 r127566
controlplane: VirtualBox Version: 7.2
==> controlplane: Setting hostname…
==> controlplane: Configuring and enabling network interfaces…
==> controlplane: Mounting shared folders…
controlplane: C:/devops/kodeadm/certified-kubernetes-administrator-course/kubeadm-clusters/virtualbox => /vagrant
==> controlplane: Running provisioner: setup-hosts (shell)…
controlplane: Running: C:/Users/MOHIT~1.MUN/AppData/Local/Temp/vagrant-shell20260423-26112-ndymtr.sh
controlplane: [#1] Trying to set MY_IP
controlplane: [#1] Trying to set MY_IP
controlplane: [#1] Trying to set MY_IP
controlplane: [#1] Trying to set MY_IP
controlplane: [#1] Trying to set MY_IP
controlplane: [#1] Trying to set MY_IP
controlplane: [#1] Trying to set MY_IP
controlplane: [#1] Trying to set MY_IP
controlplane: [#1] Trying to set MY_IP
controlplane: [#1] Trying to set MY_IP
controlplane: Setting MY_IP failed
The SSH command responded with a non-zero exit status. Vagrant
assumes that this means the command failed. The output for this command
should be in the log above. Please read the output to determine what
went wrong.
Our guy gave the script a look. He thinks that the problem is with either the vagrant version or the Virtualbox version, and he found the problem goes away if you upgrade to the latest versions. So that’s what to do.
Underlying cause may related to Windows version, but upgrading the apps solves the issue.