Change in vagrant requires removal of saved state in VirtualBox - vagrant

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?

Related

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.

VirtualBox/Vagrant stopped working after Windows 10 Creators Update

I was happily using Vagrant with VirtualBox for my laravel projects (Homestead) but after the Creators Update for Windows 10, VirtualBox stopped working - vagrant up was not throwing any errors and I was even able to vagrant ssh successfully but my web projects were unreachable from the browser.
Initially I was using VirtualBox v.5.1.14 but decided to update to the latest (which is v.5.1.22) - no luck whatsoever, so after reading the answers from this thread I've downgraded to v.5.0.38
Now when I try to vagrant up this error is shown:
vagrant up
Bringing machine 'homestead-7' up with 'virtualbox' provider...
==> homestead-7: Checking if box 'laravel/homestead' is up to date...
==> homestead-7: Resuming suspended VM...
==> homestead-7: 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", "e5ac5ef8-07fa-412f-b59c-bfd745db047e", "--type", "headless"]
Stderr: VBoxManage.exe: error: Failed to load unit 'cpum' (VERR_INVALID_FLAGS)
VBoxManage.exe: error: Details: code E_FAIL (0x80004005), component ConsoleWrap, interface IConsole
p.s. I've already set Host-Only Network Adapter through preferences in VirtualBox
What I did to resolve the issue was to "plug off" my virtual machine's state using discard, hoping not to lose any information... Now I'm on VirtualBox v.5.1.14 and will stick with it until all things work.
I had to update to Virtualbox Version 5.2 to get my boxes running again.
and also need to reinstall git for windows 2.15.1.2-64 bit and select the option "use windows default console" (cmd.exe) instead of "MinTTY"
With MinTTY the command :
vagrant ssh
will not show the bash command line.
using windows default Console worked.
see more possibe workarounds to this piont also in this git issue
My Working env:
- Windows 10 - 1709 - Build 16299.125
- vagrant 2.0.1
- virtualbox 5.2.0
- git for windows 2.15.1.2. 64 bit
Turning off Hyper-V solved my problem.
Solution:
Control Panel -> Turn Windows Feature on or Off -> Uncheck Hyper-V
I had the same problem. My vagrant up stopped working after the Windows Fall Creators Update (1709). It worked after I turned off Hyper-V.
Current Working Environment:
- Windows 10 (1709)
- Vagrant 1.9.7
- VirtualBox 5.1.32

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 error with windows 10

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

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