linux - "vagrant halt"死于错误 "The SSH connection was unexpectedly closed by the remote end..."但机器成功关闭。 (

标签 linux ubuntu ssh vagrant ubuntu-16.04

我有 6 个运行 Ubuntu 16.04 的虚拟机,主机也是 Ubuntu 16.04。 Vagrant 版本 1.8.1

当我运行 vagrant halt 时,出现错误:

The SSH connection was unexpectedly closed by the remote end. This
usually indicates that SSH within the guest machine was unable to                                      
properly start up. Please boot the VM in GUI mode to check whether                                     
it is booting properly. 

观察 VirtualBox GUI,我看到虚拟机关闭了。但是 vagrant 脚本停止并且不会尝试关闭其他虚拟机。我必须为我运行的每个虚拟机运行一次“vagrant halt”。每次它关闭下一个虚拟机,但随后又因 SSH 连接错误而死掉。

当我再次启动虚拟机时,我没有注意到它们有任何问题。

我找到了一个建议 install libpam-systemd :“否则网络在 sshd 之前停止并且连接保持打开状态。”我使用 apt 在每个 VM 上安装 libpam-systemd,但我仍然遇到 SSH 连接错误。

最佳答案

这是一个vagrant bug,在后来的版本中被修复了。我没有使用 ubuntu apt 包,而是从 vagrants 网站安装了最新的包。

关于linux - "vagrant halt"死于错误 "The SSH connection was unexpectedly closed by the remote end..."但机器成功关闭。 (,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43049433/

相关文章:

ubuntu - 使用 Ubuntu 在虚拟机上安装 Kubernetes

ubuntu - Ubuntu中的终端

git - 通过ssh克隆Bitbucket存储库

c - netfilter_queue 虚假数据包

linux - 创建文件的 chmod 755 权限

linux - 如果反引号无法执行,则 STDERR 重定向到 STDOUT 会丢失

linux - 在主机混合设置上正确查找主机上的磁盘大小

ubuntu - Docker-Compose 错误 : "line 1: Not: command not found" when executing --version (Current Version 1. 27.4)

linux - 使用 SSH 的嵌套 grep

macos - 升级到 macOS 10.12 (Sierra) 后使用 Capistrano 部署代码时出现问题, “Permission denied (publickey).”