Vagrant 流浪者上不去';不工作,不';不返回任何错误(Windows 7)

Vagrant 流浪者上不去';不工作,不';不返回任何错误(Windows 7),vagrant,vagrant-windows,Vagrant,Vagrant Windows,我在一个运行在Roots WP堆栈上的站点上工作,我们现在正计划从xampp切换到vagrant。问题是当我运行“流浪者”时,什么也没发生。没有错误,没有任何输出,它只是挂起,直到我退出命令。运行vagrant init会创建一个vagrant文件,但vagrant up完全不起任何作用 我现在正在Windows7上工作,在一台工作电脑上。我过去成功地使用了Wagrant,没有任何问题 # -*- mode: ruby -*- # vi: set ft=ruby : # All Vag

我在一个运行在Roots WP堆栈上的站点上工作,我们现在正计划从xampp切换到vagrant。问题是当我运行“流浪者”时,什么也没发生。没有错误,没有任何输出,它只是挂起,直到我退出命令。运行vagrant init会创建一个vagrant文件,但vagrant up完全不起任何作用

我现在正在Windows7上工作,在一台工作电脑上。我过去成功地使用了Wagrant,没有任何问题

    # -*- mode: ruby -*-
# vi: set ft=ruby :

# All Vagrant configuration is done below. The "2" in Vagrant.configure
# configures the configuration version (we support older styles for
# backwards compatibility). Please don't change it unless you know what
# you're doing.
Vagrant.configure("2") do |config|
  # The most common configuration options are documented and commented below.
  # For a complete reference, please see the online documentation at
  # https://docs.vagrantup.com.

  # Every Vagrant development environment requires a box. You can search for
  # boxes at https://vagrantcloud.com/search.
  config.vm.box = "precise32"

  # The url from where the 'config.vm.box' box will be fetched if it
  # doesn't already exist on the user's system.
  config.vm.box_url = "http://files.vagrantup.com/precise32.box"

  # Create a forwarded port mapping which allows access to a specific port
  # within the machine from a port on the host machine. In the example below,
  # accessing "localhost:8080" will access port 80 on the guest machine.
  # NOTE: This will enable public access to the opened port
  # config.vm.network "forwarded_port", guest: 80, host: 8080

  # Create a forwarded port mapping which allows access to a specific port
  # within the machine from a port on the host machine and only allow access
  # via 127.0.0.1 to disable public access
  # config.vm.network "forwarded_port", guest: 80, host: 8080, host_ip: "127.0.0.1"

  # Create a private network, which allows host-only access to the machine
  # using a specific IP.
  # config.vm.network "private_network", ip: "192.168.33.10"

  # Create a public network, which generally matched to bridged network.
  # Bridged networks make the machine appear as another physical device on
  # your network.
  # config.vm.network "public_network"

  # Share an additional folder to the guest VM. The first argument is
  # the path on the host to the actual folder. The second argument is
  # the path on the guest to mount the folder. And the optional third
  # argument is a set of non-required options.
  # config.vm.synced_folder "../data", "/vagrant_data"

  # Provider-specific configuration so you can fine-tune various
  # backing providers for Vagrant. These expose provider-specific options.
  # Example for VirtualBox:
  #
  # config.vm.provider "virtualbox" do |vb|
  #   # Display the VirtualBox GUI when booting the machine
  #   vb.gui = true
  #
  #   # Customize the amount of memory on the VM:
  #   vb.memory = "1024"
  # end
  #
  # View the documentation for the provider you are using for more
  # information on available options.

  # Enable provisioning with a shell script. Additional provisioners such as
  # Puppet, Chef, Ansible, Salt, and Docker are also available. Please see the
  # documentation for more information about their specific syntax and use.
  # config.vm.provision "shell", inline: <<-SHELL
  #   apt-get update
  #   apt-get install -y apache2
  # SHELL
