Vagrant hangs on Windows 7

2019-03-24 05:50发布

问题:

vagrant up seems to hang on Windows 7

My Vagrant file

VAGRANTFILE_API_VERSION = "2"

ENV['VAGRANT_DEFAULT_PROVIDER'] = 'docker'

Vagrant.configure("2") do |config|

  config.vm.network "forwarded_port", guest: 80, host: 8080, auto_correct: true

  config.vm.define "elk" do |elk|
    elk.vm.synced_folder "./www", "/var/www"
    elk.vm.provider "docker" do |d|
      d.build_dir = "./Docker"
    end
  end
end

vagrant up --debug

==> elk: Syncing folders to the host VM...
 INFO machine: Calling action: sync_folders on provider VirtualBox (3c7dc34c-6fcf-4ace-87d1-0602b664e783)
DEBUG environment: Attempting to acquire process-lock: machine-action-740c202843bdf6334148bb69e000ec99
DEBUG environment: Attempting to acquire process-lock: dotlock
 INFO environment: Acquired process lock: dotlock
 INFO environment: Released process lock: dotlock
 INFO environment: Acquired process lock: machine-action-740c202843bdf6334148bb69e000ec99
 INFO environment: Released process lock: machine-action-740c202843bdf6334148bb69e000ec99
 INFO runner: Preparing hooks for middleware sequence...
 INFO runner: 1 hooks defined.
 INFO runner: Running action: #<Vagrant::Action::Builder:0x3786018>
 INFO warden: Calling IN action: #<Vagrant::Action::Builtin::SyncedFolders:0x38079d8>
 INFO subprocess: Starting process: ["C:\\windows\\System32\\WindowsPowerShell\\v1.0\\/powershell.EXE", "-NoProfile", "-ExecutionPolicy", "Bypass", "$PSVersionTable.PSVersion.Major"]
DEBUG subprocess: Selecting on IO
DEBUG subprocess: stdout: 2

回答1:

Found related vagrant issue here: https://github.com/mitchellh/vagrant/issues/3139

Updating powershell to v3.0 solved the issue: http://www.microsoft.com/en-us/download/details.aspx?id=34595



标签: vagrant