puphpet / puphpet

Vagrant/Puppet GUI
Other
3.83k stars 627 forks source link

On Windows host vagrant up hangs on "Waiting for machine to boot. This may take a few minutes..." #224

Closed therobyouknow closed 10 years ago

therobyouknow commented 10 years ago

It times out eventually.

Latest puphpet.com Windows 8 64bit CPU with appropriate virtualisation facilities 8GB RAM Tried Vagrant 1.2.2 and latest Tried VirtualBox 4.2.12 and 4.2.18

Is there a general solution? (I also use Vagrant on a Mac but want to get folks who have Windows to benefit from it too, not everyone has (or can afford) a Mac).

Thanks.

jtreminio commented 10 years ago

Hi!

Everything should work just as well on Windows, OS X and Linux.

You're running a fairly old version of Vagrant. It's up to 2.3.5 now. Maybe try upgrading and see what happens?

therobyouknow commented 10 years ago

Follow up summary:

  1. Works on another machine, Windows 7 not Windows 8 - will revisit the W8 machine and have another go
  2. New problem but with remedy: vagrant up fails if db created in puphpet.com but not if remove database in puphpet.com

Details

Tried on another machine with Windows 7 and works with that IF I don't create a database (if I create a db I get an error and apache does not run, more details below).

Will need to revisit on the original Windows 8 machine that the bug was raised on and report back.

Setup where it worked: Windows 7 64bit 8Gb RAM downloaded manifest from puphpet.com 2013-10-26 at about 1230 ( puphpet-2013-10-26-1230-no-db.zip ) vagrant 1.3.5 (latest as of 2013 10 26) oracle virtual box 4.2.18 (reasonably recent) running vagrant up from withing git-scm bash shell (from: http://git-scm.com/downloads )

Error I get if I create the database within puphpet.com :- (plus a bit of preceding text for context - to indicate at what point it failed)

Stdout from the command:

Info: Loading facts in /etc/puppet/modules/concat/lib/facter/concat_basedir.rb Info: Loading facts in /etc/puppet/modules/puppi/lib/facter/puppi_projects.rb Info: Loading facts in /etc/puppet/modules/puppi/lib/facter/last_run.rb Info: Loading facts in /etc/puppet/modules/php/lib/facter/php_fact_version.rb Info: Loading facts in /etc/puppet/modules/php/lib/facter/php_fact_extension_dir .rb Info: Loading facts in /etc/puppet/modules/stdlib/lib/facter/pe_version.rb Info: Loading facts in /etc/puppet/modules/stdlib/lib/facter/facter_dot_d.rb Info: Loading facts in /etc/puppet/modules/stdlib/lib/facter/puppet_vardir.rb Info: Loading facts in /etc/puppet/modules/stdlib/lib/facter/root_home.rb Info: Loading facts in /etc/puppet/modules/composer/lib/facter/composer_home.rb

Stderr from the command:

stdin: is not a tty Error: Duplicate declaration: Mysql_user[root@localhost] is already declared in file /etc/puppet/modules/mysql/manifests/server/root_password.pp:8; cannot redec lare at /etc/puppet/modules/mysql/manifests/db.pp:35 on node debian-70rc1-x64-vb ox4210.vagrantup.com Error: Duplicate declaration: Mysql_user[root@localhost] is already declared in file /etc/puppet/modules/mysql/manifests/server/root_password.pp:8; cannot redec lare at /etc/puppet/modules/mysql/manifests/db.pp:35 on node debian-70rc1-x64-vb ox4210.vagrantup.com

ROB@W7MAC /C/Users/ROB/work/projects/dev $

In puphpet.com if I click 'remove database' (and instead later create it via mysql shell in command line when logged into VM) as per screenshot, the vagrant up command works. image

Latest Vagrant is 1.3.5 and this uses the API v2 (you meant 1.3.5 not 2.3.5 right?) I got confused about API v1 and v2 so I read around and made this diagram - see attached vagrant api version v1 v2 clarification and downloads

markushausammann commented 10 years ago

And you're sure 'virtualization' is enabled in your BIOS settings? Because that was my problem with my new Windows8 machine.

frastel commented 10 years ago

Your box does not "hang" your manifest just could not be executed due to some contraint:

Error: Duplicate declaration: Mysql_user[root@localhost] is already declared in

This is the problem. Somewhere more than one definition of the root user should be executed which is not allowed in Puppet. Do you perhaps try to add the root user by hand? Which mysql puppet module do you use (check your Puppetfile for this)?

therobyouknow commented 10 years ago

@markushausammann I'll check. But the machine is about 3 years old - so not a new one - it's a Lenovo X201S notebook but its CPU supports all the necessary virtualisation features according to intel's "ark" pages.

@frastel I've not adjusted anything manually - I've used the puphpet.com .zip manifest as it came from the download.

Thanks both so far for your inputs...

markushausammann commented 10 years ago

Supported != enabled :) I needed to boot into my BIOS settings and explicitly 'enable' the virtualization capacities of my Intel processor.

