0

Six years ago I set up a CentOS VM on a Win10 host, with mostly other people's knowledge - I was hanging on by a thread figuring out just enough to get it working. Now I'm moving all my stuff to a new computer (Win11). I installed VirtualBox and Vagrant, copied all the files I know of into the same paths as on the old machine, crossed my fingers, and gave it a shot. I got the following output:

PS C:\dev\7and7> vagrant up
Bringing machine '7and7' up with 'virtualbox' provider...
==> 7and7: Resuming suspended VM...
==> 7and7: Booting VM...
There was an error while executing `VBoxManage`, a CLI used by Vagrant
for controlling VirtualBox. The command and stderr is shown below.

Command: ["startvm", "797d2c9c-557c-4f5c-a988-502c3bcfae8e", "--type", "headless"]

Stderr: VBoxManage.exe: error: Nonexistent host networking interface, name 'VirtualBox Host-Only Ethernet Adapter #4' (VERR_INTERNAL_ERROR) VBoxManage.exe: error: Details: code E_FAIL (0x80004005), component ConsoleWrap, interface IConsole

Hmm, so I guess I need to create "VirtualBox Host-Only Ethernet Adapter #4". In VirtualBox on my old machine, File -> Host Network Manager shows three such adapters - #2, #3, and #4. I don't remember whether I made them in VBox or by some other method. On the new machine there are none, but if I click "Create", it says "Creating host only network interface" for a couple seconds before ending with: "Failed to create a host network interface." The details say:

Failed to create a host network interface.

Assertion failed: [!aInterfaceName.isEmpty()] at 'F:\tinderbox\win-6.1\src\VBox\Main\src-server\HostNetworkInterfaceImpl.cpp' (76) in long __cdecl HostNetworkInterface::init(class com::Utf8Str,class com::Utf8Str,class com::Guid,enum __MIDL___MIDL_itf_VirtualBox_0000_0000_0046).

Please contact the product vendor!.

Result Code: E_FAIL (0x80004005) Component: HostNetworkInterfaceWrap Interface: IHostNetworkInterface {455f8c45-44a0-a470-ba20-27890b96dba9}

I don't understand most of that, but I know I don't have an F drive/partition (on either machine), and it's unclear what "tinderbox" could even be in this context (the internet thinks it's a note-taking tool). "Please contact the product vendor" - which product? Windows? VBox? Vagrant? My VM?

As you can probably tell, I'm way out of my league - can anyone point me in the right direction? I'm running VBox 6.1.36 and Vagrant 2.2.19.

EDIT: It occurred to me that the VM was suspended (not halted) when I copied it to the new host, so I halted it on the old machine and copied it again, and then tried to start it. This time I got different errors - first of all, Windows asked me no less that 5 times for permission for VirtualBox to access my hard drive - on the old machine it would never ask that at all when firing up my VM. Then the output was as follows:

PS C:\dev\7and7> vagrant up
Bringing machine '7and7' up with 'virtualbox' provider...
==> 7and7: Clearing any previously set forwarded ports...
Vagrant is currently configured to create VirtualBox synced folders with
the `SharedFoldersEnableSymlinksCreate` option enabled. If the Vagrant
guest is not trusted, you may want to disable this option. For more
information on this option, please refer to the VirtualBox manual:

https://www.virtualbox.org/manual/ch04.html#sharedfolders

This option can be disabled globally with an environment variable:

VAGRANT_DISABLE_VBOXSYMLINKCREATE=1

or on a per folder basis within the Vagrantfile:

config.vm.synced_folder '/host/path', '/guest/path', SharedFoldersEnableSymlinksCreate: false ==> 7and7: Clearing any previously set network interfaces... There was an error while executing VBoxManage, a CLI used by Vagrant for controlling VirtualBox. The command and stderr is shown below.

Command: ["hostonlyif", "create"]

Stderr: 0%... Progress state: E_INVALIDARG VBoxManage.exe: error: Failed to create the host-only adapter VBoxManage.exe: error: Assertion failed: [!aInterfaceName.isEmpty()] at 'F:\tinderbox\win-6.1\src\VBox\Main\src-server\HostNetworkInterfaceImpl.cpp' (76) in long __cdecl HostNetworkInterface::init(class com::Utf8Str,class com::Utf8Str,class com::Guid,enum __MIDL___MIDL_itf_VirtualBox_0000_0000_0046). VBoxManage.exe: error: Please contact the product vendor! VBoxManage.exe: error: Details: code E_FAIL (0x80004005), component HostNetworkInterfaceWrap, interface IHostNetworkInterface VBoxManage.exe: error: Context: "enum RTEXITCODE __cdecl handleCreate(struct HandlerArg *)" at line 95 of file VBoxManageHostonly.cpp

So I guess it's Vagrant that is supposed to initiate the creation of the host-only adapter (when the VM is booted from powered-off state), rather than me doing it manually in VBox. Anyway, it's still not working.

1 Answers1

0

For those with similar struggles who might find this post...

I think the original cause of my problem was trying to restart a suspended VM after moving it to a new host that had never run VBox or that VM before. (When I did the move, I did not remember that it was suspended.) After that failed, I did vagrant halt on the old host and copied the halted VM to the new host in place of the suspended one, but by then the new host's settings had been goofed up. Lesson #1: When moving to a new host, always completely shut down the VM first.

As for the resulting low-level error messages, you can see in the comments on this question that I found https://stackoverflow.com/a/33733454 and tried to disable the "VirtualBox Host-Only Network" entry in Settings / Network & Internet / Advanced Network Settings, but it refused to be disabled. Apparently I was close to the solution at that point.

The final clue was here: https://forums.virtualbox.org/viewtopic.php?f=6&t=100406&p=487497#p487353 To quote: "Try rebooting your host so no Virtualbox processes are running, then go to your host's network adapters, where you can right-click on them and set properties or disable/enable them. Try disabling the Host-Only adapters then re-enabling them." The clue I was missing was to reboot first and not touch VBox - that was not mentioned in the popular StackOverflow answer. Sure enough, after a reboot I was able to disable the Host-Only adapter and re-enable it. In my case, that cleared up the problem and my VM booted successfully. Lesson #2: If you're getting weird errors related to your host-only adapter, reboot the host, then disable/re-enable the adapter in Settings or Control Panel, then try your VM again - the order is important.