Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

BoxManage.exe: error: Failed to create the host-only adapter (FPP) #288

Closed
brokedba opened this issue Aug 2, 2020 · 17 comments
Closed

BoxManage.exe: error: Failed to create the host-only adapter (FPP) #288

brokedba opened this issue Aug 2, 2020 · 17 comments
Assignees

Comments

@brokedba
Copy link

brokedba commented Aug 2, 2020

Description
Hi,
I am having a problem with the step that creates the HostOnly adapter .
The vagrant up hangs then throws the below error . I am almost certain that it's linked to both virtualBox and windows 10 as I saw a lot of threads on StackoverFlow describing the same network error. but I hoped someone had already gone through this and found a fix.

Bringing machine 'host1' up with 'virtualbox' provider...
Bringing machine 'host2' up with 'virtualbox' provider...
==> host1: Box 'ol74' could not be found. Attempting to find and install...
    host1: Box Provider: virtualbox
    host1: Box Version: >= 0
==> host1: Box file was not detected as metadata. Adding it directly...
==> host1: Adding box 'ol74' (v0) for provider: virtualbox
    host1: Downloading: https://yum.oracle.com/boxes/oraclelinux/ol74/ol74.box
    host1:
==> host1: Successfully added box 'ol74' (v0) for 'virtualbox'!
==> host1: Importing base box 'ol74'...
==> host1: Matching MAC address for NAT networking...
==> host1: Setting the name of the VM: london-fleet-fpp-Server
==> host1: 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_FAIL
VBoxManage.exe: error: Failed to create the host-only adapter
VBoxManage.exe: error: Operation canceled by the user
VBoxManage.exe: error: Details: code E_FAIL (0x80004005), component VirtualBoxWrap, interface IVirtualBox
VBoxManage.exe: error: Context: "enum RTEXITCODE __cdecl handleCreate(struct HandlerArg *)" at line 95 of file VBoxManageHostonly.cpp

Environment (please complete the following information):

**- Host OS:**Windows 10 Home
- Vagrant version: Vagrant 2.2.7
- Vagrant provider: VirtualBox:
- VirtualBox version: 6.1.8r137981

Additional information
By the way , I tried to do it through the GUI console and it works there is just a windows confirmation pop up that I have to click on.
Thank you

@brokedba
Copy link
Author

brokedba commented Aug 2, 2020

It seemed to be fixed by a temporary change in user account Control.
image

  • I am now having another error though :
There was an error while executing `VBoxManage`, a CLI used by Vagrant
for controlling VirtualBox. The command and stderr is shown below.

Command: ["startvm", "6cef1e57-d4d3-4633-a122-1be55e990eec", "--type", "headless"]

Stderr: VBoxManage.exe: error: VMMR0_DO_NEM_INIT_VM failed: VERR_NEM_MISSING_KERNEL_API_2 (VERR_NEM_MISSING_KERNEL_API_2).
VBoxManage.exe: error: VT-x is not available (VERR_VMX_NO_VMX)
VBoxManage.exe: error: Details: code E_FAIL (0x80004005), component ConsoleWrap, interface IConsole

@brokedba
Copy link
Author

brokedba commented Aug 2, 2020

ok I also found a fix the last error 👍 :
just run the blow in powershell as admin and reboot your Windows :

PS C:\Users\brokedba> bcdedit /set hypervisorlaunchtype off
 The operation completed successfully.  

My laptop had a BIOS update like 3 days ago, it could be related.

@PaulNeumann
Copy link
Contributor

