Strange Vagrant error message: 'Unable to create a host network interface' - networking

I have a Vagrant machine based on VirtualBox that has some problems (see Vagrant crashes depending on physical network). Now I tried running it on another piece of hardware (with OS X Mavericks), and got the following error message:
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: VBoxManage: error: Unable to create a host network interface
VBoxManage: error: Details: code NS_ERROR_FAILURE (0x80004005), component Host,
interface IHost, callee nsISupports
Context: "CreateHostOnlyNetworkInterface (hif.asOutParam(),
progress.asOutParam())" at line 64 of file VBoxManageHostonly.cpp
What does this mean?
For the error to appear I run
$ vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
[default] Clearing any previously set forwarded ports...
[default] Creating shared folders metadata...
[default] Clearing any previously set network interfaces...
… and then it crashes. Any ideas?
Oh, by the way: It's Vagrant 1.3.5 and VirtualBox 4.1.18.

sudo /Library/StartupItems/VirtualBox/VirtualBox restart
worked for me, see https://coderwall.com/p/ydma0q

The popular answer seems to be modprobe vboxnetadp (for Linux) or /Library/StartupItems/VirtualBox/VirtualBox restart (for Mac).
However, the fix for me was to add myself to the vboxusers group and relogin.

Related

OpenStack VM File System Error on reboot and nova rescue Cannot rescue a volume-backed instance (HTTP 400)

Openstack VM's File system went into read-only mode and rebooted it. After the reboot I'm getting grub menu and auto booting from the Kernel and seeing only blank screen in Openstck dashboard console.
I tried nova rescue but failed with below error,
cannot be rescued: Cannot rescue a volume-backed instance (HTTP 400)
I did edited the grub and enetered single/rescue mode to fix the file system error but still I'm getting blank screen after ctrl+x in grub edit.
I want to bring up the vm instance and how do I fix the file system error.
File system error happened as of vm's backend storage, ceph sds node's all went down as of power failure and restored back.
I'm using RHOSP 13 and VM's image is RHEL 7.
I did alternate way to get into rescue mode and fixed the file system error.
ssh to compute Host of the instance and attach ISO image to the instance as it's backend is KVM (inside the file point the cdrom to ISO image location and boot dev to cdrom using virsh edit)
virsh edit vmname
Make the instance to active state from openstack cli command
nova reset-state --active instancename
Start the VM from compute Host
virsh start vmname
Get into openstack dashboard console and repair the file system accordingly and shutdown the instance
Troubleshooting
Rescue mode
continue to shell
vgscan -v
vgchange -a y
lvscan
e2fsck /dev/xxx or xfs_repair /dev/xxx
From openstack cli start the instance normally after file system fix
nova start instancename

Vagrant & Virtualbox in Windows 10; Error renaming connection

I tried to run a vagrant setup using the latest versions of Vagrant VirtualBox and windows 10 (latest update):
Vagrant 1.8.6
VirtualBox 5.1.8 r111374 (Qt5.5.1)
If I set in my Vagrant file
config.vm.network :private_network, ip: "192.168.33.10"
I get this error:
Error renaming connection:
Cannot rename this connection. A connection with the name you specified already exists. Specify a different name.
Sofar I tried installing/removing both vagrant and virtualbox, I even downgraded and upgraded.. Restarted my compuiter several times, switched off my proxy, followed every crazy hack out there but I always get that error.
I even went to regedit and deleted all the related keys there but no success!
The output of the console:
vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: 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-5.1\src\VBox\Main\src-server\HostNetworkInterfaceImpl.cpp' (74) in long __cdecl HostNetworkInterface::init(class com::Bstr,class com::Bstr,class com::Guid,enum __MIDL___MIDL_itf_VirtualBox_0000_0000_0038).
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 71 of file VBoxManageHostonly.cpp
After some deep researching on this issue, I finally found two things that should be done:
I cleared existing VM machines and deleted those folders C:\Users\{user}\.VirtualBox and C:\Users\{user}\VirtualBox VMs restart the computer.
Whenever I changed the IP address of the machine, I run vagrant halt && vagrant reload && vagrant up --provision
This fixed the issue.

Vagrant - Symfony box not found

I'm getting this error when trying to use the Symfony Vagrant box:
vagrant up --provider virtualbox
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Box 'elao/symfony-standard-debian;' could not be found. Attempting to find and install...
default: Box Provider: virtualbox
default: Box Version: >= 0
The box 'elao/symfony-standard-debian;' could not be found or
could not be accessed in the remote catalog. If this is a private
box on HashiCorp's Atlas, please verify you're logged in via
`vagrant login`. Also, please double-check the name. The expanded
URL and error message are shown below:
URL: ["https://atlas.hashicorp.com/elao/symfony-standard-debian;"]
Error: The requested URL returned error: 404 Not Found
This is using the Vagrant environment here https://atlas.hashicorp.com/elao/boxes/symfony-standard-debian
Seems odd that a box with 14K downloads is giving a 404. Is that really the case or am I doing something wrong?
The commands I'm using are:
vagrant init elao/symfony-standard-debian;
vagrant up --provider virtualbox
Remove the semicolon. Commands to be used:
vagrant init elao/symfony-standard-debian
vagrant up --provider virtualbox

