2

When I run vagrant up to provision a new VM on Lion it takes an extremely long time, during which the entire Mac is very laggy and unresponsive.

The output is as follows, the key point being the "notice: Finished catalog run in 754.28 seconds"

> vagrant up
[default] Importing base box 'lucid64'...
[default] The guest additions on this VM do not match the install version of
VirtualBox! This may cause things such as forwarded ports, shared
folders, and more to not work properly. If any of those things fail on
this machine, please update the guest additions and repackage the
box.

Guest Additions Version: 4.1.0
VirtualBox Version: 4.1.6
[default] Matching MAC address for NAT networking...
[default] Clearing any previously set forwarded ports...
[default] Forwarding ports...
[default] -- ssh: 22 => 2222 (adapter 1)
[default] -- web: 80 => 4567 (adapter 1)
[default] Creating shared folders metadata...
[default] Running any VM customizations...
[default] Booting VM...
[default] Waiting for VM to boot. This can take a few minutes.
[default] VM booted and ready for use!
[default] Mounting shared folders...
[default] -- v-root: /vagrant
[default] -- v-data: /var/www
[default] -- manifests: /tmp/vagrant-puppet/manifests
[default] Running provisioner: Vagrant::Provisioners::Puppet...
[default] Running Puppet with lucid64.pp...
[default] stdin: is not a tty
[default] notice: /Stage[main]/Lucid64/Exec[apt-update]/returns: executed successfully
[default] 
[default] notice: /Stage[main]/Lucid64/Package[apache2]/ensure: ensure changed 'purged' to 'present'
[default] 
[default] notice: /Stage[main]/Lucid64/File[/etc/motd]/ensure: defined content as '{md5}a25e31ba9b8489da9cd5751c447a1741'
[default] 
[default] notice: Finished catalog run in 754.28 seconds
[default] 
[default] err: /File[/var/lib/puppet/rrd]/ensure: change from absent to directory failed: Could not find group puppet
[default] 
[default] err: Could not send report: Got 1 failure(s) while initializing: change from absent to directory failed: Could     not find group puppet
[default] 
[default] Running provisioner: Vagrant::Provisioners::Puppet...
[default] Running Puppet with lucid64.pp...
[default] stdin: is not a tty
[default] notice: /Stage[main]/Lucid64/Exec[apt-update]/returns: executed successfully
[default] 
[default] notice: Finished catalog run in 2.05 seconds
[default] 
[default] err: /File[/var/lib/puppet/rrd]: Could not evaluate: Could not find group puppet
[default] 
[default] err: Could not send report: Got 1 failure(s) while initializing: Could not evaluate: Could not find group     puppet
[default] 
[default] Running provisioner: Vagrant::Provisioners::Puppet...
[default] Running Puppet with lucid64.pp...
[default] stdin: is not a tty
[default] notice: /Stage[main]/Lucid64/Exec[apt-update]/returns: executed successfully
[default] 
[default] notice: Finished catalog run in 1.36 seconds
[default] 
[default] err: /File[/var/lib/puppet/rrd]: Could not evaluate: Could not find group puppet
[default] 
[default] err: Could not send report: Got 1 failure(s) while initializing: Could not evaluate: Could not find group     puppet
[default] 
>

Given the symptoms and the output, what would the next steps be to troubleshooting the performance issues I'm seeing?

Wesley
  • 32,320
  • 9
  • 80
  • 116
Andy Hume
  • 161
  • 1
  • 7

2 Answers2

5

I managed to fix this by enabling host I/O caching on my guest VM.

  • Fire up the VM then run vagrant halt
  • Open up VirtualBox and use the GUI to change the settings to enable the host I/O cache for the SATA controller.
  • Re-package the base box: vagrant package.
  • Remove and re-add the base box: vagrant box remove <box>; vagrant box add <box> package.box

(Source)

Dawngerpony
  • 161
  • 1
  • 4
0

Wow, that's a long run.

I'm not sure why Vagrant runs Puppet three times. There should only be one [default] Running provisioner: Vagrant::Provisioners::Puppet... line. Check your Vagrantfile for any duplicate config.vm.provision :puppet lines.

Adding the following options to the provision line in you Vagrantfile may help further troubleshoot the issue. It will show what Puppet thinks is going on during its run.

config.vm.provision :puppet, :options => "--verbose --debug"
Martijn Heemels
  • 7,438
  • 6
  • 39
  • 62