@brokedba The Failed to create the host-only adapter error is a known issue with Vagrant on Windows hosts (see hashicorp/vagrant#10833). Vagrant is asking VirtualBox to create a new network interface, which requires administrator permissions.

As you found, you can work around the issue by temporarily setting User Account Control to "Never notify". (But please don't leave it set that way--it could allow malware to run with administrator permissions.)

I hope this helps.

@brokedba
Copy link
Author

brokedba commented Aug 2, 2020

@PaulNeumann of course that's why I said "temporary" ;). thank you.

  • By the way I was wondering if there were Oracle 12c DB images available so I can import it using rhpctl import -zip command
# rhpctl import image -image db_12102 -imagetype ORACLEDBSOFTWARE -zip /vagrant/ORCL_software/12cZipFile

As the usual 12c zipped installables aren't images
image
https://www.oracle.com/ca-en/database/technologies/database12c-win64-downloads.html

@PaulNeumann
Copy link
Contributor

@brokedba

By the way I was wondering if there were Oracle 12c DB images available so I can import it using rhpctl import -zip command

I don't think so. As far as I know, 12c images have to be created from an installed Oracle home.

@brokedba
Copy link
Author

brokedba commented Aug 3, 2020

I thought so but I wanted to confirm.
That would be good enhancement to include a database install during the spin of host2 so people can choose to import an image from an installed oracle home (i.e. 12c) .
I am familiar with oracle database builds but just not used to have everything stored in one vagrantfile (as opposed to have a separate folder and vagrantfile per Host). Otherwise I could try to include this part ina Fork.
Thank you

@PaulNeumann
Copy link
Contributor

Potential enhancements are up to the code owner. @rcitton, could you please take a look at @brokedba's suggestion above for the OracleFPP project?

@brokedba brokedba changed the title BoxManage.exe: error: Failed to create the host-only adapter BoxManage.exe: error: Failed to create the host-only adapter (FPP) Aug 3, 2020
@brokedba
Copy link
Author

brokedba commented Aug 4, 2020

Thank you @PaulNeumann, I can create a new enhancement thread if it's more appropriate and since the OP is a not really related.

@rcitton
Copy link
Member

rcitton commented Aug 10, 2020

Hello @brokedba , such request can not be implemented into the code as the main problem is that Oracle is shipping the 12.1 binaries in a form that the rhpctl import as zip can not works. Moreover the host2 is created as ready target w/o any oracle binaries as the idea is to offer the possibility to do practice on shipping the RDBMS to it (as documented on the bottom of the readme, see "FPP commands you could test postdeploy based on the configuration file above")

@brokedba
Copy link
Author

brokedba commented Aug 10, 2020

Hi @rcitton . Thanks for the build and I actually tried them (importing and shippping homes). However, using it to practice on 18/19c releases won't reflect the current customers environments state where they're all being busy upgrading to 19c from 12c. I don't believe it's just me but waiting until everybody is migrated to 19c kind of loses its(FPP) main purpose .

@rcitton
Copy link
Member

rcitton commented Aug 11, 2020

Hi @brokedba thank you for your feedback. FPP is not only an upgrade utility is doing much more. Sure the upgrade capability is one of the most important but as 11g, 12c shiphome are not in the "zip format" ive decided to skip them and show some other capabilities such a gold image import, workingcopy creation, db creation.... Having the vagrant env you are free to do practice with the upgrade too focusing on the FPP commands only. The VagrantFPP idea is to provide a simple env (in short time) where play with FPP.

@gvenzl
Copy link
Member

gvenzl commented Jun 2, 2021

Hey @rcitton, @brokedba,

Can this issue be closed?

@brokedba
Copy link
Author

brokedba commented Jun 4, 2021

yes you can , but I wish Github can display the closed ones by default or when an issue has a fix it would recorded somewhere so people won't open duplicate question again .

@manowar689
Copy link

manowar689 commented Oct 19, 2021

I am experiencing the same issue also, using Vagrant and I have the following output after a long wait time:

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_FAIL
VBoxManage.exe: error: Failed to create the host-only adapter
VBoxManage.exe: error: Querying NetCfgInstanceId failed (0x00000002)
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

one of the guys on the team has a project and this means that I cannot assist him on this as I have the issue above, its my work laptop and I have tried everything from removing Hyper-V, uninstalling the Hyper-V interface in device management, My personal laptop works fine with this however.

Edit: I have since realized that I have Crowdstrike Falcon Sensor installed as my AV and as such I think this is blocking the creation of the host only interface and I don't have the ability to disable albeit temporarily even to test, but I assume this is why I am receiving the message above, if anyone can confirm that would be great.

@rcitton
Copy link
Member

rcitton commented Nov 15, 2021

closing with workaround defined as "brokedba commented on Aug 2, 2020" above:

PS C:\Users\brokedba> bcdedit /set hypervisorlaunchtype off The operation completed successfully.

@rcitton rcitton closed this as completed Nov 15, 2021
@JR2Media
Copy link

Same issue here, Windows 11. In my case I get the UAC dialogs, select yes as usual, but still hangs.

Bringing machine 'default' up with 'virtualbox' provider...
==> default: Box 'ubuntu/focal64' could not be found. Attempting to find and install...
    default: Box Provider: virtualbox
    default: Box Version: >= 0
==> default: Loading metadata for box 'ubuntu/focal64'
    default: URL: https://vagrantcloud.com/ubuntu/focal64
==> default: Adding box 'ubuntu/focal64' (v20211026.0.0) for provider: virtualbox
    default: Downloading: https://vagrantcloud.com/ubuntu/boxes/focal64/versions/20211026.0.0/providers/virtualbox.box
Download redirected to host: cloud-images.ubuntu.com
    default:
==> default: Successfully added box 'ubuntu/focal64' (v20211026.0.0) for 'virtualbox'!
==> default: Importing base box 'ubuntu/focal64'...
==> default: Matching MAC address for NAT networking...
==> default: Checking if box 'ubuntu/focal64' version '20211026.0.0' is up to date...
==> default: Setting the name of the VM: jr2-wp_default_1639918355820_8287
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

Stderr: 0%...
Progress state: E_FAIL
VBoxManage.exe: error: Failed to create the host-only adapter
VBoxManage.exe: error: Querying NetCfgInstanceId failed (0x00000002)
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

@JR2Media
Copy link

Fixed by downgrading to 6.1.28

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

No branches or pull requests

7 participants