Can't reach localhost on vagrant

On my Macbook I'm using VirtualBox+Vagrant. For Vagrant I downloaded VagrantPress (from vagrantpress.org), which is a Vagrantfile with Wordpress and some Puppet scripts. It looks like this:
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
config.vm.box = "base"
config.vm.box_url = "http://cloud-images.ubuntu.com/vagrant/precise/current/precise-server-cloudimg-amd64-vagrant-disk1.box"
config.vm.network :forwarded_port, guest: 80, host: 8080
config.vm.provision :puppet do |puppet|
puppet.manifests_path = "puppet/manifests"
puppet.module_path = "puppet/modules"
puppet.manifest_file = "init.pp"
puppet.options="--verbose --debug"
end
end
At first, this was running as intended (viewing the Wordpress installation on localhost), but I have it installed on a Dropbox sub-directory, and while trying to get it to work on another computer which runs Ubuntu, I may have changed something that broke the whole setup.
Now, when running 'Vagrant up' on my macbook (which used to run well), I see this:
Bringing machine 'default' up with 'virtualbox' provider...
[default] Clearing any previously set forwarded ports...
[default] Creating shared folders metadata...
[default] Clearing any previously set network interfaces...
[default] Preparing network interfaces based on configuration...
[default] Forwarding ports...
[default] -- 22 => 2222 (adapter 1)
[default] -- 80 => 8080 (adapter 1)
[default] Booting VM...
GuestAdditions versions on your host (4.2.18) and guest (4.1.12) do not match.
Reading package lists...
Building dependency tree...
Reading state information...
dkms is already the newest version.
dkms set to manually installed.
linux-headers-3.2.0-54-generic is already the newest version.
linux-headers-3.2.0-54-generic set to manually installed.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Copy iso file /Applications/VirtualBox.app/Contents/MacOS/VBoxGuestAdditions.iso into the box /tmp/VBoxGuestAdditions.iso
mount: warning: /mnt seems to be mounted read-only.
Installing Virtualbox Guest Additions 4.2.18 - guest version is 4.1.12
Verifying archive integrity... All good.
Uncompressing VirtualBox 4.2.18 Guest Additions for Linux............
VirtualBox Guest Additions installer
You appear to have a version of the VBoxGuestAdditions software
on your system which was installed from a different source or using a
different type of installer. If you installed it from a package from your
Linux distribution or if it is a default part of the system then we strongly
recommend that you cancel this installation and remove it properly before
installing this version. If this is simply an older or a damaged
installation you may safely proceed.
Do you wish to continue anyway? [yes or no]
Cancelling installation.
An error occurred during installation of VirtualBox Guest Additions 4.2.18. Some functionality may not work as intended.
[default] Waiting for machine to boot. This may take a few minutes...
[default] Machine booted and ready!
[default] The guest additions on this VM do not match the installed version of
VirtualBox! In most cases this is fine, but in rare cases it can
cause things such as shared folders to not work properly. If you see
shared folder errors, please update the guest additions within the
virtual machine and reload your VM.
Guest Additions Version: 4.1.12
VirtualBox Version: 4.2
[default] Mounting shared folders...
[default] -- /vagrant
[default] -- /tmp/vagrant-puppet/manifests
[default] -- /tmp/vagrant-puppet/modules-0
and localhost on Chrome says 'No data received'.
After that, I 'Vagrant ssh' and ran:
curl 'http://localhost/'
and get:
cURL Error (7): couldn't connect to host ...
I have been trying to fix this for days now. I even tried reinstalling Vagrant and VirtualBox but it didn't work.
Also, I tried to manually update the Guest Additions (although this was not necessary before), and after getting 'GuestAdditions 4.2.18 running --- OK.' after booting the VM, I still get the same errors for localhost.
What am I doing wrong?
If I understand your setup correctly, you would want to try http://localhost:8080/ on the host system (in order to connect with port 80 on the guest).
Inside the guest OS, are you sure the webserver is running? It might not be starting automatically.
Also, I think you can ignore the Guest Additions version mismatch. It's likely not related to the problem you're seeing.

Arch Linux on VirtualBox network problems

I've installed ArchLinux with VB on MacOS. I have network problems, I cannot resolve addresses. When trying pacman -S htop for example I get the following error :
:: Retrieving packages from extra...
error: failed retrieving file 'htop-1.0-1-x86_64.pkg.tar.xz' from mir1.archlinux.fr : Could not resolve host: mir1.archlinux.fr; Name or service not known
warning: failed to retrieve some files from extra
error: failed to commit transaction (download library error)
Errors occurred, no packages were upgraded.
If I ping mir1.archlinux.fr I get a response. I'm running Network in Nat Mode.
PS: If I run In Bridge Mode I have no problems.
Can someone help me fixing this problem?
Nevermind... disabling ipv6 fixed the problem.!
Check your /etc/resolve.conf or even change for opendns/google DNS.
Then check any domain like:
dig http://stackoverflow.com
finally:
pacman -Syu

Resources