简体   繁体   中英

Error when Launching a vagrant box using "vagrant up" on Windows

I'm attempting to set a virtual machine enviroment using vagrant. I've done a couple of tries with different boxes via vagrantcloud.com, BUT I'm always getting stuck when I try to launch this box: I added a URL on vagrant file for downloads https://app.vagrantup.com/ubuntu/boxes/trusty64 , but i doesnt seem to work

λ vagrant init x9 ubuntu/boxes/bionic64

λ vagrant up Bringing machine 'default' up with 'virtualbox' provider... default: Box 'x9' could not be found. Attempting to find and install... default: Box Provider: virtualbox default: Box Version: >= 0 default: Box file was not detected as metadata. Adding it directly... default: Adding box 'x9' (v0) for provider: virtualbox default: Downloading: https://app.vagrantup.com/ubuntu/boxes/bionic64 default: An error occurred while downloading the remote file. The error message, if any, is reproduced below. Please fix this error and try again.

Failed to connect to app.vagrantup.com port 443: Timed out


Anyone knows how do I proceed ?

it's normal it cannot find this box if you haven't downloaded it yet. I tried and it works perfect, it downloads and start the box, i share you my basic config (which is what i tested)

Vagrant.configure("2") do |config|
  config.vm.box = "ubuntu/bionic64"
end

This is my output:

Bringing machine 'default' up with 'virtualbox' provider...
==> default: Box 'ubuntu/bionic64' could not be found. Attempting to find and install...
    default: Box Provider: virtualbox
    default: Box Version: >= 0
==> default: Loading metadata for box 'ubuntu/bionic64'
    default: URL: https://vagrantcloud.com/ubuntu/bionic64
==> default: Adding box 'ubuntu/bionic64' (v20200304.0.0) for provider: virtualbox
    default: Downloading: https://vagrantcloud.com/ubuntu/boxes/bionic64/versions/20200304.0.0/providers/virtualbox.box
==> default: Box download is resuming from prior download progress
    default: Download redirected to host: cloud-images.ubuntu.com
==> default: Successfully added box 'ubuntu/bionic64' (v20200304.0.0) for 'virtualbox'!
==> default: Importing base box 'ubuntu/bionic64'...
==> default: Matching MAC address for NAT networking...
==> default: Checking if box 'ubuntu/bionic64' version '20200304.0.0' is up to date...
==> default: Setting the name of the VM: amos_default_1583767787636_71616
==> default: Clearing any previously set network interfaces...
==> default: Preparing network interfaces based on configuration...
    default: Adapter 1: nat
==> default: Forwarding ports...
    default: 22 (guest) => 2222 (host) (adapter 1)
==> default: Running 'pre-boot' VM customizations...
==> default: Booting VM...
==> default: Waiting for machine to boot. This may take a few minutes...
    default: SSH address: 127.0.0.1:2222
    default: SSH username: vagrant
    default: SSH auth method: private key
    default: 
    default: Vagrant insecure key detected. Vagrant will automatically replace
    default: this with a newly generated keypair for better security.
    default: 
    default: Inserting generated public key within guest...
    default: Removing insecure key from the guest if it's present...
    default: Key inserted! Disconnecting and reconnecting using new SSH key...
==> default: Machine booted and ready!
==> default: Checking for guest additions in VM...
    default: The guest additions on this VM do not match the installed version of
    default: VirtualBox! In most cases this is fine, but in rare cases it can
    default: prevent things such as shared folders from working properly. If you see
    default: shared folder errors, please make sure the guest additions within the
    default: virtual machine match the version of VirtualBox you have installed on
    default: your host and reload your VM.
    default: 
    default: Guest Additions Version: 5.2.34
    default: VirtualBox Version: 6.1
==> default: Mounting shared folders...
    default: /vagrant => /home/amos

The only possible explanation is that you have bad internet connection...try to do a speed test here:

https://www.speedtest.net/

if you have bad connection try restart your modem or contact your internet provider

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM