vagrant安裝遇到的問題
一、vagrant up
提示版本過低
The version of powershell currently installed on this host is less than
the required minimum version. Please upgrade the installed version of
powershell to the minimum required version and run the command again.
Installed version: 2
Minimum required version: 3
解決辦法:
下載對應的 更新下 更新好後會提示重啟 重啟下電腦就可以了
連結:https://pan.baidu.com/s/1Q_nqSaeN-5i_yrq-0gH4IA
密碼:95hd
windows 7 SP1
64位選用Windows6.1-KB2819745-x64-MultiPkg.msu
二、在vagrant使用命令vagrant up啟動虛擬機器時
出錯:
C:\Vagrant>vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Box 'base' could not be found. Attempting to find and install...
default: Box Provider: virtualbox
default: Box Version: >= 0
==> default: Box file was not detected as metadata. Adding it directly...
==> default: Adding box 'base' (v0) for provider: virtualbox
default: Downloading: base
default:
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 /E:/WorkSpace/Vagrant/base
原因分析:
在使用vagrant init命令初始化配置檔案的時候未指定虛擬機器名稱,也就是命令:vagrant box addBoxNameboxpath中的BoxName。
解決辦法:
1.再來一遍,重新生成Vagrantfile配置檔案
vagrant init BoxName
2.修改Vagrantfile檔案中config.vm.box引數:
config.vm.box = "base"
將base修改為你的虛擬機器名稱。
說白了就是沒在安裝目錄下執行,所以找不到檔案
三、安裝好後可以用box工具登陸
預設賬號密碼都是vagrant