hashbangcode / vlad

Vlad - Vagrant LAMP Ansible Drupal
173 stars 53 forks source link

`vagrant up` fails on Windows 8.1 #260

Open Paulmicha opened 9 years ago

Paulmicha commented 9 years ago

Possibly relates to #248

Host (Windows 8.1) : VirtualBox 4.3.28 Vagrant 1.7.2 Guest (with vagrant ssh) : Ansible 1.9.2

Installation procedure :

    ##
    # Custom VLAD settings.yml
    # @see http://vlad-docs.readthedocs.org/en/latest/usage/variables/
    #

    webserver_hostname: 'lan-100-100.io'
    webserver_hostname_aliases:
    - 'www.lan-100-100.io'

    boxipaddress: "192.168.100.100"
    boxname: "lan-100-100"
    host_synced_folder: "D:\\VagrantBoxes\\vlad\\docroot"

    adminer_install: true
    apache_install: true
    imagemagick_install: false
    mailcatcher_install: true
    memcached_install: true
    munin_install: false
    mysql_install: true
    node_install: false
    php_install: true
    pimpmylog_install: true
    redis_install: false
    ruby_install: true
    sendmail_install: false
    solr_install: true
    varnish_install: true
    xhprof_install: false

    http_port: 8080
    varnish_http_port: 80

    php_date_timezone: "Europe/Paris"
    php_pecl_uploadprogress: true

    git_user_name: "foobar"
    git_user_email: "foo@bar.com"

