Vagrant is not able to halt / reload after the initial vagrant up (ie the one where the vm is provisioned). The initial vagrant up completes correctly, however after that I am not able to do the vagrant halt or reload.
The error message that I am getting is
==> default: Attempting graceful shutdown of VM...
The following SSH command responded with a non-zero exit status.
Vagrant assumes that this means the command failed!
shutdown -h now
Stdout from the command:
Stderr from the command:
stdin: is not a tty
bash: line 2: syntax error near unexpected token `||'
bash: line 2: `export SSH_AUTH_SOCK= || ||'
List of vagrant plugin I am using
- vagrant-proxyconf (1.5.2)
- vagrant-share (1.1.5, system)
Vagrant version is 1.8.1
Virtualbox [provider] version 4.3.34r104062
Host OS : Windows 7 Enterprise
I have tried re-installing, all the components, destroying the VMs, deleting the config files [ie ~/.VirtualBox & ~/.vagrant.d]
Please help me in resolving the issue
This is not the fix.
The error went away when I again downloaded the code base from github.
Related
I am trying to set up vagrant for kong. I have installed VirtualBox and vagrant. But when i run 'vgrant up' i encounter the below issue:
Bringing machine 'default' up with 'virtualbox' provider...
There was an error while executing `VBoxManage`, a CLI used by Vagrant
for controlling VirtualBox. The command and stderr is shown below.
Command: ["list", "hostonlyifs"]
Stderr: VBoxManage: error: Failed to create the VirtualBox object!
VBoxManage: error: Code NS_ERROR_FACTORY_NOT_REGISTERED (0x80040154) - Class not registered (extended info not available)
I have searched for this error with no much luck.
I am using centos 7.4 and the kernel version is 3.10.0-693.21.1.el7.x86_64.
I have downloaded the relevant gcc, devel and dkms. In short followed the link https://tecadmin.net/install-oracle-virtualbox-on-centos-redhat-and-fedora/
Any tip is appreciated.
Thanks
Dinah
This is most likely a problem with your VirtualBox install, not Vagrant. To confirm this, you should receive the same error when running: VBoxManage list vms
A common reason for this error are when /tmp is full or has the incorrect permissions.
To check if /tmp is full try df -h
To fix permissions on /tmp if they're incorrect, try sudo chmod ug-s /tmp && sudo rm -rf /tmp/.vbox*
Apparently we were trying this on a VM. And Vagrant tries to spin up another VM. So having a VM spun within a VM is causing the issue.
After first running vagrant up in my homestead directory my computer bluescreened because Hyper-V was enabled. Now after disabling Hyper-V and running vagrant up I get this error:
There was an error while executing `VBoxManage`, a CLI used by Vagrant
for controlling VirtualBox. The command and stderr is shown below.
Command: ["showvminfo","\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"]
Stderr:
I have the latest Version of Vagrant and VirtualBox installed.
To solve this problem, you need to delete the folder .vagrant in the root directory of your project.
Then run the command vagrant up again.
I'm trying to get Laravel Homestead set up on my mac. I am at the part where I run vagrant up and this is the error message I am receiving:
==> homestead-7: Failed to restart php7.0-fpm.service: Unit php7.0-fpm.service not found.
The SSH command responded with a non-zero exit status. Vagrant
assumes that this means the command failed. The output for this command
should be in the log above. Please read the output to determine what went wrong.
Anyone have any ideas?
Share on your folders files with "7.1" and change it to "5.0"
I'm trying to use Laravel Homestead for a Laravel 4.2.9 project. Here's what I'm running:
Windows 8.1 64-bit
VirtualBox 4.3.17
Vagrant 1.6.5
Latest Homestead version
When running the box with vagrant up for the first time or issuing the vagrant provision command, I get this:
==> default: Running provisioner: shell...
default: Running: inline script
==> default: /tmp/vagrant-shell: line 1: /home/vagrant/.ssh/$2: ambiguous redirect
The SSH command responded with a non-zero exit status. Vagrant
assumes that this means the command failed. The output for this command
should be in the log above. Please read the output to determine what
went wrong.
Contents of /tmp/vagrant-shell on the box:
echo "$1" > /home/vagrant/.ssh/$2 && chmod 600 /home/vagrant/.ssh/$2
This seems to be affecting nginx configuration as there is no default server conf and it's not listening on port 80 as expected. Presumably the provisioning script would handle that if it was able to proceed.
What might be causing this to happen?
I had the same problem and changed file homestead.rb in "scripts" directory by adding additional quotation marks and backslash around "$2".
s.inline = "echo \"$1\" > /home/vagrant/.ssh/\"$2\" && chmod 600 /home/vagrant/.ssh/\"$2\""
This is the first time I'm using Vagrant, trying to get a debian machine set up with Java, Elasticsearch and Nginx!
But I can't provision my vm. Here is the issue I have:
==> default: Running provisioner: chef_solo...
Generating chef JSON and uploading...
Running chef-solo...
stdin: is not a tty
bash: /usr/bin/chef-solo: /usr/bin/ruby: bad interpreter: No such file or directory
Chef never successfully completed! Any errors should be visible in the
output above. Please fix your recipes so that they properly complete.
I don't know why it keeps telling me that chef-solo and ruby are located at those places because it's not the case. Is it on the client machine or on the host machine ?
I tried to change locations but didn't change the error message.
Here is my Vagrantfile
Any idea guys?