end
#-*-模式:ruby-*-
#vi:set ft=ruby:
#所有的流浪配置都在下面完成。Vagrant.configure中的“2”
#配置配置版本(我们支持较旧的
#向后兼容性)。除非你知道什么,否则请不要改变它
#你在干什么。
Vagrant.configure(“2”)do | config|
#下面对最常见的配置选项进行了说明和评论。
#有关完整的参考资料,请参阅
# https://docs.vagrantup.com.
#每个流浪的开发环境都需要一个盒子。你可以搜索
#盒子在https://vagrantcloud.com/search.
config.vm.box=“precise32”
#“config.vm.box”框将从中提取的url,如果
#在用户的系统上不存在。
config.vm.box_url=”http://files.vagrantup.com/precise32.box"
#创建允许访问特定端口的转发端口映射
#从主机上的端口在计算机内。在下面的例子中,
#访问“localhost:8080”将访问来宾计算机上的端口80。
#注意:这将允许公众访问打开的端口
#config.vm.network“forwarded_port”,来宾:80,主机:8080
#创建允许访问特定端口的转发端口映射
#从主机上的某个端口访问计算机内部,并且仅允许访问
#通过127.0.0.1禁用公共访问
#config.vm.network“forwarded_port”,guest:80,host:8080,host_ip:“127.0.0.1”
#创建专用网络,仅允许主机访问计算机
#使用特定的IP。
#config.vm.network“专用_网络”,ip:“192.168.33.10”
#创建一个公共网络,它通常与桥接网络相匹配。
#桥接网络使机器显示为计算机上的另一个物理设备
#你的网络。
#config.vm.network“公共_网络”
#将其他文件夹共享到来宾VM。第一个论点是
#主机上实际文件夹的路径。第二个论点是
#来宾服务器上装载文件夹的路径。还有第三个选项
#参数是一组非必需的选项。
#config.vm.synced_文件夹“./data”,“/vagrant_data”
#提供程序特定的配置,以便您可以微调各种
#为流浪者提供支持。这些公开特定于提供程序的选项。
#VirtualBox的示例:
#
#config.vm.provider“virtualbox”do | vb|
##启动机器时显示VirtualBox GUI
#vb.gui=true
#
##自定义虚拟机上的内存量:
#vb.memory=“1024”
#结束
#
#有关详细信息,请查看您正在使用的提供程序的文档
#关于可用选项的信息。
#使用shell脚本启用资源调配。其他供应人,如
#木偶,厨师,Ansible,盐和码头工人也可以。请看
#有关其特定语法和用法的详细信息,请参阅文档。

#config.vm.provision“shell”,内联:如果由于与VirtualBox通信而在Windows上挂起Vagrant命令,这可能是由VirtualBox的权限问题引起的。这很容易解决。以普通用户或管理员身份启动VirtualBox将阻止您以相反的方式使用它。请记住,当Vagrant与VirtualBox交互时,它将以与运行Vagrant的控制台相同的访问级别与之交互

要解决此问题,请完全关闭所有VirtualBox计算机和GUI。等几秒钟。然后,仅使用您希望使用的访问级别启动VirtualBox。

我也遇到了同样的问题(Windows7 Pro SP1、VirtualBox 5.1.26、vagrant 1.9.7)。
我已通过将vagrant降级至1.9.6解决了此问题。

由于在vagrant中调用powershell而存在此问题。这仍然是当前(2.0.1)vagrant版本的一个问题

相关的

有多种解决方案:

  • 将vagrant降级至1.9.6
  • 将powershell更新到更高版本
    • 我也有类似的问题。 我的环境是Vagrant 2.0.2、virtualbox 5.2.6和win 7。
      我最终通过将powershell 2更新为powershell 4解决了这个问题。

      这里也一样。我把Vagrant降到了1.9.6以使它正常工作。这篇文章似乎是重复的。下载Windows 7的Windows管理框架,查看此链接以获取完整的解决方案: