即在运行vagrant up时得到其的下载路径,如:

https://vagrantcloud.com/ubuntu/boxes/xenial64/versions/20190101.0.0/providers/virtualbox.box

然后直接在浏览器上访问该网址来下载该box

先查看本地安装的box:

userdeMBP:ubuntu-16.04 user$ vagrant box list
hashicorp/precise64 (virtualbox, 1.1.)
hashicorp/vagrant-share (virtualbox, 0.1.)
tknerr/baseimage-ubuntu-12.04 (docker, 1.0.)

再将得到的box文件手动添加进去:

userdeMBP:ubuntu-16.04 user$ vagrant box add --name ubuntu/xenial64 /Users/user/ubuntu-16.04/xenial-server-cloudimg-amd64-vagrant.box
==> box: Box file was not detected as metadata. Adding it directly...
==> box: Adding box 'ubuntu/xenial64' (v0) for provider:
box: Unpacking necessary files from: file:///Users/user/ubuntu-16.04/xenial-server-cloudimg-amd64-vagrant.box
==> box: Successfully added box 'ubuntu/xenial64' (v0) for 'virtualbox'!

然后再查看本地果然多了一个新的box:

userdeMBP:ubuntu-16.04 user$ vagrant box list
hashicorp/precise64 (virtualbox, 1.1.)
hashicorp/vagrant-share (virtualbox, 0.1.)
tknerr/baseimage-ubuntu-12.04 (docker, 1.0.)
ubuntu/xenial64 (virtualbox, )

然后再在相应vagrantfile对应的目录下运行vagrant up即可运行起来了:

userdeMBP:ubuntu-16.04 user$ vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Importing base box 'ubuntu/xenial64'...
==> default: Matching MAC address for NAT networking...
==> default: Setting the name of the VM: ubuntu-1604_default_1546496409973_90048
==> default: Vagrant has detected a configuration issue which exposes a
==> default: vulnerability with the installed version of VirtualBox. The
==> default: current guest is configured to use an E1000 NIC type for a
==> default: network adapter which is vulnerable in this version of VirtualBox.
==> default: Ensure the guest is trusted to use this configuration or update
==> default: the NIC type using one of the methods below:
==> default:
==> default: https://www.vagrantup.com/docs/virtualbox/configuration.html#default-nic-type
==> default: https://www.vagrantup.com/docs/virtualbox/networking.html#virtualbox-nic-type
==> default: Clearing any previously set network interfaces...
==> default: Preparing network interfaces based on configuration...
default: Adapter : nat
==> default: Forwarding ports...
default: (guest) => (host) (adapter )
==> 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:
default: SSH username: vagrant
default: SSH auth method: private key
default: Warning: Connection reset. Retrying...
default: Warning: Remote connection disconnect. Retrying...
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.1.
default: VirtualBox Version: 5.2
==> default: Mounting shared folders...
default: /vagrant => /Users/user/ubuntu-16.04

然后使用vagrant ssh即可进入:

userdeMBP:ubuntu-16.04 user$ vagrant ssh
Welcome to Ubuntu 16.04. LTS (GNU/Linux 4.4.--generic x86_64) * Documentation: https://help.ubuntu.com
* Management: https://landscape.canonical.com
* Support: https://ubuntu.com/advantage Get cloud support with Ubuntu Advantage Cloud Guest:
http://www.ubuntu.com/business/services/cloud packages can be updated.
updates are security updates. New release '18.04.1 LTS' available.
Run 'do-release-upgrade' to upgrade to it. vagrant@ubuntu-xenial:~$