Extract from the vagrant up error :

    ==> lan-100-100: TASK: [solr | ensure tomcat/Solr directory has correct owner] *****************
    ==> lan-100-100: skipping: [192.168.100.100]
    ==> lan-100-100:
    ==> lan-100-100: TASK: [munin | install munin] *************************************************
    ==> lan-100-100: skipping: [192.168.100.100]
    ==> lan-100-100:
    ==> lan-100-100: TASK: [munin | install munin] *************************************************
    ==> lan-100-100: skipping: [192.168.100.100]
    ==> lan-100-100:
    ==> lan-100-100: TASK: [munin | add munin node config] *****************************************
    ==> lan-100-100: skipping: [192.168.100.100]
    ==> lan-100-100:
    ==> lan-100-100: TASK: [munin | get iptables rules] ********************************************
    ==> lan-100-100: skipping: [192.168.100.100]
    ==> lan-100-100:
    ==> lan-100-100: TASK: [munin | add munin iptables] ********************************************
    ==> lan-100-100: skipping: [192.168.100.100]
    ==> lan-100-100:
    ==> lan-100-100: TASK: [munin | add munin to startup] ******************************************
    ==> lan-100-100: skipping: [192.168.100.100]
    ==> lan-100-100:
    ==> lan-100-100: TASK: [munin | add munin to startup] ******************************************
    ==> lan-100-100: skipping: [192.168.100.100]
    ==> lan-100-100:
    ==> lan-100-100: TASK: [ruby | ensure prerequisite packages are installed] *********************
    ==> lan-100-100: skipping: [192.168.100.100]
    ==> lan-100-100:
    ==> lan-100-100: TASK: [ruby | install rbenv] **************************************************
    ==> lan-100-100: skipping: [192.168.100.100]
    ==> lan-100-100:
    ==> lan-100-100: TASK: [ruby | install rbenv plugins] ******************************************
    ==> lan-100-100: skipping: [192.168.100.100] => (item=rbenv-gem-rehash)
    ==> lan-100-100: skipping: [192.168.100.100] => (item=rbenv-gemset)
    ==> lan-100-100: skipping: [192.168.100.100] => (item=ruby-build)
    ==> lan-100-100:
    ==> lan-100-100: TASK: [ruby | add line to .bash_profile (rbenv) (step 1/4)] *******************
    ==> lan-100-100: skipping: [192.168.100.100]
    ==> lan-100-100:
    ==> lan-100-100: TASK: [ruby | add line to .bash_profile (rbenv) (step 2/4)] *******************
    ==> lan-100-100: skipping: [192.168.100.100]
    ==> lan-100-100:
    ==> lan-100-100: TASK: [ruby | add line to .bash_profile (rbenv) (step 3/4)] *******************
    ==> lan-100-100: skipping: [192.168.100.100]
    ==> lan-100-100:
    ==> lan-100-100: TASK: [ruby | ensure .bashrc gets loaded as well (rbenv) (step 4/4)] **********
    ==> lan-100-100: skipping: [192.168.100.100]
    ==> lan-100-100:
    ==> lan-100-100: TASK: [ruby | source ~/.bash_profile] *****************************************
    ==> lan-100-100: skipping: [192.168.100.100]
    ==> lan-100-100:
    ==> lan-100-100: TASK: [ruby | install Ruby {{ default_ruby_version }}] ************************
    ==> lan-100-100: skipping: [192.168.100.100]
    ==> lan-100-100:
    ==> lan-100-100: TASK: [ruby | set the global version of Ruby to {{ default_ruby_version }}] ***
    ==> lan-100-100: skipping: [192.168.100.100]
    ==> lan-100-100:
    ==> lan-100-100: TASK: [ruby | update RubyGems] ************************************************
    ==> lan-100-100: skipping: [192.168.100.100]
    ==> lan-100-100:
    ==> lan-100-100: TASK: [ruby | install Bundler gem to global Ruby version] ************
    ==> lan-100-100: *********
    ==> lan-100-100: skipping: [192.168.100.100]
    ==> lan-100-100:
    ==> lan-100-100: TASK: [ruby | ensure prerequisite packages are installed] *********************
    ==> lan-100-100: skipping: [192.168.100.100]
    ==> lan-100-100:
    ==> lan-100-100: TASK: [ruby | install rbenv] **************************************************
    ==> lan-100-100: changed: [192.168.100.100] => {"after": "3b6faa85319d6ec42902a4498786ace29b80baaa", "before": null, "changed": true}
    ==> lan-100-100:
    ==> lan-100-100: TASK: [ruby | install rbenv plugins] ******************************************
    ==> lan-100-100: changed: [192.168.100.100] => (item=rbenv-gem-rehash) => {"after": "4d7b92de4bdf549df59c3c8feb1890116d2ea985", "before": null, "changed": true, "item": "rbenv-gem-rehash"}
    ==> lan-100-100: changed: [192.168.100.100] => (item=rbenv-gemset) => {"after": "409bd6a9b7786190360a4d71e530e558d1ff80aa", "before": null, "changed": true, "item": "rbenv-gemset"}
    ==> lan-100-100: changed: [192.168.100.100] => (item=ruby-build) => {"after": "a87aeaa6521e29a48f1d04a6f5da84fc31e382e8", "before": null, "changed": true, "item": "ruby-build"}
    ==> lan-100-100:
    ==> lan-100-100: TASK: [ruby | add line to .bash_profile (rbenv) (step 1/4)] *******************
    ==> lan-100-100: changed: [192.168.100.100] => {"backup": "", "changed": true, "msg": "line added"}
    ==> lan-100-100:
    ==> lan-100-100: TASK: [ruby | add line to .bash_profile (rbenv) (step 2/4)] *******************
    ==> lan-100-100: changed: [192.168.100.100] => {"backup": "", "changed": true, "msg": "line added"}
    ==> lan-100-100:
    ==> lan-100-100: TASK: [ruby | add line to .bash_profile (rbenv) (step 3/4)] *******************
    ==> lan-100-100: changed: [192.168.100.100] => {"backup": "", "changed": true, "msg": "line added"}
    ==> lan-100-100:
    ==> lan-100-100: TASK: [ruby | ensure .bashrc gets loaded as well (rbenv) (step 4/4)] **********
    ==> lan-100-100: changed: [192.168.100.100] => {"backup": "", "changed": true, "msg": "line added"}
    ==> lan-100-100:
    ==> lan-100-100: TASK: [ruby | source ~/.bash_profile] *****************************************
    ==> lan-100-100: changed: [192.168.100.100] => {"changed": true, "cmd": [".", "/home/vagrant/.bash_profile"], "delta": "0:00:00.005932", "end": "2015-07-22 18:57:03.543990", "rc": 0, "start": "2015-07
    -22 18:57:03.538058", "stderr": "/home/vagrant/.bash_profile: line 4: rbenv: command not found", "stdout": "", "warnings": []}
    ==> lan-100-100:
    ==> lan-100-100: TASK: [ruby | install Ruby {{ default_ruby_version }}] ************************
    ==> lan-100-100: failed: [192.168.100.100] => {"changed": true, "cmd": ["bash", "-lc", "rbenv install 2.1.2"], "delta": "0:00:00.006807", "end": "2015-07-22 18:57:03.603435", "rc": 127, "start": "2015
    -07-22 18:57:03.596628", "warnings": []}
    ==> lan-100-100: stderr: bash: rbenv: command not found
    ==> lan-100-100:
    ==> lan-100-100: FATAL: all hosts have already failed -- aborting
    ==> lan-100-100:
    ==> lan-100-100: PLAY RECAP ********************************************************************
    ==> lan-100-100:            to retry, use: --limit @/root/site.retry
    ==> lan-100-100:
    ==> lan-100-100: 192.168.100.100            : ok=208  changed=151  unreachable=0    failed=1
    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.

Additionnal notes :

    D:\VagrantBoxes\vlad (master)
    λ vagrant up

    The name of your virtual machine couldn't be set because VirtualBox
    is reporting another VM with that name already exists. Most of the
    time, this is because of an error with VirtualBox not cleaning up
    properly. To fix this, verify that no VMs with that name do exist
    (by opening the VirtualBox GUI). If they don't, then look at the
    folder in the error message from VirtualBox below and remove it
    if there isn't any information you need in there.

    VirtualBox error:

    VBoxManage.exe: error: Could not rename the directory 'D:\VirtualBoxHD\ubuntu-cloudimg-trusty-vagrant-amd64_1437589999192_28179' to 'D:\VirtualBoxHD\lan-100-100_vlad' to save the settings file (VERR_ALREADY_EXISTS)
    VBoxManage.exe: error: Details: code E_FAIL (0x80004005), component SessionMachine, interface IMachine, callee IUnknown
    VBoxManage.exe: error: Context: "SaveSettings()" at line 2788 of file VBoxManageModifyVM.cpp

Then :

    D:\VagrantBoxes\vlad (master)
    λ vagrant reload

    Checking for Vlad settings and local overrides...
    Loading Vlad settings file: D:/VagrantBoxes/vlad/vlad/settings.yml

    Your VM has become "inaccessible." Unfortunately, this is a critical error
    with VirtualBox that Vagrant can not cleanly recover from. Please open VirtualBox
    and clear out your inaccessible virtual machines or find a way to fix
    them.
philipnorton42 commented 9 years ago

Sorry you've had problems running Vlad. Although Windows support was officially introduced in version 1.0 it's not been that well tested as no one currently contributing to the project currently runs Windows. If you can figure out what the problem is then that would be great (bit of an ask I know).

In the mean time I'm going to do some digging and try to find a test box from somewhere and see what I can find out. Thanks for all of the logs and comments above, brilliant bug report :)

kondor9 commented 9 years ago

Add remote_user: root parameter in ./vlad_guts/playbooks/roles/ruby/tasks/ruby.yml right below sudo: true It was mentioned at http://stackoverflow.com/a/29019067 and works for me.