I am tying to install laravel/homestead i went through the docs
and at the final stage am having this issues this is my code.
➜ Homestead git:(master) ✗>vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
/opt/vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/environment.rb:410:in `initialize': Permission denied - /home/ubilli/.vagrant.d/data/lock.machine-action-0edeb9a5c0c9e5108f108257c012b604.lock (Errno::EACCES)
from /opt/vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/environment.rb:410:in `open'
from /opt/vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/environment.rb:410:in `block in lock'
from /opt/vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/environment.rb:434:in `lock'
from /opt/vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/environment.rb:409:in `lock'
from /opt/vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/machine.rb:161:in `call'
from /opt/vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/machine.rb:161:in `action'
from /opt/vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/batch_action.rb:82:in `block (2 levels) in run'
➜ Homestead git:(master) ✗>sudo vagrant up
[sudo] password for ubilli:
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Box 'laravel/homestead' could not be found. Attempting to find and install...
default: Box Provider: virtualbox
default: Box Version: >= 0
The box 'laravel/homestead' could not be found or
could not be accessed in the remote catalog. If this is a private
box on Vagrant Cloud, 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://vagrantcloud.com/laravel/homestead"]
Error: Couldn't resolve host 'vagrantcloud.com'
➜ Homestead git:(master) ✗>sudo vagrant up
this is my homestead.yaml file what can i do to correct this issue.
---
ip: "192.168.10.10"
memory: 2048
cpus: 1
authorize: /home/ubilli/.ssh/id_rsa.pub
keys:
- /home/ubilli/.ssh/id_rsa
folders:
- map: /home/ubilli/laravel4app
to: /var/www/laravel
sites:
- map: homestead.app
to: /home/vagrant/Code/Laravel/public
variables:
- key: APP_ENV
value: local
I would start by checking the permissions of this directory (/home/ubilli) since it seems you can't write to it:
Permission denied - /home/ubilli/.vagrant.d/
This has happened to me where my own home directory has changed to root ownership. Try:
sudo chown -R ubilli:ubilli /home/ubilli/
To reset your whole directory back to the user account. Vagrant needs to write to that directory since that is where it downloads the box file to.
Related
I have the latest version of vagrant, I added a homestead box via vagrant box add laravel/homestead, I checked out the latest homestead from github via
git clone https://github.com/laravel/homestead.git homestead
cd homestead
git checkout release
but when I do vagrant up it cannot find the v10.1.1 box and tries to download v9.7.2 instead.
>vagrant -v
Vagrant 2.2.14
>vagrant box update
==> homestead: Checking for updates to 'laravel/homestead'
homestead: Latest installed version: 10.1.1
homestead: Version constraints: ~> 9
homestead: Provider: virtualbox
==> homestead: Box 'laravel/homestead' (v10.1.1) is running the latest version.
>vagrant box list
laravel/homestead (virtualbox, 10.1.1)
>vagrant up
Bringing machine 'homestead' up with 'virtualbox' provider...
==> homestead: [vagrant-hostsupdater] Checking for host entries
==> homestead: [vagrant-hostsupdater] found entry for: 192.168.10.10 homestead
==> homestead: [vagrant-hostsupdater] found entry for: 192.168.10.10 laravel.test
==> homestead: Box 'laravel/homestead' could not be found. Attempting to find and install...
homestead: Box Provider: virtualbox
homestead: Box Version: ~> 9
==> homestead: Loading metadata for box 'laravel/homestead'
homestead: URL: https://vagrantcloud.com/laravel/homestead
==> homestead: Adding box 'laravel/homestead' (v9.7.2) for provider: virtualbox
homestead: Downloading: https://vagrantcloud.com/laravel/boxes/homestead/versions/9.7.2/providers/virtualbox.box
==> homestead: Box download is resuming from prior download progress
I see that I can use version: 10.1.1 in my Homestead.yaml but why is vagrant trying to get v9 instead of using v10 I have?
The default setting in the laravel/homstead project is using the version 9.
So you have to modify the following setting in /Users/(name)/Homestead/scripts/homestead.rb
config.vm.box_version = settings['version'] ||= '~> 9'
to
config.vm.box_version = settings['version'] ||= '>= 10.1.1'
After saving the changes, you can start the box with:
vagrant up
I just downloaded Vagrant and did the settings as well as install virtual box. I just can't start my project (vagrant up). I have a vagrant file and so on. What can I do?
$ vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Box 'scotch/box' could not be found. Attempting to find and install
...
default: Box Provider: virtualbox
default: Box Version: >= 0
The box 'scotch/box' 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/scotch/box"]
There seems to be an issue with vagrant 1.8.7 and the embedded curl version vs the mac os binary (shipped by default on mac os Sierra and others) - remove the embedded one
sudo rm /opt/vagrant/embedded/bin/curl
Note: you also need to remove the embedded curl when you add a vagrant box (remotely or locally) so if you get the same error when running vagrant box add .... just remove the curl from vagrant and it will work
Just wanted to update this post. I ran into this error running macOS Sierra and a fresh Vagrant 1.8.7 install and noticed Vagrant just updated. As of Vagrant 1.9.0 this error appears to have been fixed.
Had a similar problem with Sierra (with additional brew installs - which granted could have an impact).
Above sudo rm /opt/vagrant/embedded/bin/curl did not work still got: SSLRead() return error -36.
Tried suggestion from http://slick.pl/kb/software/vagrant-fix-for-error-60-ssl-read/
Any case:
cd ~
cd .vagrant.d/tmp/
rm -rf ~/.vagrant.d/tmp/
vagrant box add --insecure laravel/homestead
Installed successfully.
I just experienced this error.
In my case I installed vagrant via apt-get which installed 1.7.x..
I removed 1.7.x and installed 2.0.3 directly https://www.vagrantup.com/downloads.html
I had this same problem on MacOS Mojave, and Vagrant version 1.9.3, when trying to use the box: centos/7.
$ vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Box 'centos/7' could not be found. Attempting to find and install...
default: Box Provider: virtualbox
default: Box Version: >= 0
The box 'centos/7' 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/centos/7"]
Error: The requested URL returned error: 404 Not Found
I updated to Vagrant 2.2.5 and it worked as expected:
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Box 'centos/7' could not be found. Attempting to find and install...
default: Box Provider: virtualbox
default: Box Version: >= 0
==> default: Loading metadata for box 'centos/7'
default: URL: https://vagrantcloud.com/centos/7
==> default: Adding box 'centos/7' (v1902.01) for provider: virtualbox
default: Downloading: https://vagrantcloud.com/centos/boxes/7/versions/1902.01/providers/virtualbox.box
default: Download redirected to host: cloud.centos.org
==> default: Successfully added box 'centos/7' (v1902.01) for 'virtualbox'!
You should try update Vagrant to the latest version:
sudo add-apt-repository ppa:tiagohillebrandt/vagrant
sudo apt update
This will add a repository for your actual ubuntu version. If you are on 20.10 (groovy) replace groovy with focal and call sudo apt update again.
Then install vagrant again:
sudo apt install vagrant
And update all plugins:
vagrant plugin update
I am trying to use vlad to install drupal using vagrant on windows.
I installed vagrant.
I have installed Cygwin using babun and finally I got to install ansible.
When vagrant up I get : "Only one of path or inline may be set" error.
{ vlad-master } » vagrant up ~/vlad-master 1
Found project settings file: C:/Users/maggie/.babun/cygwin/home/maggie/vlad-master/vlad_guts/vlad_settings.yml
Bringing machine 'vlad' up with 'virtualbox' provider...
==> vlad: Running triggers before up...
==> vlad: Executing pre 'provision' setup trigger
==> vlad: Executing command "ansible-galaxy install -r vlad_guts/playbooks/requirements.yml --force"...
==> vlad: - extracting aberdeencloud_cli to /home/maggie/vlad-master/vlad_guts/playbooks/ext_roles/aberdeencloud_cli
==> vlad: - aberdeencloud_cli was installed successfully
==> vlad: - extracting pantheon_cli to /home/maggie/vlad-master/vlad_guts/playbooks/ext_roles/pantheon_cli
==> vlad: - pantheon_cli was installed successfully
==> vlad: - extracting imagemagick to /home/maggie/vlad-master/vlad_guts/playbooks/ext_roles/imagemagick
==> vlad: - imagemagick was installed successfully
==> vlad: - extracting sendmail to /home/maggie/vlad-master/vlad_guts/playbooks/ext_roles/sendmail
==> vlad: - sendmail was installed successfully
==> vlad: - extracting tomcat to /home/maggie/vlad-master/vlad_guts/playbooks/ext_roles/tomcat
==> vlad: - tomcat was installed successfully
==> vlad: - extracting solr to /home/maggie/vlad-master/vlad_guts/playbooks/ext_roles/solr
==> vlad: - solr was installed successfully
==> vlad: - adding dependency: hashbangcode.tomcat
==> vlad: - extracting drush to /home/maggie/vlad-master/vlad_guts/playbooks/ext_roles/drush
==> vlad: - drush was installed successfully
==> vlad: - extracting platformsh_cli to /home/maggie/vlad-master/vlad_guts/playbooks/ext_roles/platformsh_cli
==> vlad: - platformsh_cli was installed successfully
==> vlad: - downloading role 'tomcat', owned by hashbangcode
==> vlad: - downloading role from https://github.com/hashbangcode/ansible-role-tomcat/archive/master.tar.gz
==> vlad: - extracting hashbangcode.tomcat to /home/maggie/vlad-master/vlad_guts/playbooks/ext_roles/hashbangcode.tomcat
==> vlad: - hashbangcode.tomcat was installed successfully
==> vlad: Command execution finished.
==> vlad: Executing 'up' setup trigger
==> vlad: Creating C:/Users/maggie/.babun/cygwin/home/maggie/vlad-master/vlad_guts/host.ini
There are errors in the configuration of this machine. Please fix
the following errors and try again:
shell provisioner:
* Only one of `path` or `inline` may be set.
Read the vagrant shell provisioning documentation
The shell provisioner takes various options. One of inline or path is
required:
inline (string) - Specifies a shell command inline to execute on the
remote machine. See the inline scripts section below for more
information.
path (string) - Path to a shell script to upload and execute. It can
be a script relative to the project Vagrantfile or a remote script
(like a gist).
so you can either have
Vagrant.configure("2") do |config|
config.vm.provision "shell",
inline: "echo Hello, World"
end
or
Vagrant.configure("2") do |config|
config.vm.provision "shell", path: "script.sh"
end
You can review your shell provisioner form your Vagrantfile and make sure the provisioner does not have path and inline within the same block, it must be one or the other
I have this configuration of my host machine:
hedin#home:~/123$ lsb_release -rcd
Description: Ubuntu 14.04.5 LTS
Release: 14.04
Codename: trusty
hedin#home:~/123$ vagrant -v
Vagrant 1.7.2
I'm trying to deploy my guest with ansible_local provision. This is my Vagrant file:
Vagrant.configure("2") do |config|
config.vm.box = "ubuntu/trusty64"
# Run Ansible from the Vagrant VM
config.vm.provision "ansible_local" do |ansible|
ansible.playbook = "playbook.yml"
end
end
When I try to deploy it I receiving this output:
hedin#home:~/123$ vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
There are errors in the configuration of this machine. Please fix
the following errors and try again:
vm:
* The '' provisioner could not be found.
How can I fix this?
Vagrant v1.7 versions have a bug causing this:
$ sudo dpkg -i ./vagrant_1.7.4_x86_64.deb
(Reading database ... 57030 files and directories currently installed.)
Preparing to unpack ./vagrant_1.7.4_x86_64.deb ...
Unpacking vagrant (1:1.7.4) over (1:1.7.3) ...
Setting up vagrant (1:1.7.4) ...
$ vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
There are errors in the configuration of this machine. Please fix
the following errors and try again:
vm:
* The 'ansible_local' provisioner could not be found.
Upgrade to the current version 1.8.5 (or at least 1.8.0):
$ sudo dpkg -i vagrant_1.8.0_x86_64.deb
(Reading database ... 57030 files and directories currently installed.)
Preparing to unpack vagrant_1.8.0_x86_64.deb ...
Unpacking vagrant (1:1.8.0) over (1:1.7.4) ...
Setting up vagrant (1:1.8.0) ...
$ vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Importing base box 'ubuntu/trusty64'...
==> default: Matching MAC address for NAT networking...
==> default: Checking if box 'ubuntu/trusty64' is up to date...
Vagrant won't mount folders. Tried so many solutions, nothing worked.
Versions: Vagrant 1.8.1 / Ubuntu 15.10 / Virtualbox 5.0.16
vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Checking if box 'ubuntu/wily64' is up to date...
==> 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: Adapter 2: hostonly
==> default: Forwarding ports...
default: 22 (guest) => 2222 (host) (adapter 1)
==> default: Running 'pre-boot' VM customizations...
==> default: Booting VM...
==> default: Waiting for machine to boot. This may take a few minutes...
default: SSH address: 127.0.0.1:2222
default: SSH username: vagrant
default: SSH auth method: private key
default: Warning: Remote connection disconnect. Retrying...
default: Warning: Remote connection disconnect. Retrying...
==> default: Machine booted and ready!
GuestAdditions 5.0.16 running --- OK.
==> default: Checking for guest additions in VM...
==> default: Configuring and enabling network interfaces...
==> default: Mounting shared folders...
default: /vagrant => C:/Users/User/www/magento-box
default: /vagrant-magento-box-folder => C:/Users/User/www/magento-box-folder
Failed to mount folders in Linux guest. This is usually because
the "vboxsf" file system is not available. Please verify that
the guest additions are properly installed in the guest and
can work properly. The command attempted was:
mount -t vboxsf -o uid=`id -u vagrant`,gid=`getent group www-data | cut -d: -f3`,dmode=775, fmode=664 vagrant-magento-box-folder /vagrant-magento-box-folder
mount -t vboxsf -o uid=`id -u vagrant`,gid=`id -g www-data`,dmode=775, fmode=664 vagrant-magento-box-folder /vagrant-magento-box-folder
The error output from the last command was:
mesg: ttyname failed: Inappropriate ioctl for device
In Vagrantfile.config.yml synced folders:
synced_folder:
host_path: "/Users/User/www/magento-box-folder"
guest_path: "/vagrant-magento-box-folder/"
Vagrantfile
require 'yaml'
vagrantConfig = YAML.load_file 'Vagrantfile.config.yml'
Vagrant.configure(2) do |config|
config.vm.box = "ubuntu/trusty64"
config.vm.network "private_network",
ip: vagrantConfig['ip']
config.vm.synced_folder "#{vagrantConfig['synced_folder']['host_path']}",
"#{vagrantConfig['synced_folder']['guest_path']}",
owner: "vagrant",
group: "www-data",
mount_options:["dmode=775, fmode=664"]
# VirtualBox specific settings
config.vm.provider "virtualbox" do |vb|
vb.gui = false
vb.memory = "2048"
vb.cpus = 2
end
In vagrant ssh I did
sudo ln -s /opt/VBoxGuestAdditions-5.0.16/lib/VBoxGuestAdditions /usr/lib/VBoxGuestAdditions
I replaced VBoxGuestAdditions.iso in tmp
Copy iso fileC:\Program Files/Oracle/VirtualBox/VBoxGuestAdditions.iso into the box /tmp/VBoxGuestAdditions.iso
Installed vbguest. Have no idea how to solve it..
Here is one important reason why error occurred vagrant up
If you use Virtual Box to Vagrant's provider, you have to reinstall 'Guest Additions' that everytime you create virtual machine's kernel.
vbguest plugin is a good solution for solving this issue.
( about vbguest plugin - https://github.com/dotless-de/vagrant-vbguest )
first, you have to install vbguest plugin.
$ vagrant plugin install vagrant-vbguest
and run Vagrant
$ vagrant halt
$ vagrant up
or use too
vagrant reload
This seems to be a problem with vagrant <= 1.8.4. I did an update to the latest vagrant version (in my case 1.9.3) and everything seems fine again.
Get the latest vagrant version here:
https://www.vagrantup.com/docs/installation/upgrading.html
2.
vagrant halt
3. Install upgrade.
4.
vagrant up