Vagrant up error with windows 10 - vagrant

After upgrading to windows 10 I have been having trouble getting my vagrant box to work. I tried following the steps at this link fix vagrant issue with windows 10 but still could not get it to work. The steps were also not documented very well so I could have done something wrong. Does someone have a work around to fix this issue?
$vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Importing base box 'TLWPLGZN'...
==> default: Matching MAC address for NAT networking...
==> default: Setting the name of the VM: UMUWXLAR
==> 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_FAIL
VBoxManage.exe: error: Failed to create the host-only adapter
VBoxManage.exe: error: Code E_FAIL (0x80004005) - Unspecified error (extended info not available)
VBoxManage.exe: error: Context: "int __cdecl handleCreate(struct HandlerArg *,int,int *)" at line 66 of file VBoxManageHostonly.cpp

Virual Box has released a patch that when ran while loading your virtual machine allows virtualbox to correctly establish its network adapter in windows 10

Related

Change in vagrant requires removal of saved state in VirtualBox

I am running Vagrant 2.2.2 on a MacBook Pro, with VirtualBox, Version 6.0.4 r128413. A Mac update cascaded a need to update these about 2 months ago.
When I enter vagrant status it says "saved". If I run vagrant up the following results:
My-MBP:vbox4 oliverwilliams$ vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Resuming suspended VM...
==> default: 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", "894fe7ac-8c87-4c18-8afa-4b24b6268f19", "--type", "headless"]
Stderr: VBoxManage: error: Failed to load unit 'lsilogicscsi' (VERR_SSM_LOADED_TOO_LITTLE)
VBoxManage: error: Details: code NS_ERROR_FAILURE (0x80004005), component ConsoleWrap, interface IConsole
I can "Discard Saved State" and then do vagrant up and it works but that's a pain. I opened the VirtualBox UI, went to Machine > Settings, and under storage (after I discarded saved state but not before), I see Controller:SCSI - no option to change to SATA:AHCI as this post suggests: https://www.virtualbox.org/ticket/18263.
How do I fix this so a saved state can be stored without having to discard it?

Windows/Vagrant:There was an error while executing `VBoxManage`,

I vagrant box file that was packaged on a Macbook. I transferred the file into Windows on my Surface Book and getting some permission error.
To fix this, other people suggested to enable virtualization and disable Hyper-V, which I have done already. After I tried this, I'm still getting the same problem, my VM can't be power on.
Please also see my attached screen capture.
jacky#DESKTOP-F0E0NKI MINGW64 ~/vm
$ vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Clearing any previously set forwarded ports...
==> default: Clearing any previously set network interfaces...
==> default: Preparing network interfaces based on configuration...
default: Adapter 1: nat
==> default: Forwarding ports...
default: 22 (guest) => 2222 (host) (adapter 1)
==> default: 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", "47187f36-41f2-4941-9f1d-3930bc011f0f", "--type", "headless"]
Stderr: VBoxManage.exe: error: RawFile#0 failed to create the raw output file /Users/yuh8/vm/ubuntu-xenial-16.04-cloudimg-console.log (VERR_PATH_NOT_FOUND)
VBoxManage.exe: error: Details: code E_FAIL (0x80004005), component ConsoleWrap, interface IConsole
jacky#DESKTOP-F0E0NKI MINGW64 ~/vm
$
Don't remove .vagrant, always use vagrant destroy or vagrant destroy -f to start from the scratch.
Disable HyperV.
Reinstall Virtualbox (repair installation).
Reinstall Vagrant (repair installation).
Go to C:\Program Files\Oracle\VirtualBox\drivers\vboxdrv → right click on VBoxDrv.inf → select Install.
Execute sc start vboxdrv
Execute vagrant up.

Homestead up failing after Mac OSx El Capitan Upgrade

