簡體   English   中英

流浪漢不在勝利10上工作

[英]vagrant not working on win 10

我最近從7遷移到10。我的流浪漢最初在7贏方面表現不錯,但在新的10贏中; 它無法正常工作。

 default: Warning: Connection timeout. Retrying...
    default: Warning: Connection timeout. Retrying...
    default: Warning: Connection timeout. Retrying...
    default: Warning: Connection timeout. Retrying...
    default: Warning: Connection timeout. Retrying...
    default: Warning: Connection timeout. Retrying...
    default: Warning: Connection timeout. Retrying...
    default: Warning: Connection timeout. Retrying...
    default: Warning: Connection timeout. Retrying...
    default: Warning: Connection timeout. Retrying...
    default: Warning: Connection timeout. Retrying...
    default: Warning: Connection timeout. Retrying...
    default: Warning: Connection timeout. Retrying...
    default: Warning: Connection timeout. Retrying...
    default: Warning: Connection timeout. Retrying...
    default: Warning: Connection timeout. Retrying...
    default: Warning: Connection timeout. Retrying...
    default: Warning: Connection timeout. Retrying...
Timed out while waiting for the machine to boot. This means that
Vagrant was unable to communicate with the guest machine within
the configured ("config.vm.boot_timeout" value) time period.

If you look above, you should be able to see the error(s) that
Vagrant had when attempting to connect to the machine. These errors
are usually good hints as to what may be wrong.

If you're using a custom box, make sure that networking is properly
working and you're able to connect to the machine. It is a common
problem that networking isn't setup properly in these boxes.
Verify that authentication configurations are also setup properly,
as well.

If the box appears to be booting properly, you may want to increase
the timeout ("config.vm.boot_timeout") value.

然后當我vagrant ssh我得到

ssh_exchange_identification: read: Connection reset by peer

任何解決方案請

問題不是Vagrant,而是Virtualbox,它尚未與Windows 10兼容。

您可以在此處獲得測試版本,該版本可以修復大多數錯誤https://www.virtualbox.org/wiki/Testbuilds

這里有一個關於如何克服橋接網絡問題的解釋https://forums.virtualbox.org/viewtopic.php?f=6&t=68444

這是我的vagrantfile配置

# -*- 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://atlas.hashicorp.com/search.
  config.vm.box = "ubuntu/trusty64"

  # Disable automatic box update checking. If you disable this, then
  # boxes will only be checked for updates when the user runs
  # `vagrant box outdated`. This is not recommended.
  # config.vm.box_check_update = false

  # 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.
  config.vm.network "forwarded_port", guest: 80, host: 8080
  config.vm.network "forwarded_port", guest: 3306, host: 3306
  config.vm.network "forwarded_port", guest: 9000, host: 9000

  # 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 = "3000"
    vb.cpus = "2"
  end
  #
  # View the documentation for the provider you are using for more
  # information on available options.

  # Define a Vagrant Push strategy for pushing to Atlas. Other push strategies
  # such as FTP and Heroku are also available. See the documentation at
  # https://docs.vagrantup.com/v2/push/atlas.html for more information.
  # config.push.define "atlas" do |push|
  #   push.app = "YOUR_ATLAS_USERNAME/YOUR_APPLICATION_NAME"
  # end

  # 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
    sudo apt-get update
    debconf-set-selections <<< 'mysql-server mysql-server/root_password password anysecurepassword'
    debconf-set-selections <<< 'mysql-server mysql-server/root_password_again password anysecurepassword'
    debconf-set-selections <<< 'phpmyadmin phpmyadmin/dbconfig-install boolean false'
    debconf-set-selections <<< 'phpmyadmin phpmyadmin/reconfigure-webserver multiselect apache2'
    debconf-set-selections <<< 'phpmyadmin phpmyadmin/app-password-confirm password anysecurepassword'
    debconf-set-selections <<< 'phpmyadmin phpmyadmin/mysql/admin-pass password anysecurepassword'
    debconf-set-selections <<< 'phpmyadmin phpmyadmin/password-confirm password anysecurepassword'
    debconf-set-selections <<< 'phpmyadmin phpmyadmin/setup-password password anysecurepassword'
    debconf-set-selections <<< 'phpmyadmin phpmyadmin/database-type select mysql'
    debconf-set-selections <<< 'phpmyadmin phpmyadmin/mysql/app-pass password anysecurepassword'
    debconf-set-selections <<< 'dbconfig-common dbconfig-common/mysql/app-pass password anysecurepassword'
    debconf-set-selections <<< 'dbconfig-common dbconfig-common/mysql/app-pass anysecurepassword'
    debconf-set-selections <<< 'dbconfig-common dbconfig-common/password-confirm password anysecurepassword'
    debconf-set-selections <<< 'dbconfig-common dbconfig-common/app-password-confirm password anysecurepassword'
    debconf-set-selections <<< 'dbconfig-common dbconfig-common/app-password-confirm password anysecurepassword'
    debconf-set-selections <<< 'dbconfig-common dbconfig-common/password-confirm password anysecurepassword'
    sudo apt-get install -y apache2
    sudo apt-get install -y mysql-server
    sudo apt-get install -y openssh-server unattended-upgrades
    sudo apt-get install -y unzip zip aspell-en aspell-fr aspell-de aspell-es
    sudo apt-get install -y curl php5-curl php5-gd php5-xmlrpc php5-intl
    sudo apt-get install -y clamav-base clamav-freshclam clamav php5-mcrypt
    sudo apt-get install -y nodejs
    sudo apt-get install -y npm
    sudo php5enmod mcrypt
    #cd /var/www/html
    #sudo wget http://wordpress.org/latest.tar.gz
    #sudo tar -xvzf latest.tar.gz
    #mv wordpress/* .
    #rm -R wordpress
    apt-get -y install phpmyadmin
    sudo ln -s /usr/share/phpmyadmin /var/www/html
    chown -R www-data:www-data /var/www
    chmod -R 755 /var/www
    sudo a2enmod rewrite
    sudo service apache2 restart
    #curl -sS https://getcomposer.org/installer | php

  SHELL
end

確保關閉HYPER-V

在此處輸入圖片說明

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM