【发布时间】:2017-03-27 14:39:42
【问题描述】:
我有 6 个运行 Ubuntu 16.04 的虚拟机,主机也是 Ubuntu 16.04。流浪者版本 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,我看到 VM 已关闭。但是 vagrant 脚本会停止并且不会尝试关闭其他虚拟机。我必须为我运行的每个 VM 运行一次“vagrant halt”。每次它关闭下一个虚拟机,但随后又因 SSH 连接错误而死机。
当我再次启动虚拟机时,我没有注意到它们有任何问题。
我找到了给install libpam-systemd 的建议:“否则网络会在 sshd 之前停止,并且连接会保持打开状态。”我使用 apt 在每个 VM 上安装 libpam-systemd,但仍然出现 SSH 连接错误。
【问题讨论】:
标签: linux ubuntu ssh vagrant ubuntu-16.04