简体   繁体   中英

Installing fedora-20 using vagrant

I have successfully installed VMware and vagrant in my win 7 64 bit system.

I am trying to install Fedora using vagrant using following command:

1) vargrant init chef/fedora-20

output:

A `Vagrantfile` has been placed in this directory. You are now
ready to `vagrant up` your first virtual environment! Please read
the comments in the Vagrantfile as well as documentation on
`vagrantup.com` for more information on using Vagrant.

2) vagrant up

output:

Bringing machine 'default' up with 'virtualbox' provider...
==> default: Box 'chef/fedora-20' could not be found. Attempting to find and ins
tall...
    default: Box Provider: virtualbox
    default: Box Version: >= 0
The box 'chef/fedora-20' could not be found or
could not be accessed in the remote catalog. If this is a private
box on HashiCorp's Atlas, please verify you're logged in via
`vagrant login`. Also, please double-check the name. The expanded
URL and error message are shown below:

URL: ["https://atlas.hashicorp.com/chef/fedora-20"]
Error: Failed connect to atlas.hashicorp.com:443; No error

I can access atlas.hashicorp.com in browser.

Command vagrant up failed because my proxy denied the access to atlas.hashicorp.com. If we can access any website using browser that does not mean we can access it using command prompt. Command prompt by default doesn't use the proxy setting from internet explorer. In order to fix this issue, I created 2 environment variables: " http_proxy " and " https_proxy ".

Steps to create environment variable in windows:

  1. Open the Control Panel and click the System icon. The System Properties dialog is displayed.
  2. On the Advanced tab, click on Environment Variables. The Environment Variables dialog is displayed.
  3. Click New in the System variables panel. The New SystemVariable dialog is displayed.
  4. Add http_proxy and https_proxy with the appropriate proxy information

Set the http_proxy and https_proxy variable with the hostname or IP address of the proxy server:http_proxy= http://proxy.example.org

If the proxy server requires a user name and password, include them in the following form:http_proxy= http://username:password@proxy.example.org

If the proxy server uses a port other than 80, include the port number:http_proxy= http://username:password@proxy.example.org:8080

For me that "chef/fedora-20" box is working correctly using your steps. It might be some access problem.

As an alternative you can try downloading the box with:

vagrant box add chef/fedora-20

And then trying the same vagrant up .

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