虽然实验成功,但是确实暂时用不到,最大感觉就是可又通过命令行或脚本来控制虚拟机,查看状态。其实exsi就有web版的控制台啊,管理也很方便,少量虚拟机不需要用vagrant折腾了
实验环境:win10, VirtualBox6.1.x ,
安装好vagrant和VirtualBox后,执行vagrant报错,看别人的教程都正常,我的怎么一直进行不下去呢?
百度和google都无解。
D:\vagrant>vagrant
Vagrant failed to initialize at a very early stage:
There was an error running VBoxManage. This is usually a permissions
problem or installation problem with VirtualBox itself, and not Vagrant.
Please note the error message below (if any), resolve the issue, and
try Vagrant again.
�ļ���Ŀ¼��������ȡ�� (1392)
静心分析一波
一直不行,提示是VirtualBox 的问题,但又不知道是什么问题,google也没有用,所又只好重装virtualBox了
=========重新安装最新版本virtualBox后,尽然成功了=======
D:\vagrant>vagrant box add centos7 f:\centos-7.0-x86_64.box
==> box: Box file was not detected as metadata. Adding it directly...
==> box: Adding box 'centos7' (v0) for provider:
box: Unpacking necessary files from: file:///f:/centos-7.0-x86_64.box
box:
==> box: Successfully added box 'centos7' (v0) for 'virtualbox'!
D:\vagrant>
D:\vagrant>vagrant init centos7
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.
D:\vagrant>vagrant up centos7
The machine with the name 'centos7' was not found configured for
this Vagrant environment.
D:\vagrant>vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Importing base box 'centos7'...
==> default: Matching MAC address for NAT networking...
==> default: Setting the name of the VM: vagrant_default_1599531325414_12727
==> default: Clearing any previously set forwarded ports...
Vagrant is currently configured to create VirtualBox synced folders with
the `SharedFoldersEnableSymlinksCreate` option enabled. If the Vagrant
guest is not trusted, you may want to disable this option. For more
information on this option, please refer to the VirtualBox manual:
https://www.virtualbox.org/manual/ch04.html#sharedfolders
This option can be disabled globally with an environment variable:
VAGRANT_DISABLE_VBOXSYMLINKCREATE=1
or on a per folder basis within the Vagrantfile:
config.vm.synced_folder '/host/path', '/guest/path', SharedFoldersEnableSymlinksCreate: false
==> 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: 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: Warning: Remote connection disconnect. Retrying...
default: Warning: Remote connection disconnect. Retrying...
default: Warning: Remote connection disconnect. Retrying...
default: Warning: Remote connection disconnect. Retrying...
default: Warning: Remote connection disconnect. Retrying...
一直报错,不影响虚拟机的启动
下个问题?
官方提供的box,应该够用,但大部分人还是想要自己制作吧