Vagrant Box installation Centos encounter pit
The main thing is that there are some pits when installing Centos. Moreover, most of the online tutorials are not complete, so I am writing this blog to help some of the newcomers to the pit of Vagrant Box.
virtualBox>
virtualBox>
virtualBox>
virtualBox>
virtualBox>
virtualBox>
virtualBox>
virtualBox>
virtualBox>
virtualBox>
virtualBox>
virtualBox>
virtualBox> Virtualbox-6.0.18-136238-win
1. CMD below to initialize your virtual environment vagrant init your environment name, which I use when
D:\self\vagrant_workspace>vagrant init centos7
2. Generally, this process is extremely slow and may not succeed, because it needs to go to the remote factory to download, you can use the University of Science and Technology of China mirror this is faster
D:\self\vagrant_workspace>vagrant init centos7 https://mirrors.ustc.edu.cn/centos-cloud/centos/7/vagrant/x86_64/images/CentOS-7.box
3. Don’t worry about the following errors that may occur in the first and second steps
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.
again.
4. Use the following command to view the Vagrant installation list to see if the installation was successful
D:\self\vagrant_workspace>vagrant box list
5. Start the vagrant
D:\self\vagrant_workspace>vagrant up
The following error may occur
An error occurred while downloading the remote file. The error
message, if any, is reproduced below. Please fix this error and try
again.
Couldn't open file D:/self/vagrant_workspace/base
Box = “base”, default is “base”, you need to change the name of your own environment, here I will change it to “config.vm.box =” centos7 “
and then execute the command again
D:\self\vagrant_workspace>vagrant up
The presence of this indicates successful startup
default: SSH username: vagrant
default: SSH auth method: private key