VirtulBox builds virtual machine cluster environment (Vagrant)

One, install centos7 based on vagrant

Link: Click

Two, install centos in batches

Find the following files in the environment based on the first step,
Insert picture description here
then create a new folder, put it in the installation location you specify, and changeThe port number
Note: The newly created file must have an English name and cannot contain Chinese characters
Insert picture description here
Open the cmd command in the current address bar window
Insert picture description here

vagrant up   #拉取镜像

Insert picture description here

You can see that the .vagrant file is generated in your current directory.
Insert picture description here
Open VirtulBox and you can see that the virtual machine runs successfully
Insert picture description here

Three, test the connection

vagrant ssh

At this time, you will encounter the following error

SSH login error: [email protected]: Permission denied (publickey,gssapi-keyex,gssapi-with-mic).
Insert picture description here

Solution:
Open the previous .Vagrantfile file to findprivate_key
Insert picture description here
Properties-"Security-"Advanced Settings
Insert picture description here

It can be seen that the user does not have full control. At this time, you need to add
Insert picture description here
next—>input the user to be added (input think)—>Check name—>determine
Insert picture description here
OK
Insert picture description here
Insert picture description here
Insert picture description here
Application—>Continue to test

Insert picture description here
testing successfully! ! !

Guess you like

Origin blog.csdn.net/weixin_44763595/article/details/110288555