Everything was working fine prior to an upgrade to Mac OSx El Cap. Now when I run homestead up to boot my laravel projects, I get this error.
> $ homestead up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Checking if box 'laravel/homestead' is up to date...
==> default: A newer version of the box 'laravel/homestead' is available! You currently
==> default: have version '0.2.2'. The latest is version '0.3.0'. Run
==> default: `vagrant box update` to update.
==> 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: NS_ERROR_FAILURE
VBoxManage: error: Failed to create the host-only adapter
VBoxManage: error: VBoxNetAdpCtl: Error while adding new interface: failed to open /dev/vboxnetctl: No such file or directory
VBoxManage: error: Details: code NS_ERROR_FAILURE (0x80004005), component HostNetworkInterface, interface IHostNetworkInterface
VBoxManage: error: Context: "int handleCreate(HandlerArg*, int, int*)" at line 66 of file VBoxManageHostonly.cpp

Vagrant up after upgrade to Windows 10

I am trying to vagrant up after my recent upgrade to windows 10, and I get an error:
==> 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_FAIL
VBoxManage.exe: error: Failed to create the host-only adapter
VBoxManage.exe: error: Code E_FAIL (0x80004005) - Unspecified error (extended info not available)
VBoxManage.exe: error: Context: "int __cdecl handleCreate(struct HandlerArg *,int,int *)" at line 66 of file VBoxManageHostonly.cpp
Before the upgrade it worked fine, has anyone figured out how to fix this?
This is how I got my Vagrant to finally work on Windows10:
Uninstall both VirtualBox and Vagrant (backup the old vagrantmachines)
Download and install VirtualBox and the latest Vagrant
There is a released fix for virtual box on https://www.virtualbox.org/ticket/14040
For those using homestead a solution can be found on https://laracasts.com/discuss/channels/general-discussion/windows-10-vagrant-virtualbox-homestead
For some reason the VirtualBox Host-Only Ethernet Adapter was removed once the upgrade to Windows 10 was completed. Removing, rebooting and installing VirtualBox resulted in the installation of the removed Ethernet adapters again and the issue has been solved.
Another fix is to add name: "VirtualBox Host-Only Ethernet Adapter" after config.vm.network in your Vagrant file. In my case:
config.vm.network "private_network", ip: "192.168.33.10", name: "VirtualBox Host-Only Ethernet Adapter"
Vagrant, Virtual Box 4.3
I have upgraded today from Windows 7 Professional to Windows 10.
When I was trying to boot a VM (Laravel Homestead) using vagrant it doesn't start.
I installed VirtualBox and Vagrant (without uninstall and reboot the machine) and then I reboot the machine. Once I did this the VM starts correctly.

vagrant package command fails

I am trying to create a vagrant box of a VirtualBox Ubuntu VM on my MacBook Pro. When I run the command I get an error that I don't understand. I've tried rebuilding the virtual machine. I've tried different virtual machines in different states. I keep hitting this brick wall.
It looks like VBoxManage tries to create a temporary file for the package process, but the file can't be written for some reason. This also happened on my Ubuntu laptop. So that's really interesting and makes me wonder if it is a problem with VBoxManage itself, however, it doesn't seem that many people are having this specific issue (though the error code "code VBOX_E_FILE_ERROR (0x80bb0004)" is relatively common.)
Here is the output of my command:
earthmant$ vagrant package --base 64precise6
==> 64precise6: Attempting graceful shutdown of VM...
64precise6: Guest communication could not be established! This is usually because
64precise6: SSH is not running, the authentication information was changed,
64precise6: or some other networking issue. Vagrant will force halt, if
64precise6: capable.
==> 64precise6: Forcing shutdown of VM...
==> 64precise6: Exporting VM...
There was an error while executing `VBoxManage`, a CLI used by Vagrant
for controlling VirtualBox. The command and stderr is shown below.
Command: ["export", "64precise6", "--output", "/Users/earthmant/.vagrant.d/tmp/1417878317/box.ovf"]
Stderr: 0%...
Progress state: VBOX_E_FILE_ERROR
VBoxManage: error: Appliance write failed
VBoxManage: error: File not accessible or erroneous file contents
VBoxManage: error: Details: code VBOX_E_FILE_ERROR (0x80bb0004), component Appliance, interface IAppliance
VBoxManage: error: Context: "int handleExportAppliance(HandlerArg*)" at line 1121 of file VBoxManageAppliance.cpp
I noticed that a lot of people explicitly state that when you create the VM in VirtualBox, you should use the vmdk file format for the disk. I had used qcow. When I rebuilt the VM with vmdk, vagrant package succeeded.

Resources