1
當我嘗試通過SSH連接到Google Compute Engine上的實例時出現以下錯誤。GCE - 我們無法連接到端口22上的VM
Connection Failed. We are unable to connect to the VM on port 22.
步驟我沒有使用Ubuntu的模板來得到這個錯誤
- 創建一個新的實例。
- 通過SSH連接並安裝了所有我需要的應用程序。
- 刪除實例,但在刪除實例時不刪除引導磁盤。
- 使用已刪除實例的啓動盤創建新的自定義映像。
- 使用自定義圖像啓動了一個新實例。
- 單擊GCE控制檯上的SSH鏈接。
這是實例的串行控制檯輸出。
[ 0.338119] Loading compiled-in X.509 certificates
[ 0.339445] Loaded X.509 cert 'Magrathea: Glacier signing key: e09b1e7e9841e9cfef256b70ab210562dab1ef68'
[ 0.341236] registered taskstats version 1
[ 0.342183] Key type trusted registered
[ 0.342872] Key type encrypted registered
[ 0.343453] AppArmor: AppArmor sha1 policy hashing enabled
[ 0.344592] ima: No TPM chip found, activating TPM-bypass!
[ 0.345433] evm: HMAC attrs: 0x1
[ 0.345974] Magic number: 0:206:635
[ 0.346956] rtc_cmos 00:00: setting system clock to 2016-01-17 13:37:20 UTC (1453037840)
[ 0.348137] BIOS EDD facility v0.16 2004-Jun-25, 0 devices found
[ 0.349722] EDD information not available.
[ 0.524305] input: AT Translated Set 2 keyboard as /devices/platform/i8042/serio0/input/input2
[ 0.525744] md: Waiting for all devices to be available before autodetect
[ 0.526718] md: If you don't use raid, use raid=noautodetect
[ 0.527798] md: Autodetecting RAID arrays.
[ 0.528396] md: Scanned 0 and added 0 devices.
[ 0.529008] md: autorun ...
[ 0.529414] md: ... autorun DONE.
[ 0.529988] VFS: Cannot open root device "sda1" or unknown-block(0,0): error -6
[ 0.530970] Please append a correct "root=" boot option; here are the available partitions:
[ 0.6] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
[ 0.533250] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 3.19.0-43-generiC#49~14.04.1-Ubuntu
[ 0.534451] Hardware name: Google Google, BIOS Google 01/01/2011
[ 0.535409] ffffea0002edc240 ffff88012af0fdb8 ffffffff817afcd5 00000000000011ba
[ 0.536095] ffffffff81a7c8b8 ffff88012af0fe38 ffffffff817a9b15 ffff88012af0fdd8
[ 0.536095] ffffffff00000010 ffff88012af0fe48 ffff88012af0fde8 ffff88012af0fe38
[ 0.536095] Call Trace:
[ 0.536095] [<ffffffff817afcd5>] dump_stack+0x45/0x57
[ 0.536095] [<ffffffff817a9b15>] panic+0xc1/0x1f5
[ 0.536095] [<ffffffff81d3e5f3>] mount_block_root+0x210/0x2a9
[ 0.536095] [<ffffffff81d3e822>] mount_root+0x54/0x58
[ 0.536095] [<ffffffff81d3e993>] prepare_namespace+0x16d/0x1a6
[ 0.536095] [<ffffffff81d3e304>] kernel_init_freeable+0x1f6/0x20b
[ 0.536095] [<ffffffff81d3d9a7>] ? initcall_blacklist+0xc0/0xc0
[ 0.536095] [<ffffffff817a01d0>] ? rest_init+0x80/0x80
[ 0.536095] [<ffffffff817a01de>] kernel_init+0xe/0xf0
[ 0.536095] [<ffffffff817b7658>] ret_from_fork+0x58/0x90
[ 0.536095] [<ffffffff817a01d0>] ? rest_init+0x80/0x80
[ 0.536095] Kernel Offset: 0x0 from 0xffffffff81000000 (relocation range: 0xffffffff80000000-0xffffffffbfffffff)
[ 0.536095] ---[ end Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
所以我的問題是我如何可以通過SSH連接到我的情況下,如何確保當我創建一個新的自定義圖像也不會再次發生。
謝謝。
你確定你的服務器正在運行嗎?似乎有掛載磁盤的問題:'內核恐慌 - 不同步:VFS:無法在未知塊(0,0)上掛載根fs' –
您是否在安裝應用程序時修改了fstab文件?如果是這樣,創建一個受影響的磁盤作爲次要附加的全新實例,您可以檢查日誌並修改什麼是壞的 – George