I made a new folder to install virtualbox, vagrant is 1.7.4, the virtualbox is 5.0.2. And have installed vagrant-vbguest sucessfully. I saw the errors below,it mainly said 'stdin is not a tty', and 'Could not find the X.Org or XFree86 Window System, skipping'. I have installed git, and have the id_rsa and id_rsa.pub in .ssh folder. I did this on win8.1. Thanks very much
Think#RESEARCH E:\vag_new
> vagrant box add newbase precise32.box
==> box: Box file was not detected as metadata. Adding it directly...
==> box: Adding box 'newbase' (v0) for provider:
box: Unpacking necessary files from: file://E:/vag_new/precise32.box
box: Progress: 100% (Rate: 17.5M/s, Estimated time remaining: --:--:--)
==> box: Successfully added box 'newbase' (v0) for 'virtualbox'!
Think#RESEARCH E:\vag_new
> vagrant init
A `Vagrantfile` has been placed in this directory. You are now
ready to `vagrant up` your first virtual environment! Please read
the comments in the Vagrantfile as well as documentation on
`vagrantup.com` for more information on using Vagrant.
Think#RESEARCH E:\vag_new
> ls
precise32.box Vagrantfile
Think#RESEARCH E:\vag_new
> vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Importing base box 'base'...
==> default: Matching MAC address for NAT networking...
==> default: Setting the name of the VM: vag_new_default_1441436421015_28742
==> default: Fixed port collision for 22 => 2222. Now on port 2200.
==> default: Clearing any previously set network interfaces...
==> default: Preparing network interfaces based on configuration...
default: Adapter 1: nat
==> default: Forwarding ports...
default: 22 => 2200 (adapter 1)
==> default: Booting VM...
==> default: Waiting for machine to boot. This may take a few minutes...
default: SSH address: 127.0.0.1:2200
default: SSH username: vagrant
default: SSH auth method: private key
default: Warning: Connection timeout. Retrying...
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!
GuestAdditions versions on your host (5.0.2) and guest (4.2.0) do not match.
stdin: is not a tty
Reading package lists...
Building dependency tree...
Reading state information...
The following extra packages will be installed:
fakeroot linux-headers-3.2.0-23 make patch
Suggested packages:
make-doc diffutils-doc
Recommended packages:
linux-headers-generic-pae linux-headers-686-pae linux-headers-amd64
linux-headers-generic linux-headers
The following NEW packages will be installed:
dkms fakeroot linux-headers-3.2.0-23 linux-headers-3.2.0-23-generic-pae make
patch
0 upgraded, 6 newly installed, 0 to remove and 66 not upgraded.
Need to get 12.7 MB of archives.
After this operation, 68.5 MB of additional disk space will be used.
Get:1 http://us.archive.ubuntu.com/ubuntu/ precise/main make i386 3.81-8.1ubuntu1 [116 kB]
Get:2 http://us.archive.ubuntu.com/ubuntu/ precise/main patch i386 2.6.1-3 [86.0 kB]
Get:3 http://us.archive.ubuntu.com/ubuntu/ precise/main dkms all 2.2.0.3-1ubuntu3 [73.1 kB]
Get:4 http://us.archive.ubuntu.com/ubuntu/ precise/main fakeroot i386 1.18.2-1 [87.9 kB]
Get:5 http://us.archive.ubuntu.com/ubuntu/ precise/main linux-headers-3.2.0-23 all 3.2.0-23.36 [11.4 MB]
Get:6 http://us.archive.ubuntu.com/ubuntu/ precise/main linux-headers-3.2.0-23-generic-pae i386 3.2.0-23.36
[944 kB]
dpkg-preconfigure: unable to re-open stdin: No such file or directory
Fetched 12.7 MB in 14min 34s (14.6 kB/s)
Selecting previously unselected package make.
(Reading database ... 29361 files and directories currently installed.)
Unpacking make (from .../make_3.81-8.1ubuntu1_i386.deb) ...
Selecting previously unselected package patch.
Unpacking patch (from .../patch_2.6.1-3_i386.deb) ...
Selecting previously unselected package dkms.
Unpacking dkms (from .../dkms_2.2.0.3-1ubuntu3_all.deb) ...
Selecting previously unselected package fakeroot.
Unpacking fakeroot (from .../fakeroot_1.18.2-1_i386.deb) ...
Selecting previously unselected package linux-headers-3.2.0-23.
Unpacking linux-headers-3.2.0-23 (from .../linux-headers-3.2.0-23_3.2.0-23.36_all.deb) ...
Selecting previously unselected package linux-headers-3.2.0-23-generic-pae.
Unpacking linux-headers-3.2.0-23-generic-pae (from .../linux-headers-3.2.0-23-generic-pae_3.2.0-23.36_i386.
deb) ...
Processing triggers for man-db ...
Setting up make (3.81-8.1ubuntu1) ...
Setting up patch (2.6.1-3) ...
Setting up dkms (2.2.0.3-1ubuntu3) ...
Setting up fakeroot (1.18.2-1) ...
update-alternatives: using /usr/bin/fakeroot-sysv to provide /usr/bin/fakeroot (fakeroot) in auto mode.
Setting up linux-headers-3.2.0-23 (3.2.0-23.36) ...
Setting up linux-headers-3.2.0-23-generic-pae (3.2.0-23.36) ...
Examining /etc/kernel/header_postinst.d.
run-parts: executing /etc/kernel/header_postinst.d/dkms 3.2.0-23-generic-pae /boot/vmlinuz-3.2.0-23-generic
-pae
Copy iso file C:\Program Files/Oracle/VirtualBox/VBoxGuestAdditions.iso into the box /tmp/VBoxGuestAddition
s.iso
stdin: is not a tty
mount: warning: /mnt seems to be mounted read-only.
Installing Virtualbox Guest Additions 5.0.2 - guest version is 4.2.0
stdin: is not a tty
Verifying archive integrity... All good.
Uncompressing VirtualBox 5.0.2 Guest Additions for Linux............
VirtualBox Guest Additions installer
Removing installed version 4.2.0 of VirtualBox Guest Additions...
Copying additional installer modules ...
Installing additional modules ...
Removing existing VirtualBox DKMS kernel modules ...done.
Removing existing VirtualBox non-DKMS kernel modules ...done.
Building the VirtualBox Guest Additions kernel modules ...done.
Doing non-kernel setup of the Guest Additions ...done.
You should restart your guest to make sure the new modules are actually used
Installing the Window System drivers
Could not find the X.Org or XFree86 Window System, skipping.
An error occurred during installation of VirtualBox Guest Additions 5.0.2. Some functionality may not work
as intended.
In most cases it is OK that the "Window System drivers" installation failed.
stdin: is not a tty
Restarting VM to apply changes...
==> default: Attempting graceful shutdown of VM...
==> default: Booting VM...
==> default: Waiting for machine to boot. This may take a few minutes...
default: SSH address: 127.0.0.1:2200
default: SSH username: vagrant
default: SSH auth method: private key
default: Warning: Connection timeout. Retrying...
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.0
default: VirtualBox Version: 5.0
==> default: Mounting shared folders...
default: /vagrant => E:/vag_new
It seems the install have been done correctly - the same issue has been reported at https://github.com/dotless-de/vagrant-vbguest/issues/130
you can download the VBoxGuestAdditions.iso file at http://download.virtualbox.org/virtualbox/5.0.0/ and replace the existing file under your installed virtual box (not sure about the path under windows; would be /VirtualBox.app/Contents/MacOS/VBoxGuestAdditions.iso for mac users)
Related
Ive had to move onto a new laptop running windows 10, so I have installed the latest Virtual box (6) and vagrant (2.2.6). I pulled down my project and ran a vagrant up to build the box and deploy all my work, but there was an issue with guest additions. The box is Centos 7, so after first launch, I carried out a yum update on the box and added vagrant plugins vbguest and hostsupdater to my local vagrant install. I also had to install deltarpms to get the update to work.
However each time I now up or reload the box, it says there is an issue with vbguest tools missing. IT then proceeeds to uninstall the VGA, reinstall the same version and then tell me it hasnt installed properly. However shared folders do appear to work. Any ideas what I can do to fix this on upload, full output below.
PS C:\Users\Paul M\projects\centos-docker> vagrant reload
==> default: [vagrant-hostsupdater] Removing hosts
==> default: Attempting graceful shutdown of VM...
==> default: Checking if box 'bento/centos-7.4' version '201709.15.0' 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: Forwarding ports...
default: 8898 (guest) => 8898 (host) (adapter 1)
default: 8899 (guest) => 8899 (host) (adapter 1)
default: 22 (guest) => 2222 (host) (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: Machine booted and ready!
[default] A Virtualbox Guest Additions installation was found but no tools to rebuild or start them.
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: mirror.vorboss.net
* extras: www.mirrorservice.org
* updates: www.mirrorservice.org
Package kernel-devel-3.10.0-1062.7.1.el7.x86_64 already installed and latest version
Package kernel-devel-3.10.0-1062.7.1.el7.x86_64 already installed and latest version
Package gcc-4.8.5-39.el7.x86_64 already installed and latest version
Package binutils-2.27-41.base.el7_7.1.x86_64 already installed and latest version
Package 1:make-3.82-24.el7.x86_64 already installed and latest version
Package 4:perl-5.16.3-294.el7_6.x86_64 already installed and latest version
Package bzip2-1.0.6-13.el7.x86_64 already installed and latest version
Package elfutils-libelf-devel-0.176-2.el7.x86_64 already installed and latest version
Nothing to do
Copy iso file C:\Program Files\Oracle\VirtualBox/VBoxGuestAdditions.iso into the box /tmp/VBoxGuestAdditions.iso
Mounting Virtualbox Guest Additions ISO to: /mnt
mount: /dev/loop0 is write-protected, mounting read-only
Installing Virtualbox Guest Additions 6.0.14 - guest version is 6.0.14
Verifying archive integrity... All good.
Uncompressing VirtualBox 6.0.14 Guest Additions for Linux........
VirtualBox Guest Additions installer
Removing installed version 6.0.14 of VirtualBox Guest Additions...
Copying additional installer modules ...
Installing additional modules ...
VirtualBox Guest Additions: Starting.
VirtualBox Guest Additions: Building the VirtualBox Guest Additions kernel
modules. This may take a while.
VirtualBox Guest Additions: To build modules for other installed kernels, run
VirtualBox Guest Additions: /sbin/rcvboxadd quicksetup <version>
VirtualBox Guest Additions: or
VirtualBox Guest Additions: /sbin/rcvboxadd quicksetup all
VirtualBox Guest Additions: Building the modules for kernel
3.10.0-1062.7.1.el7.x86_64.
VirtualBox Guest Additions: Running kernel modules will not be replaced until
the system is restarted
An error occurred during installation of VirtualBox Guest Additions 6.0.14. Some functionality may not work as intended.
In most cases it is OK that the "Window System drivers" installation failed.
Redirecting to /bin/systemctl start vboxadd.service
Redirecting to /bin/systemctl start vboxadd-service.service
Unmounting Virtualbox Guest Additions ISO from: /mnt
==> default: Checking for guest additions in VM...
==> default: [vagrant-hostsupdater] Checking for host entries
==> default: Mounting shared folders...
default: /vagrant => C:/Users/Paul M/Projects/centos-docker
==> default: Machine already provisioned. Run `vagrant provision` or use the `--provision`
==> default: flag to force provisioning. Provisioners marked to run always will still run.
PS C:\Users\Paul M\projects\centos-docker>
My colleague is experiencing the exact same issue. It seems to be caused by the latest version of the vagrant plugin v0.22.0. The previous version, v0.21.0 did not have this issue.
Fetching: vagrant-vbguest-0.22.0.gem (100%)
Successfully uninstalled vagrant-vbguest-0.21.0
Updated 'vagrant-vbguest' to version '0.22.0'!
As soon as I updated the plugin, the vbguest additions were reinstalled.
--
Update:
Opened an issue: https://github.com/dotless-de/vagrant-vbguest/issues/362
--
Update: Workaround - Install 0.21
vagrant plugin uninstall vagrant-vbguest
Uninstalling the 'vagrant-vbguest' plugin...
Successfully uninstalled micromachine-3.0.0
Successfully uninstalled vagrant-vbguest-0.22.0
vagrant plugin install vagrant-vbguest --plugin-version 0.21
Installing the 'vagrant-vbguest --version '0.21'' plugin. This can take a few minutes...
Fetching: micromachine-3.0.0.gem (100%)
Fetching: vagrant-vbguest-0.21.0.gem (100%)
Installed the plugin 'vagrant-vbguest (0.21.0)'!
Update: Developer released an update
- .22.1 : vagrant plugin update should give you v.22.1
You can add this to the Vagrantfile to avoid the updating of guest additions if the user has the plugin installed (any version).
Vagrant.configure("2") do |config|
....
if Vagrant.has_plugin?("vagrant-vbguest")
config.vbguest.auto_update = false
end
....
end
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/
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
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
When I'm running:
:$ vagrant provision
or
:$ vagrant up
I have an error:
nisevi#localhost processor (master):$ vagrant provision
Using ssh deploy key of: /home/nisevi/.ssh/id_rsa
==> default: Chef 12.0.3 Omnibus package is already installed.
==> default: Running provisioner: shell...
default: Running: inline script
==> default: W
==> default: :
==> default: Duplicate sources.list entry http://security.ubuntu.com/ubuntu/ trusty-security/multiverse amd64 Packages (/var/lib/apt/lists/security.ubuntu.com_ubuntu_dists_trusty-security_multiverse_binary-amd64_Packages)
==> default: W
==> default: : Duplicate sources.list entry http://security.ubuntu.com/ubuntu/ trusty-security/multiverse i386 Packages (/var/lib/apt/lists/security.ubuntu.com_ubuntu_dists_trusty-security_multiverse_binary-i386_Packages)
==> default: W: Duplicate sources.list entry http://archive.ubuntu.com/ubuntu/ trusty/multiverse amd64 Packages (/var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_trusty_multiverse_binary-amd64_Packages)
==> default: W: Duplicate sources.list entry http://archive.ubuntu.com/ubuntu/ trusty/multiverse i386 Packages (/var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_trusty_multiverse_binary-i386_Packages)
==> default: W: Duplicate sources.list entry http://archive.ubuntu.com/ubuntu/ trusty-updates/multiverse amd64 Packages (/var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_trusty-updates_multiverse_binary-amd64_Packages)
==> default: W: Duplicate sources.list entry http://archive.ubuntu.com/ubuntu/ trusty-updates/multiverse i386 Packages (/var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_trusty-updates_multiverse_binary-i386_Packages)
==> default: W: You may want to run apt-get update to correct these problems
==> default: Running provisioner: chef_solo...
==> default: Detected Chef (latest) is already installed
Generating chef JSON and uploading...
==> default: Running chef-solo...
==> default: [2015-01-07T03:09:42+00:00] INFO: Forking chef instance to converge...
==> default: [2015-01-07T03:09:42+00:00] INFO: *** Chef 12.0.3 ***
==> default: [2015-01-07T03:09:42+00:00] INFO: Chef-client pid: 1224
==> default: [2015-01-07T03:09:50+00:00] INFO: Setting the run_list to ["role[processor]"] from CLI options
==> default: [2015-01-07T03:09:50+00:00] INFO: Run List is [role[processor]]
==> default: [2015-01-07T03:09:50+00:00] INFO: Run List expands to [opsworks_initial_setup, mysql::client, dependencies, opsworks_ganglia::client, deploy::default, ba-processor::setup, ba-processor::deploy, sidekiq::deploy, opsworks_ganglia::configure-client]
==> default: [2015-01-07T03:09:50+00:00] INFO: Starting Chef Run for ubuntu1404-opsworks
==> default: [2015-01-07T03:09:50+00:00] INFO: Running start handlers
==> default: [2015-01-07T03:09:50+00:00] INFO: Start handlers complete.
==> default: [2015-01-07T03:09:51+00:00] WARN: found a directory vendor in the cookbook path, but it contains no cookbook files. skipping.
==> default: [2015-01-07T03:09:51+00:00] ERROR: Running exception handlers
==> default: [2015-01-07T03:09:51+00:00] ERROR: Exception handlers complete
==> default: [2015-01-07T03:09:51+00:00] FATAL: Stacktrace dumped to /var/chef/cache/chef-stacktrace.out
==> default: [2015-01-07T03:09:51+00:00] ERROR: Cookbook loaded at path(s) [/tmp/vagrant-chef-3/chef-solo-2/cookbooks/tad-server] has invalid metadata: The `name' attribute is required in cookbook metadata
==> default: [2015-01-07T03:09:51+00:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process 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.
Does anyone know what is causing this error or to what is related?
As the error mentions, you must add name 'tad-server' the metadata.rb file in this cookbook. In days long past, this was optional so many people didn't put a metadata.rb in their cookbooks at all, but some tools now require this at a minimum. All other fields in the metadata remain optional, though version is highly recommended.
You need to add your cookbook name to the metadata.rb file inside the cookbook directory.
I just ran into this with the chef-client cookbook. Upload failed till I added the following line to chef-client/metadata.rb
name "chef-client"