I was trying to install piwik-dev-environment. According to instructions I cloned the repo, installed Vagrant and executed vagrant up. The process ended with the following error:
Error: Could not parse application options: invalid option: --manifestdir
Full logs are here:
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Box 'trusty64' could not be found. Attempting to find and install...
default: Box Provider: virtualbox
default: Box Version: >= 0
==> default: Box file was not detected as metadata. Adding it directly...
==> default: Adding box 'trusty64' (v0) for provider: virtualbox
default: Downloading: https://cloud-images.ubuntu.com/vagrant/trusty/current/trusty-server-cloudimg-amd64-vagrant-disk1.box
default: Progress: 100% (Rate: 1170k/s, Estimated time remaining: --:--:--)
==> default: Successfully added box 'trusty64' (v0) for 'virtualbox'!
==> default: Importing base box 'trusty64'...
==> default: Matching MAC address for NAT networking...
==> default: Setting the name of the VM: piwik-dev-environment_default_1438688840836_21904
==> 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 => 2222 (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: Connection timeout. Retrying...
default:
default: Vagrant insecure key detected. Vagrant will automatically replace
default: this with a newly generated keypair for better security.
default:
default: Inserting generated public key within guest...
default: Removing insecure key from the guest if it's present...
default: Key inserted! Disconnecting and reconnecting using new SSH key...
==> default: Machine booted and ready!
==> default: Checking for guest additions in VM...
==> default: Setting hostname...
==> default: Configuring and enabling network interfaces...
==> default: Mounting shared folders...
default: /vagrant => D:/Git/piwik-dev-environment
default: /etc/puppet/files => D:/Git/piwik-dev-environment/puppet/files
default: /home/vagrant/www => D:/Git/piwik-dev-environment/www
default: /tmp/vagrant-puppet/modules-48bf73244a40076992a5cef90c07f471 => D:/Git/piwik-dev-environment/puppet/modules
default: /tmp/vagrant-puppet/manifests-768747907b90c39ab6f16fcb3320897a => D:/Git/piwik-dev-environment/puppet
==> default: Running provisioner: shell...
default: Running: inline script
==> default: stdin: is not a tty
==> default: Reading package lists...
==> default: Building dependency tree...
==> default: Reading state information...
==> default: ruby is already the newest version.
==> default: 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
==> default: Successfully installed facter-2.4.4
==> default: Successfully installed json_pure-1.8.2
==> default: Successfully installed hiera-3.0.1
==> default: Successfully installed puppet-4.2.1
==> default: 4 gems installed
==> default: Installing ri documentation for facter-2.4.4...
==> default: Installing ri documentation for json_pure-1.8.2...
==> default: Installing ri documentation for hiera-3.0.1...
==> default: Installing ri documentation for puppet-4.2.1...
==> default: Installing RDoc documentation for facter-2.4.4...
==> default: Installing RDoc documentation for json_pure-1.8.2...
==> default: Installing RDoc documentation for hiera-3.0.1...
==> default: Installing RDoc documentation for puppet-4.2.1...
==> default: Successfully installed hiera-3.0.1
==> default: 1 gem installed
==> default: Installing ri documentation for hiera-3.0.1...
==> default: Installing RDoc documentation for hiera-3.0.1...
==> default: Successfully installed hiera-1.3.4
==> default: Successfully installed hiera-puppet-1.0.0
==> default: 2 gems installed
==> default: Installing ri documentation for hiera-1.3.4...
==> default: Installing ri documentation for hiera-puppet-1.0.0...
==> default: Installing RDoc documentation for hiera-1.3.4...
==> default: Installing RDoc documentation for hiera-puppet-1.0.0...
==> default: Running provisioner: puppet...
==> default: Running Puppet with site.pp...
==> default: stdin: is not a tty
==> default: Error: Could not parse application options: invalid option: --manifestdir
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.
I tried to find a file that contains the --manifestdir option but I didn't find any. I also tried to apply the same patch as in https://github.com/joebew42/diaspora-replica/issues/10 but it didn't help.
I'd appreciate any help.
I think that this was caused by a gem behavior.
I changed the SHELL provisioner to fetch and install the deb repo and installed the Puppet package for Ubuntu and I got past this issue.
config.vm.provision "shell", inline: <<-SHELL
if [ ! -f /deb-get ]; then wget https://apt.puppetlabs.com/puppetlabs-release-trusty.deb && sudo touch /deb-get; fi
if [ ! -f /deb-run ]; then sudo dpkg -i puppetlabs-release-trusty.deb && sudo touch /deb-run; fi
if [ ! -f /apt-get-run ]; then sudo apt-get update && sudo touch /apt-get-run; fi
if [ ! -f /apt-get-puppet ]; then sudo apt-get install --yes --force-yes puppet && sudo touch /apt-get-puppet; fi
SHELL
config.vm.provision :puppet do |puppet|
puppet.manifests_path = "puppet"
puppet.manifest_file = "site.pp"
puppet.module_path = "puppet/modules"
puppet.hiera_config_path = "hiera.yaml"
puppet.options = "--verbose --debug"
puppet.working_directory = "/tmp/vagrant-puppet"
puppet.facter = [
['fdqn', config.vm.hostname],
['db_username', CONF['db_username']],
['db_password', CONF['db_password']],
['ssh_username', CONF['ssh_username']],
]
end
This left the following issues:
==> default: Warning: Could not retrieve fact fqdn
==> default: Error: Could not find class apt for piwik-trusty64 on node piwik-trusty64
==> default: Error: Could not find class apt for piwik-trusty64 on node piwik-trusty64
But those are issues that can be fairly easily fixed.
It seems that you're trying to run the puppet provisioner with puppet4 installed on the guest machine. The --manifestsdir option is now deprecated and will cause an error. You have to add several parameters to your Vagrantfile to tell Vagrant that you're using the 4th version of Puppet.
The solution to your problem is described here: https://github.com/mitchellh/vagrant/pull/5601
Unfortunately the Piwik dev-environment project isn't maintained and doesn't work (a lot of issues are open in the tracker).
I have opened a pull request to embedded the Vagrant configuration straigth into Piwik's repository (which hopefully would be simpler to use too). Please comment in the pull request if you find it useful: https://github.com/piwik/piwik/pull/8542
Related
I am using vagrant and chef to provision a VM. The basebox for VM is a custom virtualbox basebox that I created from a VM with a customized customized Fedora 17 OS. It likely not relevant but the custom basebox is downloaded from our local Artifactory repo and not from HashiCorp site.
Here are the salient parts of the Vagrantfile:
Vagrant.configure(2) do |config|
config.vm.box = "GemBuildSystem-4.10"
...
config.vm.provision :chef_solo do |chef|
#Fix for: http://stackoverflow.com/questions/37336477/chefzero-returning-404
chef.channel = "stable"
#chef.version = "12.10.24"
...
end
end
When I run the command " vagrant up --provision" I get the following error:
==> default: el 4 i386
==> default: Getting information for chef stable for el...
==> default: downloading https://omnitruck-direct.chef.io/stable/chef/metadata?v=&p=el&pv=4&m=i386
==> default: to file /tmp/install.sh.6206/metadata.txt
==> default: trying wget...
==> default: ERROR 404
==> default: Omnitruck artifact does not exist for version on platform el
==> default: Either this means:
==> default: - We do not support el
==> default: - We do not have an artifact for
==> default: This is often the latter case due to running a prerelease or RC version of chef
==> default: or a gem version which was only pushed to rubygems and not omnitruck.
==> default: You may be able to set your knife[:bootstrap_version] to the most recent stable
==> default: release of Chef to fix this problem (or the most recent stable major version number).
==> default: In order to test the version parameter, adventurous users may take the Metadata URL
==> default: below and modify the '&v=<number>' parameter until you successfully get a URL that
==> default: does not 404 (e.g. via curl or wget). You should be able to use '&v=11' or '&v=12'
==> default: succesfully.
==> default: If you cannot fix this problem by setting the bootstrap_version, it probably means
==> default: that el is not supported.
==> default: Metadata URL: https://omnitruck-direct.chef.io/stable/chef/metadata?v=&p=el&pv=4&m=i386
First issue I observe is that the server omnitruck-direct.chef.io does not exist. It should be omnitruckchef.io. How is this server determined? What can I do to fix this problem? TIA.
Looks like, you are running for EL 4, which chef doesn't support hence not available.
==> default: el 4 i386
==> default: Getting information for chef stable for el...
==> default: downloading https://omnitruck-direct.chef.io/stable/chef/metadata?v=&p=el&pv=4&m=i386
Check for EL 6, which exists
https://omnitruck-direct.chef.io/stable/chef/metadata?v=&p=el&pv=6&m=i386
and EL 5, which also exists
https://omnitruck-direct.chef.io/stable/chef/metadata?v=&p=el&pv=5&m=i386
Chef clients
https://downloads.chef.io/chef-client/redhat/
I have the following vagrant file:
Vagrant.configure("2") do |config|
config.vm.box = "ubuntu/trusty64"
config.vm.box_check_update = false
config.vm.provider "virtualbox" do |vb|
vb.memory = "1024"
vb.cpus = 2
end
config.ssh.forward_agent = true
config.ssh.forward_x11 = true
config.vm.provision "shell", inline: <<-SHELL
apt-get update
apt-get install -y libgtk2.0-dev gtk2.0
SHELL
end
When I run it, it fails on installations:
==> default: update-default-wordlist: Question empty but elements installed for class "wordlist"
==> default: dictionaries-common/default-wordlist: return code: "0", value: ""
==> default: Choices: , Manual symlink setting
==> default: shared/packages-wordlist: return code: "10" owners/error: "shared/packages-wordlist doesn't exist"
==> default: Installed elements: canadian-small (Canadian English -- small)
==> default: Please see "/usr/share/doc/dictionaries-common/README.problems", section
==> default: "Debconf database corruption" for recovery info.
==> default: update-default-wordlist: Selected wordlist ""
==> default: does not correspond to any installed package in the system
==> default: and no alternative wordlist could be selected.
==> default: dpkg: error processing package dictionaries-common (--configure):
==> default: subprocess installed post-installation script returned error exit status 255
==> default: dpkg: dependency problems prevent configuration of aspell:
==> default: aspell depends on dictionaries-common (>> 0.40); however:
==> default: Package dictionaries-common is not configured yet.
==> default: dpkg: error processing package aspell (--configure):
==> default: dependency problems - leaving unconfigured
==> default: dpkg: dependency problems prevent configuration of aspell-en:
==> default: aspell-en depends on aspell (>= 0.60.3-2); however:
==> default: Package aspell is not configured yet.
==> default: aspell-en depends on dictionaries-common (>= 0.49.2); however:
==> default: Package dictionaries-common is not configured yet.
==> default: dpkg: error processing package aspell-en (--configure):
==> default: dependency problems - leaving unconfigured
==> default: dpkg: dependency problems prevent configuration of hunspell-en-us:
==> default: hunspell-en-us depends on dictionaries-common (>= 0.10); however:
==> default: Package dictionaries-common is not configured yet.
==> default: dpkg: error processing package hunspell-en-us (--configure):
==> default: dependency problems - leaving unconfigured
When I run the installations manually everything works.
Any idea to why this fails and what can be done?
Thanks
I'm hoping someone could please help because I don't know how to solve this!
I'm using Vagrant and VirtualBox to run a Chef recipe. Essentially the recipe will create a user on a windows 2012 machine.
My problem is however when I type vagrant reload --provision (or any other vagrant command apart from halt),
the host machine does the following:-
D:\cookbook-core>vagrant reload --provision
==> default: Loading Berkshelf datafile...
==> default: Sharing cookbooks with VM
==> default: Attempting graceful shutdown of VM...
==> default: Forcing shutdown of VM...
==> default: Clearing any previously set forwarded ports...
==> default: Updating Vagrant's Berkshelf...
==> default: Resolving cookbook dependencies...
==> default: Fetching 'core' from source at .
==> default: Using apt (2.6.1)
==> default: Using chef-client (4.2.4)
==> default: Using chef_handler (1.1.6)
==> default: Using chocolatey (0.2.1)
==> default: Using core (0.0.1) from source at .
==> default: Using cron (1.6.1)
==> default: Using hipchat (0.4.0)
==> default: Using hostsfile (2.4.5)
==> default: Using logrotate (1.8.0)
==> default: Using minitest-handler (1.3.2)
==> default: Using ms_dotnet2 (1.0.0)
==> default: Using ms_dotnet4 (1.0.2)
==> default: Using ms_dotnet45 (2.0.0)
==> default: Using ohai (2.0.2) from git#github.com:JustGiving/cookbook-ohai.git (at master)
==> default: Using powershell (3.0.7)
==> default: Using sudo (2.7.1)
==> default: Using sysctl (0.6.2)
==> default: Using users (1.7.0)
==> default: Using windows (1.36.6)
==> default: Vendoring apt (2.6.1) to c:/Users/aebirim/.berkshelf/vagrant-berkshelf/shelves/berkshelf20150312-3420-1mj6gii-default/apt
==> default: Vendoring chef-client (4.2.4) to c:/Users/aebirim/.berkshelf/vagrant-berkshelf/shelves/berkshelf20150312-3420-1mj6gii-default/chef-client
==> default: Vendoring chef_handler (1.1.6) to c:/Users/aebirim/.berkshelf/vagrant-berkshelf/shelves/berkshelf20150312-3420-1mj6gii-default/chef_handler
==> default: Vendoring chocolatey (0.2.1) to c:/Users/aebirim/.berkshelf/vagrant-berkshelf/shelves/berkshelf20150312-3420-1mj6gii-default/chocolatey
==> default: Vendoring core (0.0.1) to c:/Users/aebirim/.berkshelf/vagrant-berkshelf/shelves/berkshelf20150312-3420-1mj6gii-default/core
==> default: Vendoring cron (1.6.1) to c:/Users/aebirim/.berkshelf/vagrant-berkshelf/shelves/berkshelf20150312-3420-1mj6gii-default/cron
==> default: Vendoring hipchat (0.4.0) to c:/Users/aebirim/.berkshelf/vagrant-berkshelf/shelves/berkshelf20150312-3420-1mj6gii-default/hipchat
==> default: Vendoring hostsfile (2.4.5) to c:/Users/aebirim/.berkshelf/vagrant-berkshelf/shelves/berkshelf20150312-3420-1mj6gii-default/hostsfile
==> default: Vendoring logging (0.0.1) to c:/Users/aebirim/.berkshelf/vagrant-berkshelf/shelves/berkshelf20150312-3420-1mj6gii-default/logging
==> default: Vendoring logrotate (1.8.0) to c:/Users/aebirim/.berkshelf/vagrant-berkshelf/shelves/berkshelf20150312-3420-1mj6gii-default/logrotate
==> default: Vendoring minitest-handler (1.3.2) to c:/Users/aebirim/.berkshelf/vagrant-berkshelf/shelves/berkshelf20150312-3420-1mj6gii-default/minitest-handler
==> default: Vendoring ms_dotnet2 (1.0.0) to c:/Users/aebirim/.berkshelf/vagrant-berkshelf/shelves/berkshelf20150312-3420-1mj6gii-default/ms_dotnet2
==> default: Vendoring ms_dotnet4 (1.0.2) to c:/Users/aebirim/.berkshelf/vagrant-berkshelf/shelves/berkshelf20150312-3420-1mj6gii-default/ms_dotnet4
==> default: Vendoring ms_dotnet45 (2.0.0) to c:/Users/aebirim/.berkshelf/vagrant-berkshelf/shelves/berkshelf20150312-3420-1mj6gii-default/ms_dotnet45
==> default: Vendoring ohai (2.0.2) to c:/Users/aebirim/.berkshelf/vagrant-berkshelf/shelves/berkshelf20150312-3420-1mj6gii-default/ohai
==> default: Vendoring powershell (3.0.7) to c:/Users/aebirim/.berkshelf/vagrant-berkshelf/shelves/berkshelf20150312-3420-1mj6gii-default/powershell
==> default: Vendoring sudo (2.7.1) to c:/Users/aebirim/.berkshelf/vagrant-berkshelf/shelves/berkshelf20150312-3420-1mj6gii-default/sudo
==> default: Vendoring sysctl (0.6.2) to c:/Users/aebirim/.berkshelf/vagrant-berkshelf/shelves/berkshelf20150312-3420-1mj6gii-default/sysctl
==> default: Vendoring users (1.7.0) to c:/Users/aebirim/.berkshelf/vagrant-berkshelf/shelves/berkshelf20150312-3420-1mj6gii-default/users
==> default: Vendoring windows (1.36.6) to c:/Users/aebirim/.berkshelf/vagrant-berkshelf/shelves/berkshelf20150312-3420-1mj6gii-default/windows
==> default: Clearing any previously set network interfaces...
==> default: Preparing network interfaces based on configuration...
default: Adapter 1: nat
==> default: Forwarding ports...
default: 22 => 2222 (adapter 1)
==> 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: Connection timeout. Retrying...
default: Warning: Connection timeout. Retrying...
default: Warning: Connection timeout. Retrying...
==> default: Machine booted and ready!
GuestAdditions versions on your host (4.3.12) and guest (4.3.8) do not match.
The guest's platform is currently not supported, will try generic Linux method...
Downloading VirtualBox Guest Additions ISO from http://download.virtualbox.org/virtualbox/4.3.12/VBoxGuestAdditions_4.3.12.iso
Progress: 100% (Rate: 20.5M/s, Estimated time remaining: --:--:--)
Copy iso file C:/Users/aebirim/.vagrant.d/tmp/VBoxGuestAdditions_4.3.12.iso into the box /tmp/VBoxGuestAdditions.iso
/bin/sh: sudo: command not found
Installing Virtualbox Guest Additions unknown - guest version is 4.3.8
/bin/sh: sudo: command not found
/bin/sh: sudo: command not found
Cleaning up downloaded VirtualBox Guest Additions ISO...
bash.exe: warning: could not find /tmp, please create!
==> default: Checking for guest additions in VM...
==> default: Mounting shared folders...
default: /tmp/vagrant-chef/7ceb72d4e097eb60d8a5bb90970df99d/cookbooks => C:/Users/aebirim/.berkshelf/vagrant-berkshelf/shelves/berkshelf20150312-3420-1mj6gii-default
This is my vagrantfile:-
Vagrant.configure(2) do |config|
config.vm.box = "win2012"
config.vm.box_url = "http://box.dev.ju.service/win2012.box"
config.winrm.username = "vagrant"
config.winrm.password = "vagrant"
config.vm.guest = :windows
config.windows.halt_timeout = 15
config.ssh.insert_key = false
config.vm.provider :virtualbox do |vb|
vb.gui = true
end
config.vm.provision :chef_zero do |chef|
chef.log_level = :info
chef.data_bags_path = 'data_bags'
#chef.provisioning_path = '/tmp/vagrant-chef-2'
#chef.environment = 'dev'
chef.encrypted_data_bag_secret_key_path = "D:/tmp/vagrant-chef-2/encrypted_data_bag_secret"
chef.run_list = [
"recipe[users]",
"recipe[core::default]"
]
end
end
The VM gets launched but as you can see from the output, Vagrant hangs permanently on mounting a shared folder (even when I disabled mounting according to the docs) and doesn't go past this part therefore chef-solo is not provisioned and my chef recipe isn't run. I'm running Vagrant 1.7.2 with VirtualBox 4.3.12. The VM I'm trying to create is a Windows 2012 box.
I'm having a problem with the chef-solo provisioner failing with the error
Chef::Exceptions::CookbookNotFound: Cookbook apt not found.
Any ideas on what could be going wrong here and how should I try to troubleshoot this?
Host: Windows 7 64bit, Guest: Ubuntu 12.04
Virtualbox 4.3.20
ChefDK 0.4.0
Vagrant 1.7.2
Vagrant plugins:
vagrant-berkshelf (4.0.2)
vagrant-omnibus (1.4.1)
vagrant-share (1.1.3, system)
Vagrant output:
PS C:\VagrantBoxes\mybox> vagrant reload --provision
default: The Berkshelf shelf is at "C:/Users/dmit77/.berkshelf/vagrant-berkshelf/shelves/berkshelf20150208-6588-1a3oox5-default"
==> default: Sharing cookbooks with VM
==> default: Attempting graceful shutdown of VM...
==> 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 => 2222 (adapter 1)
==> 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: Connection timeout. Retrying...
==> default: Machine booted and ready!
==> default: Checking for guest additions in VM...
default: The guest additions on this VM do not match the installed version of
default: VirtualBox! In most cases this is fine, but in rare cases it can
default: prevent things such as shared folders from working properly. If you see
default: shared folder errors, please make sure the guest additions within the
default: virtual machine match the version of VirtualBox you have installed on
default: your host and reload your VM.
default:
default: Guest Additions Version: 4.2.12
default: VirtualBox Version: 4.3
==> default: Mounting shared folders...
default: /vagrant => C:/VagrantBoxes/mybox
default: /tmp/vagrant-chef/7159cf65a6eea91634c03008165d96a8/cookbooks => C:/Users/dkrantsber/.berkshelf/vagrant-berkshelf/shelves/berkshelf20150208-6588-1a3oox5-default
==> default: Running provisioner: chef_solo...
==> default: Detected Chef (latest) is already installed
Generating chef JSON and uploading...
==> default: Running chef-solo...
==> default: stdin: is not a tty
==> default: [2015-02-08T05:09:07+00:00] INFO: *** Chef 11.4.0 ***
==> default: [2015-02-08T05:09:08+00:00] INFO: Setting the run_list to ["recipe[apt]", "recipe[apache2]"] from JSON
==> default: [2015-02-08T05:09:08+00:00] INFO: Run List is [recipe[apt], recipe[apache2]]
==> default: [2015-02-08T05:09:08+00:00] INFO: Run List expands to [apt, apache2]
==> default: [2015-02-08T05:09:08+00:00] INFO: Starting Chef Run for vagrant.vm
==> default: [2015-02-08T05:09:08+00:00] INFO: Running start handlers
==> default: [2015-02-08T05:09:08+00:00] INFO: Start handlers complete.
==> default: [2015-02-08T05:09:08+00:00] ERROR: Running exception handlers
==> default: [2015-02-08T05:09:08+00:00] ERROR: Exception handlers complete
==> default: [2015-02-08T05:09:08+00:00] FATAL: Stacktrace dumped to /var/chef/cache/chef-stacktrace.out
==> default: [2015-02-08T05:09:08+00:00] FATAL: Chef::Exceptions::CookbookNotFound: Cookbook apt not found. If you're loading apache2 from another cookbook, make sure you confi
Chef never successfully completed! Any errors should be visible in the
output above. Please fix your recipes so that they properly complete.
Vagrant file:
Vagrant.configure("2") do |config|
config.vm.box = "opscode-ubuntu-12.04_chef-11.4.0"
config.vm.box_url = "https://opscode-vm-bento.s3.amazonaws.com/vagrant/opscode_ubuntu-12.04_chef-11.4.0.box"
config.ssh.forward_agent = true
config.vm.provision :chef_solo do |chef|
chef.cookbooks_path = ["cookbooks"]
chef.add_recipe :'apt'
chef.add_recipe 'apache2'
chef.json = {
:apache => {
:default_site_enabled => "true",
:dir => "/etc/apache2",
:log_dir => "/var/log/apache2",
:error_log => "error.log"
}
}
end
end
Folder structure:
[my_box]
[cookbooks]
[apt]
[apache2]
Vagrantfile
I finally came across the solution. It turns out that vagrant-berkshelf plugin is the problem. Uninstalling it resolves the issue.
Vagrant & Chef - Cookbook *** not found
I have a problem that seems to be similar to this: Berkshelf cookbooks are not being copied to the Vagrant directory, but I believe it is distinct.
When I run a vagrant provision, it fails, claiming it could not load the first cookbook it tried:
==> default: [2014-09-02T12:43:07+00:00] ERROR: Cookbook apt not found. If you're loading apt fr
om another cookbook, make sure you configure the dependency in your metadata
On load, I saw the messages that the appropriate shared folders were being mounted:
==> default: Mounting shared folders...
default: /var/www => D:/Rob/VMs/vdd/data
default: /vagrant => D:/Rob/VMs/vdd
default: /tmp/vagrant-chef-3/chef-solo-2/roles => D:/Rob/VMs/vdd/chef/roles
default: /tmp/vagrant-chef-3/chef-solo-1/cookbooks => C:/Users/29007/.berkshelf/default/vagr
ant/berkshelf-20140822-13996-1eqat7m-default
default: /tmp/vagrant-chef-3/chef-solo-3/data_bags => D:/Rob/VMs/vdd/chef/data_bags
And they do appear to be there:
vagrant#vagrant-ubuntu-trusty-64:/tmp/vagrant-chef-3/chef-solo-1/cookbooks$ pwd
/tmp/vagrant-chef-3/chef-solo-1/cookbooks
vagrant#vagrant-ubuntu-trusty-64:/tmp/vagrant-chef-3/chef-solo-1/cookbooks$ ls
apache2 chef-sugar logrotate php yum
apt database my-cookbook postgresql yum-epel
aws dmg mysql runit yum-mysql-community
Berksfile.lock git mysql-chef_gem windows
build-essential iis openssl xfs
chef_handler iptables pacman xml
My guess is that is not trying to load them from that location, but rather from the cookbooks in the vagrant directory on the host machine. However, I have copies of all those cookbooks there as well (I was intending to configure this so that it wouldn't have a dependency on Berkshelf).
Here is the cookbook config from my solo.rb (mounted as /vagrant/chef/solo.rb):
cookbook_path ["/vagrant/chef/cookbooks/berks", "/vagrant/chef/cookbooks/core", "/vagrant/chef/cookbooks/custom"]
It would seem that my solo.rb file is not being read perhaps?
Update
Tensibai asked for more complete logs in a comment below, so here they are:
D:\Rob\VMs\vdd>vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Checking if box 'ubuntu/trusty64' is up to date...
==> default: Clearing any previously set forwarded ports...
Skipping Berkshelf with --no-provision
==> 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: 35729 => 35729 (adapter 1)
default: 8983 => 8983 (adapter 1)
default: 22 => 2222 (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: Connection timeout. Retrying...
default: Warning: Remote connection disconnect. Retrying...
default: Warning: Remote connection disconnect. Retrying...
==> default: Machine booted and ready!
==> default: Checking for guest additions in VM...
==> default: Configuring and enabling network interfaces...
==> default: Mounting shared folders...
default: /var/www => D:/Rob/VMs/vdd/data
default: /vagrant => D:/Rob/VMs/vdd
default: /tmp/vagrant-chef-3/chef-solo-2/roles => D:/Rob/VMs/vdd/chef/roles
default: /tmp/vagrant-chef-3/chef-solo-1/cookbooks => C:/Users/29007/.berkshelf/default/vagr
ant/berkshelf-20140822-13996-1eqat7m-default
default: /tmp/vagrant-chef-3/chef-solo-3/data_bags => D:/Rob/VMs/vdd/chef/data_bags
==> default: Machine already provisioned. Run `vagrant provision` or use the `--provision`
==> default: to force provisioning. Provisioners marked to run always will still run.
D:\Rob\VMs\vdd>vagrant provision
Updating Vagrant's berkshelf: 'C:/Users/29007/.berkshelf/default/vagrant/berkshelf-20140822-1399
6-1eqat7m-default'
Resolving cookbook dependencies...
Fetching 'my-cookbook' from source at .
Using apache2 (2.0.0)
Using apt (2.5.3)
Using aws (2.4.0)
Using build-essential (2.0.6)
Using chef-sugar (2.2.0)
Using chef_handler (1.1.6)
Using database (2.3.0)
Using dmg (2.2.0)
Using git (4.0.2)
Using iis (2.1.2)
Using iptables (0.14.0)
Using logrotate (1.6.0)
Using my-cookbook (0.1.0) from source at .
Using mysql (5.4.4)
Using mysql-chef_gem (0.0.2)
Using openssl (2.0.0)
Using pacman (1.1.1)
Using php (1.4.6)
Using postgresql (3.4.2)
Using runit (1.5.10)
Using windows (1.34.2)
Using xfs (1.1.0)
Using xml (1.2.6)
Using yum (3.2.4)
Using yum-epel (0.4.0)
Using yum-mysql-community (0.1.10)
Vendoring apache2 (2.0.0) to C:/Users/29007/.berkshelf/default/vagrant/berkshelf-20140822-13996-
1eqat7m-default/apache2
Vendoring apt (2.5.3) to C:/Users/29007/.berkshelf/default/vagrant/berkshelf-20140822-13996-1eqa
t7m-default/apt
Vendoring aws (2.4.0) to C:/Users/29007/.berkshelf/default/vagrant/berkshelf-20140822-13996-1eqa
t7m-default/aws
Vendoring build-essential (2.0.6) to C:/Users/29007/.berkshelf/default/vagrant/berkshelf-2014082
2-13996-1eqat7m-default/build-essential
Vendoring chef-sugar (2.2.0) to C:/Users/29007/.berkshelf/default/vagrant/berkshelf-20140822-139
96-1eqat7m-default/chef-sugar
Vendoring chef_handler (1.1.6) to C:/Users/29007/.berkshelf/default/vagrant/berkshelf-20140822-1
3996-1eqat7m-default/chef_handler
Vendoring chef_handler (1.1.6) to C:/Users/29007/.berkshelf/default/vagrant/berkshelf-20140822-1
3996-1eqat7m-default/chef_handler
Vendoring database (2.3.0) to C:/Users/29007/.berkshelf/default/vagrant/berkshelf-20140822-13996
-1eqat7m-default/database
Vendoring dmg (2.2.0) to C:/Users/29007/.berkshelf/default/vagrant/berkshelf-20140822-13996-1eqa
t7m-default/dmg
Vendoring git (4.0.2) to C:/Users/29007/.berkshelf/default/vagrant/berkshelf-20140822-13996-1eqa
t7m-default/git
Vendoring iis (2.1.2) to C:/Users/29007/.berkshelf/default/vagrant/berkshelf-20140822-13996-1eqa
t7m-default/iis
Vendoring iptables (0.14.0) to C:/Users/29007/.berkshelf/default/vagrant/berkshelf-20140822-1399
6-1eqat7m-default/iptables
Vendoring logrotate (1.6.0) to C:/Users/29007/.berkshelf/default/vagrant/berkshelf-20140822-1399
6-1eqat7m-default/logrotate
Vendoring my-cookbook (0.1.0) to C:/Users/29007/.berkshelf/default/vagrant/berkshelf-20140822-13
996-1eqat7m-default/my-cookbook
Vendoring mysql (5.4.4) to C:/Users/29007/.berkshelf/default/vagrant/berkshelf-20140822-13996-1e
qat7m-default/mysql
Vendoring mysql-chef_gem (0.0.2) to C:/Users/29007/.berkshelf/default/vagrant/berkshelf-20140822
-13996-1eqat7m-default/mysql-chef_gem
Vendoring openssl (2.0.0) to C:/Users/29007/.berkshelf/default/vagrant/berkshelf-20140822-13996-
1eqat7m-default/openssl
Vendoring pacman (1.1.1) to C:/Users/29007/.berkshelf/default/vagrant/berkshelf-20140822-13996-1
eqat7m-default/pacman
Vendoring php (1.4.6) to C:/Users/29007/.berkshelf/default/vagrant/berkshelf-20140822-13996-1eqa
t7m-default/php
Vendoring postgresql (3.4.2) to C:/Users/29007/.berkshelf/default/vagrant/berkshelf-20140822-139
96-1eqat7m-default/postgresql
Vendoring runit (1.5.10) to C:/Users/29007/.berkshelf/default/vagrant/berkshelf-20140822-13996-1
eqat7m-default/runit
Vendoring windows (1.34.2) to C:/Users/29007/.berkshelf/default/vagrant/berkshelf-20140822-13996
-1eqat7m-default/windows
Vendoring xfs (1.1.0) to C:/Users/29007/.berkshelf/default/vagrant/berkshelf-20140822-13996-1eqa
t7m-default/xfs
Vendoring xml (1.2.6) to C:/Users/29007/.berkshelf/default/vagrant/berkshelf-20140822-13996-1eqa
t7m-default/xml
Vendoring yum (3.2.4) to C:/Users/29007/.berkshelf/default/vagrant/berkshelf-20140822-13996-1eqa
t7m-default/yum
Vendoring yum-epel (0.4.0) to C:/Users/29007/.berkshelf/default/vagrant/berkshelf-20140822-13996
-1eqat7m-default/yum-epel
Vendoring yum-mysql-community (0.1.10) to C:/Users/29007/.berkshelf/default/vagrant/berkshelf-20
140822-13996-1eqat7m-default/yum-mysql-community
==> default: Running provisioner: shell...
default: Running: C:/Users/29007/AppData/Local/Temp/vagrant-shell20140902-9376-m72i1a.sh
==> default: stdin: is not a tty
==> default: +--------------------------------------+
==> default: | |
==> default: | ooooo oooo ooooooooo ooooooooo |
==> default: | 888 88 888 88o 888 88o |
==> default: | 888 88 888 888 888 888 |
==> default: | 88888 888 888 888 888 |
==> default: | 888 o888ooo88 o888ooo88 |
==> default: | |
==> default: +--------------------------------------+
==> default: Updating Chef to 11.12.4 version. This may take a few minutes...
==> default: Running provisioner: chef_solo...
Generating chef JSON and uploading...
==> default: Running chef-solo...
==> default: stdin: is not a tty
==> default: [2014-09-02T23:42:57+00:00] INFO: Forking chef instance to converge...
==> default: [2014-09-02T23:42:57+00:00] INFO: *** Chef 11.12.4 ***
==> default: [2014-09-02T23:42:57+00:00] INFO: Chef-client pid: 3195
==> default: [2014-09-02T23:43:05+00:00] INFO: Setting the run_list to ["role[vdd]"] from CLI op
tions
==> default: [2014-09-02T23:43:05+00:00] INFO: Run List is [role[vdd]]
==> default: [2014-09-02T23:43:05+00:00] INFO: Run List expands to [apt, apache2, mysql::client,
mysql::server, vdd::apache, vdd::graphviz, vdd::vdd_sites, vdd::php, vdd::uploadprogress, vdd::
mailcatcher, vdd::phpmyadmin, vdd::mysql, vdd::xdebug, vdd::git, vdd::webgrind, vdd::mc, vdd::ap
c, vdd::rsync, vdd::curl, vdd::composer, vdd::drush, vdd::vdd_help, vdd::vim, vdd::patchutils, v
dd::siege, vdd_example, desktop_tools]
==> default: [2014-09-02T23:43:05+00:00] INFO: Starting Chef Run for vagrant-ubuntu-trusty-64
==> default: [2014-09-02T23:43:05+00:00] INFO: Running start handlers
==> default: [2014-09-02T23:43:05+00:00] INFO: Start handlers complete.
==> default: [2014-09-02T23:43:06+00:00] ERROR: Running exception handlers
==> default: [2014-09-02T23:43:06+00:00] ERROR: Exception handlers complete
==> default: [2014-09-02T23:43:06+00:00] FATAL: Stacktrace dumped to /var/chef/cache/chef-stackt
race.out
==> default: [2014-09-02T23:43:06+00:00] ERROR: Cookbook apt not found. If you're loading apt fr
om another cookbook, make sure you configure the dependency in your metadata
==> default: [2014-09-02T23:43:06+00:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run p
rocess exited unsuccessfully (exit code 1)
Chef never successfully completed! Any errors should be visible in the
output above. Please fix your recipes so that they properly complete.
After a few research about it I think your problem would come from HERE
The vagrant-berkshelf plugin looks some ENV vars to get chef config and if I understood it properly it will override any chef-solo provisionning you were using before.
Your best bet to pinpoint the root cause of all of this would be to run vagrant with the VAGRANT_LOG env variable set to info set VAGRANT_LOG=info and then vagrant provision
You should be able to get the exact location of the generated client.rb file to inspect it within the VM and see what path is used for cookbooks.
Hope it will help