我目前正在努力让 Ubuntu 18.04LTS 的自定义映像在 GCE 中工作。我正在使用 Ubuntu 桌面版,因为之后在 Google stock Ubuntu 上安装 gdm3 似乎无法提供我的用户所需的体验(我将使用 NoMachine 让用户使用该实例)。
实例似乎已成功构建。但是,我似乎无法将实例 ping 到其内部/临时 IP,SSH 也不起作用。此映像是使用 VMWare Workstation 12 制作的,这意味着我正在将单个 .VMDK 文件从 VM 上传到 GCP 以形成映像。映像构建成功,没有错误。当然,当我在 VMware 中运行 VM 时,一切都运行正常。
- 我在虚拟机中运行了 Google Cloud Precheck 工具;毫无疑问通过了。
- 我关注了谷歌指导方针配置 SSH、DHCP、NTP 等。在 VMware 中使用时,所有服务都已启用、正在运行并可从我的电脑访问。
- VM的防火墙已禁用,GCE的防火墙已打开。
- 创建图像时包含宾客包。
进一步的研究这让我觉得虚拟机需要额外的 KVM/VirtIO/Kernel 包或配置,尽管我并不完全确定从哪里开始,或者它是否会修复任何问题。我基本上完全不知道为什么这个东西不能工作,因为它似乎没有最少的连接性。
这是在尝试通过 SSH 进入自定义映像后,从自定义映像部署实例时串行输出的一部分。此输出似乎无限循环。谁能帮我?我在这里错过了哪些步骤?
[[0;32m OK [0m] Created slice user-121.slice.
May 20 13:31:13 inst-translator-import-and-translate-translate-translate-qw66d systemd[1]: Starting User Manager for UID 121...
Starting User Manager for UID 121...
May 20 13:31:13 inst-translator-import-and-translate-translate-translate-qw66d systemd[1]: Started Session c502 of user gdm.
[[0;32m OK [0m] Started Session c502 of user gdm.
May 20 13:31:13 inst-translator-import-and-translate-translate-translate-qw66d systemd[15438]: Starting D-Bus User Message Bus Socket.
May 20 13:31:13 inst-translator-import-and-translate-translate-translate-qw66d systemd[15438]: Listening on GnuPG cryptographic agent (ssh-agent emulation).
May 20 13:31:13 inrun-user-121.mount
st-translator-import-and-translate-translate-translate-qw66d systemd[15438]: Reached target Timers.
May 20 13:31:13 inst-translator-import-and-translate-translate-translate-qw66d systemd[15438]: Listening on GnuPG network certificate management daemon.
May 20 13:31:13 inst-translator-import-and-translate-translate-translate-qw66d systemd[15438]: Listening on GnuPG cryptographic agent and passphrase cache (access for web browsers).
May 20 13:31:13 inst-translator-import-and-translate-translate-translate-qw66d systemd[15438]: Listening on GnuPG cryptographic agent and passphrase cache.
May 20 13:31:13 inst-translator-import-and-translate-translate-translate-qw66d systemd[15438]: Listening on GnuPG cryptographic agent and passphrase cache (restricted).
May 20 13:31:13 inst-translator-import-and-translate-translate-translate-qw66d systemd[15438]: Started Pending report trigger for Ubuntu Report.
May 20 13:31:13 inst-translator-import-and-translate-translate-translate-qw66d systemd[15438]: Reached target Paths.
May 20 13:31:13 inst-translator-import-and-translate-translate-translate-qw66d systemd[15438]: Listening on Sound System.
May 20 13:31:13 inst-translator-import-and-translate-translate-translate-qw66d systemd[15438]: Listening on REST API socket for snapd user session agent.
May 20 13:31:13 inst-translator-import-and-translate-translate-translate-qw66d systemd[15438]: Listening on D-Bus User Message Bus Socket.
May 20 13:31:13 inst-translator-import-and-translate-translate-translate-qw66d systemd[15438]: Reached target Sockets.
May 20 13:31:13 inst-translator-import-and-translate-translate-translate-qw66d systemd[15438]: Reached target Basic System.
May 20 13:31:13 inst-translator-import-and-translate-translate-translate-qw66d systemd[1]: Started User Manager for UID 121.
May 20 13:31:13 inst-translator-import-and-translate-translate-translate-qw66d systemd[15438]: Reached target Default.
May 20 13:31:13 inst-translator-import-and-translate-translate-translate-qw66d systemd[15438]: Startup finished in 34ms.
[[0;32m OK [0m] Started User Manager for UID 121.
May 20 13:31:13 inst-translator-import-and-translate-translate-translate-qw66d systemd[15438]: Started D-Bus User Message Bus.
May 20 13:31:13 inst-translator-import-and-translate-translate-translate-qw66d dbus-daemon[15452]: [session uid=121 pid=15452] AppArmor D-Bus mediation is enabled
May 20 13:31:13 inst-translator-import-and-translate-translate-translate-qw66d gnome-session-binary[15454]: WARNING: App 'org.gnome.Shell.desktop' exited with code 1
Stopping User Manager for UID 121...
May 20 13:31:13 inst-translator-import-and-translate-translate-translate-qw66d systemd[1]: Stopping User Manager for UID 121...
May 20 13:31:13 inst-translator-import-and-translate-translate-translate-qw66d systemd[15438]: Stopped target Default.
May 20 13:31:13 inst-translator-import-and-translate-translate-translate-qw66d systemd[15438]: Stopping D-Bus User Message Bus...
May 20 13:31:13 inst-translator-import-and-translate-translate-translate-qw66d systemd[15438]: Stopped D-Bus User Message Bus.
May 20 13:31:13 inst-translator-import-and-translate-translate-translate-qw66d systemd[15438]: Stopped target Basic System.
May 20 13:31:13 inst-translator-import-and-translate-translate-translate-qw66d systemd[15438]: Stopped target Paths.
May 20 13:31:13 inst-translator-import-and-translate-translate-translate-qw66d systemd[15438]: Stopped Pending report trigger for Ubuntu Report.
May 20 13:31:13 inst-translator-import-and-translate-translate-translate-qw66d systemd[15438]: Stopped target Sockets.
May 20 13:31:13 inst-translator-import-and-translate-translate-translate-qw66d systemd[15438]: Closed GnuPG network certificate management daemon.
May 20 13:31:13 inst-translator-import-and-translate-translate-translate-qw66d systemd[15438]: Closed REST API socket for snapd user session agent.
May 20 13:31:13 inst-translator-import-and-translate-translate-translate-qw66d systemd[15438]: Closed GnuPG cryptographic agent and passphrase cache (access [email protected]
web browsers).
May 20 13:31:13 inst-translator-import-and-translate-translate-translate-qw66d systemd[15438]: Closed Sound System.
May 20 13:31:13 inst-translator-import-and-translate-translate-translate-qw66d systemd[15438]: Closed GnuPG cryptographic agent and passphrase cache (restricted).
May 20 13:31:13 inst-translator-import-and-translate-translate-translate-qw66d systemd[15438]: Closed GnuPG cryptographic agent (ssh-agent emulation).
May 20 13:31:13 inst-translator-import-and-translate-translate-translate-qw66d systemd[15438]: Closed GnuPG cryptographic agent and passphrase cache.
May 20 13:31:13 inst-translator-import-and-translate-translate-translate-qw66d systemd[15438]: Stopped target Timers.
May 20 13:31:13 inst-translator-import-and-translate-translate-translate-qw66d systemd[15438]: Closed D-Bus User Message Bus Socket.
May 20 13:31:13 inst-translator-import-and-translate-translate-translate-qw66d systemd[15438]: Reached target Shutdown.
May 20 13:31:13 inst-translator-import-and-translate-translate-translate-qw66d systemd[15438]: Starting Exit the Session...
May 20 13:31:13 inst-translator-import-and-translate-translate-translate-qw66d systemd[15438]: Received SIGRTMIN+24 from PID 15471 (kill).
[[0;32m OK [0m] Stopped User Manager for UID 121.
[[0;32m OK [0m] Removed slice user-121.slice.
May 20 13:31:13 inst-translator-import-and-translate-translate-translate-qw66d systemd[1]: Stopped User Manager for UID 121.
May 20 13:31:13 inst-translator-import-and-translate-translate-translate-qw66d systemd[1]: Removed slice user-121.slice.```
答案1
尝试查阅此文档https://cloud.google.com/compute/docs/troubleshooting/troubleshooting-ssh如果这不起作用,我建议打开支持案例或问题跟踪器https://cloud.google.com/support/docs/issue-trackers有了 GCP 的支持,他们就可以深入研究您的项目。