为vagrant windows box更正“config.ssh.shell”值?
发布时间:2020-12-14 02:47:07 所属栏目:Windows 来源:网络整理
导读:我正在使用 Windows 7从主机启动流浪盒,这也是带有“vagrant up”命令的Windows 7. Vagrantfile的内容: Vagrant.configure(2) do |config| config.vm.box = "win7_base_test" config.vm.network "forwarded_port",guest: 88,host: 3088 config.ssh.username
我正在使用
Windows 7从主机启动流浪盒,这也是带有“vagrant up”命令的Windows 7.
Vagrantfile的内容: Vagrant.configure(2) do |config| config.vm.box = "win7_base_test" config.vm.network "forwarded_port",guest: 88,host: 3088 config.ssh.username = "vagrant" config.ssh.password = "vagrant" config.ssh.port = "3088" config.ssh.host = "127.0.0.1" config.ssh.shell = "cmd" end 结果我得到以下列表,最后出现错误: vagrant up Bringing machine 'default' up with 'virtualbox' provider... ==> default: Clearing any previously set forwarded ports... ==> default: Clearing any previously set network interfaces... ==> default: Preparing network interfaces based on configuration... default: Adapter 1: nat ==> default: Forwarding ports... default: 88 => 3088 (adapter 1) ==> default: Booting VM... ==> default: Waiting for machine to boot. This may take a few minutes... default: SSH address: 127.0.0.1:3088 default: SSH username: vagrant default: SSH auth method: password default: Warning: Connection timeout. Retrying... The configured shell (config.ssh.shell) is invalid and unable to properly execute commands. The most common cause for this is using a shell that is unavailable on the system. Please verify you're using the full path to the shell and that the shell is executable by the SSH user. 注意:我可以通过在此期间执行“vagrant ssh”连接到vagrant box并在那里发出shell命令. 因此我有一个问题:我对“config.ssh.shell”参数使用正确的值(“cmd”)吗?那里有什么价值? 谢谢! 解决方法
一种选择是使用WinRM而不是SSH:将config.vm.communicator设置为“winrm”.
(编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |
相关内容
- windows-8 – WinJS.xhr本地网络错误
- windows – wbadmin系统状态备份失败
- 从Windows复制文件到Linux显示乱码问题
- windows-7 – 机器无法再在本地网络上通信
- 在Windows上从python连接到odbc的常用方法?
- windows重叠I/O模型
- Azure Key Vault (2) 使用Azure Portal创建和查看Azure Key
- windows-server-2008 – Windows Server 2016 Essentials和
- powershell – Nuget.exe安装 – Microsoft.CSharp已经具有
- windows – 将程序安装到Program Files是最佳做法吗?