At present I use Macintosh laptops on which I like to keep a current
version of Ubuntu server, installed as a guest OS on VirtualBox. For
maximum efficiency and minimum waste of CPU time, I run the server from
the command line (using vboxmanage startvm
) and then ssh
into the
server as needed.
Sometimes a normally well-behaved VM spontaneously refuses to run,
generating the strange error VERR_INTNET_FLT_IF_NOT_FOUND
, which is
undocumented in the User Manual that comes with VirtualBox.
If running the VirtualBox GUI, the error typically looks like this, for a VM named himself
:
Failed to open a session for the virtual machine himself.
Failed to open/create the internal network
'HostInterfaceNetworking-en2: USB Ethernet 2'
(VERR_INTNET_FLT_IF_NOT_FOUND).
Failed to attach the network LUN
(VERR_INTNET_FLT_IF_NOT_FOUND).
Result Code: NS_ERROR_FAILURE (0x80004005)
Component: Console
Interface: IConsole {1968b7d3-e3bf-4ceb-99e0-cb7c913317bb}
At the command line, the error typically looks like this:
vboxmanage: error: Failed to open/create the internal network 'HostInterfaceNetworking-en2: USB Ethernet 2' (VERR_INTNET_FLT_IF_NOT_FOUND).
VBoxManage: error: Failed to attach the network LUN (VERR_INTNET_FLT_IF_NOT_FOUND)
VBoxManage: error: Details: code NS_ERROR_FAILURE (0x80004005), component Console, interface IConsole, callee
The solution is to reset the networking settings for the VM. I use the following:
vboxmanage modifyvm himself --nic1 bridged --bridgeadapter1 en1
where nic1
resets the networking mode to "internal card 1"
(the indices appended to nic
and other options start at 1) and
bridgeadapter1
resets the first adapter to en1
, which is normally
ethernet on my system, although it is best to check and make sure
because it is sometimes en0
. This Bridge Adapter setting is what
sometimes seems to change without apparent actions on my part. Note that
the bridgeadapter1
option has no effect without the nic
option.
Simple headless start-up from the command line looks like this:
prompt$ vboxheadless -startvm himself`
Waiting for VM "himself" to power on...
VM "himself" has been successfully started.
prompt$
The additional option --vrde=off
prevents running the standard remote
display protocol server, which does not seem to be necessary for
anything I do on my system.
For more information: The sections "Bridged Networking" and "Internal Networking" of the User Manual are useful to read. For command-line option, see the "Commands Overview" section.
Edit: I have added more information on configuring VirtualBox from the command line in another post.
[end]