therobyouknow commented 10 years ago

Good to know @markushausammann - I'll check it out, when I get home from work, on the specific machine which is at home. this will be about 9 hours from now. I'll try to report back. thank you - I certainly think this is at least something to check and eliminate.

therobyouknow commented 10 years ago

@markushausammann there is indeed a BIOS setting in my Lenovo X201S laptop to enable various virtualisation settings. I have now enabled them but didn't finish checking to see if this solves the problem. I will see if that solves the problem today hopefully.

taskdivision commented 10 years ago

Something to keep in mind on Windows 8 - is make sure Hyper V isn't enabled. This also happened to me but it turned out I had Hyper V installed and enabled due to Visual Studio install. (http://devhammer.net/blog/windows-8-making-virtualbox-and-hyper-v-play-nice) http://www.grumpydev.com/2013/06/19/windows-8-hyper-v-virtualbox-vagrant-and-hanging-on-boot/

chmielot commented 10 years ago
Error: Duplicate declaration: Mysql_user[root@localhost] is already declared in

I have this issue on my mac host using VB 4.3.2 and Vagrant 1.3.5 trying to provision wheezy 7.2 and ubuntu 12.04, didn't try any others. Solved by changing the database username to something else than root. Got that hint from here: https://ask.puppetlabs.com/question/3881/duplicate-declaration-mysql_userrootlocalhost-is-already-declared/

Currently struggling with this one .. man, I thought it would be so easy using puphpet...

Error: Failed to set group to '0': Operation not permitted - /var/www/test
Error: /Stage[main]//Apache::Vhost[qNpr7gCjXxnh]/File[/var/www/test]/ensure: change from absent to directory failed: Failed to set group to '0': Operation not permitted - /var/www/test
Warning: /Stage[main]//Apache::Vhost[qNpr7gCjXxnh]/File[25-qNpr7gCjXxnh.conf]: Skipping because of failed dependencies
Error: Failed to set group to '0': Operation not permitted - /var/www/phpmyadmin
Error: /Stage[main]//File[/var/www/phpmyadmin]/ensure: change from absent to link failed: Failed to set group to '0': Operation not permitted - /var/www/phpmyadmin
Warning: /Stage[main]//Apache::Vhost[qNpr7gCjXxnh]/File[25-qNpr7gCjXxnh.conf symlink]: Skipping because of failed dependencies
Warning: /Stage[main]/Apache::Service/Service[httpd]: Skipping because of failed dependencies
nicnocquee commented 10 years ago

@chmielot solution by changing database username works for me.

therobyouknow commented 10 years ago

Original problem solved. Needed to enable in BIOS - thanks @markushausammann

@taskdivision - thanks for the tip on HyperV - didn't need to do anything here myself but worth knowing!

Note, you may also need to adjust the Vagrant file for a different problem whereby apache is not running in your guest VM - that solution here: https://github.com/mikebell/drupaldev-apache/issues/3