北渚007
版权声明:本文为博主原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。
创建RN项目时,想用Genymoiton新建一个Android模拟器,报错如下:An error has occurred while trying to create a virtualbox host-only network interface
原因是VirtualBox下载失败,重新下载,在系统偏好设置 -> 安全性与隐私 -> 通用中,选择允许Oracle下载App
参考官方文档://support.genymotion.com/hc/en-us/articles/360000990578–An-error-has-occurred-while-trying-to-create-a-virtualbox-host-only-network-interface-macOS-
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 IConsoleHmm, 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: //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.cppSo 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.