Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

on windows virtualbox host only network improperly identified so it leads to failure during provisioning #13620

Open
ryzior opened this issue Mar 15, 2025 · 0 comments

Comments

@ryzior
Copy link

ryzior commented Mar 15, 2025

Debug output

https://gist.github.com/ryzior/9a2ff2e9cd28dfdc5544a457e32342e6

Expected behavior

seems the vboxmanage.exe is called with the network name while the tool expects the interface name

Actual behavior

Reproduction information

Vagrant version

Vagrant 2.4.3

Host operating system

Windows 11 home

Guest operating system

Oracle linux (can be any I suppose)

Steps to reproduce

vboxmanage when called with the hostonly interface name instead of the network :
check the Name and VBoxNetworkName fields
vboxmanage list hostonlyifs
Name: VirtualBox Host-Only Ethernet Adapter
GUID: 7f5b8ac2-8c0c-4b68-b197-b146e8f22a91
DHCP: Enabled
IPAddress: 192.168.56.3
NetworkMask: 255.255.255.0
IPV6Address: fe80::8871:cd6d:202e:3390
IPV6NetworkMaskPrefixLength: 64
HardwareAddress: 0a:00:27:00:00:2d
MediumType: Ethernet
Wireless: No
Status: Up
VBoxNetworkName: HostInterfaceNetworking-VirtualBox Host-Only Ethernet Adapter

now lets call vboxmanage with the same name vagrant does (see the debug log gist link):
vboxmanage hostonlyif ipconfig "HostInterfaceNetworking-VirtualBox Host-Only Ethernet Adapter" --dhcp
VBoxManage.exe: error: The host network interface named 'HostInterfaceNetworking-VirtualBox Host-Only Ethernet Adapter' could not be found
VBoxManage.exe: error: Details: code E_INVALIDARG (0x80070057), component HostWrap, interface IHost, callee IUnknown
VBoxManage.exe: error: Context: "FindHostNetworkInterfaceByName(Bstr(pszName).raw(), hif.asOutParam())" at line 242 of file VBoxManageHostonly.cpp

and what happens when you call it with the IF name:
vboxmanage hostonlyif ipconfig "VirtualBox Host-Only Ethernet Adapter" --dhcp
it simply gives no output but the dhcp is set if you list that adapter

Vagrantfile

BOX_NAME = "oracle8base" # this is a standard Oracle 8 box with the vagrant addon plugin v 1.76 instead 1.74

Vagrant.configure("2") do |config|

config.vm.box = BOX_NAME
  config.vm.define "testora8"
  config.vm.hostname = "test8"
    config.vm.network "private_network", type: "dhcp", name: "VirtualBox Host-Only Ethernet Adapter"

#if you remove name: from above line the problem still there, I was trying to solve it by injecting the name but the option is disregarded by the provisioner
config.vm.provider "virtualbox" do |vb|
vb.memory = "8192"
vb.cpus = 2
end
end

# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

No branches or pull requests

2 participants