vagrant up下载box慢的解决办法的更多相关文章

  1. Discuz升级提示static/image/postbg/3.jpg下载出现问题的解决办法

    discuz2.5升级3.0的时候出现错误.提示static/image/postbg/3.jpg下载出现问题,其解决办法如下 找到 source/admincp/admincp_upgrade.ph ...

  2. 遭遇Asp.Net长文件名下载的问题和解决办法

    在Asp.Net中写了一个附件上传和下载的程序,附件上传到数据库中,然后将附件的GUID保存起来,我们可以根据GUID来找到数据库中的附件,一般附件下载的代码是: <!--<br /> ...

  3. Asp.Net长文件名下载的问题和解决办法

    在Asp.Net中写了一个附件上传和下载的程序,附件上传到数据库中,然后将附件的GUID保存起来,我们可以根据GUID来找到数据库中的附件,一般附件下载的代码是: <!--<br /> ...

  4. Firefox下载附件乱码的解决办法

    通过在http的header里设置fileName下载附件时,中文文件名通过chrome浏览器下载时正常,通过firefox下载时为乱码: 原来的Java代码: response.addHeader( ...

  5. Android SDK Manager 下载SDK失败的解决办法

    摘要:本文记录了无法使用Android SDK  Manager下载SDK开发包的解决办法. 最近需要进行android应用程序的开发工作,在android官网下载了adt-bundle-linux- ...

  6. STM32 SWD下载口无法下载的原因和解决办法

    1.SWD的下载口在程序中被禁用,IO口被设置为普通IO口 2.芯片被锁,原因有可能是程序执行了不正确的访问导致芯片被锁 3.供电不正常 4.SWD烧了 解锁原因: 在下载程序的时候有时候会发生错误导 ...

  7. Click One客户端安装后将安装目录删除,再从服务器下载安装无法安装解决办法

    报错信息: 平台版本信息 Windows : 6.1.7601.65536 (Win32NT) Common Language Runtime : 4.0.30319.42000 System.Dep ...

  8. ubuntu---github下载太慢的解决办法

    git clone --recursive https://github.com/tensorflow/tensorflow  下载太慢了,20:05-21:17 才下载了17%,等的太急人了. ** ...

  9. eclipse maven项目下载jar包失败解决办法

    1.找到我们的本地maven仓库目录 我的是 H:\Java\maven\Repository 2.搜索出该目录下的*lastUpdated.properties文件并删除,如下图所示,可以通过模糊搜 ...

随机推荐

  1. 自定义一个可以动态折叠的UITAbleViewCell

    看到code 4APP上有一个折叠的UITAbleViewCell,不过是swift的,所以自己尝试做一个简单的可折叠的UITAbleViewCell 主要实现一个可以折叠的UITAbleViewCe ...

  2. 分机号-2015决赛C语言C组第一题

    标题:分机号 X老板脾气古怪,他们公司的电话分机号都是3位数,老板规定,所有号码必须是降序排列,且不能有重复的数位.比如: 751,520,321 都满足要求,而, 766,918,201 就不符合要 ...

  3. JDBC、mybatis、hibernate连接数据库

    JDBC连接数据库五步骤: 一.加载驱动 Class.forName(“com.mysql.jdbc.Driver”); 二.建立连接 Connection conn = DriverManager. ...

  4. Android - AsyncTask你知道多少?

    http://www.cnblogs.com/qlky/p/5658070.html 为什么asyncTask最好在主线程初始化?在子线程怎么办? AsyncTask四个方法的执行顺序? mWorke ...

  5. 理解JVM之垃圾收集器概述

    前言 很多人将垃圾收集(Garbage Collection)视为Java的伴生产物,实际1960年诞生的Lisp是第一门真正使用内存动态分配与垃圾手机技术的语言.在目前看来,内存的动态分配与内存回收 ...

  6. 华中农业大学第五届程序设计大赛网络同步赛-L

    L.Happiness Chicken brother is very happy today, because he attained N pieces of biscuits whose tast ...

  7. php实现同一时间内一个账户只允许在一个终端登陆

    在账户表的基础上,我新建了一个账户account_session表,用来记录登录账户的account_id和最新一次登录成功用户的session_id,然后首先要修改登录方法:每次登录成功后,要将登录 ...

  8. <Android 应用 之路> 一个类似今日头条的APP

    简介 最近花了一两天的时间完成一个简易的新闻头条客户端的应用,引用到了SwipeRefreshLayout,CircleImageView,RxAndroid,Picasso,PhotoPicker等 ...

  9. [性能调优]在PeopleSoft中使用函数索引

    那些没有在PeopleSoft系统遇到性能问题的人,特别是基于Oracle数据库的PeopleSoft,可能不知道基于函数的索引. 根据定义,基于函数的索引是使用如下方法定义的: 基于表达式,例如算术 ...

  10. 浅析ARM公司在物联网领域的战略布局

    From: http://www.cnblogs.com/yefanqiu/p/3447769.html 浅析ARM公司在物联网领域的战略布局 随着ARM芯片的出货量越来越多,自信满满的ARM公司统一 ...