VirtualBox Failed to Save Settings

I recently installed VirtualBox configured internet connection to the internet for a virtual windows 7 machine I’ve installed using Vagrant, tried to setup USB, but got the following message: “Failed to save settings – Empty or null HostOnly interface name is not valid.”. Looking at the details, I saw the following “Result Code: E_FAIL (0x80004005) Component: NetworkAdapterWrapper …”.I don’t remember when I started to get that popup message. Couldn’t find any HostOnly adapter using the VirtualBox GUI. Finding the solution in the web is too hard. and I can’t find anything in the user guide either. But, one useful thing I know: in Linux and Unix-like system, I can find configuration files. They are usually found in directories whose names begin with ‘.’. followed by the program’s name or under “${HOME}/.config’ or directories created by the software. This time, the file was found in “${HOME}/VirtualBox VMs/<machine-name>”.
In this case: “${HOME}/VirtualBox VMs/windows7_default_1563689015423_90469/”. In this directory there are files with the suffix ‘.vbox’. They are XML files. In one of them, named “windows7_default_1563689015423_90469.vbox”, I find the following element:

        <Adapter slot="1" MACAddress="08002718154D" cable="true" type="82540EM">
            <InternalNetwork name="intnet"/%gt;
            <NATNetwork name="NatNetwork"/>
          <HostOnlyInterface name="VirtualBox Host-Only Ethernet Adapter #2"/>

Comment it out.
Problem solved.

StackEdit: Markdown Editor

Hello, World!

I am a blog post written in Markdown, and sent from the StackEdit editor.

Do you know those files with suffix ‘.md’? They are markdown documents, and they are easy to write and easy to read because they don’t have to contain HTML tags!

Here’s an example of how to add a link:

Type “[The Example Site](” to get the following link:

The Example Site

This tool can export your document as HTML. sponsors can use this tool to export documents as PDF..

Written with StackEdit.