从 Server 12.04 升级到 14.04 后系统无法启动

从 Server 12.04 升级到 14.04 后系统无法启动

我刚刚继承了一个停留在 Ubuntu 12.04 LTS 上的 Hyper-V VM。我正在尝试一点一点地将其升级到当前版本。我运行了,do-release-upgrade但现在它无法启动。

下面是我使用以下命令启动时的一些输出verbose --debug systemd.log_level=debug systemd.log_target=console

[    9.339602] ata_piix 0000:00:07.1: Hyper-V Virtual Machine detected, ATA device ignore set
[    9.405775] scsi0 : ata_piix
[    9.428787] scsi1 : ata_piix
[    9.451189] ata1: PATA max UDMA/33 cmd 0x1f0 ctl 0x3f6 bmdma 0xffa0 irq 14
[    9.497750] ata2: PATA max UDMA/33 cmd 0x170 ctl 0x376 bmdma 0xffa8 irq 15
[    9.568204] libphy: Fixed MDIO Bus: probed
[    9.599092] tun: Universal TUN/TAP device driver, 1.6
[    9.663085] tun: (C) 1999-2004 Max Krasnyansky <[email protected]>
[    9.732139] PPP generic driver version 2.4.2
[    9.741607] ata2.00: ATAPI: Virtual CD, , max MWDMA2
[    9.766498] ata2.00: configured for MWDMA2
[    9.788963] scsi 1:0:0:0: CD-ROM            Msft     Virtual CD/ROM   1.0 PQ: 0 ANSI: 5
[    9.793348] sr0: scsi3-mmc drive: 0x/0x tray
[    9.793352] cdrom: Uniform CD-ROM driver Revision: 3.20
[    9.794467] sr 1:0:0:0: Attached scsi generic sg0 type 5
[   10.584602] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[   10.686659] ehci-pci: EHCI PCI platform driver
[   10.758620] ehci-platform: EHCI generic platform driver
[   10.825700] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[   10.934677] ohci-pci: OHCI PCI platform driver
[   11.017230] ohci-platform: OHCI generic platform driver
[   11.112830] uhci_hcd: USB Universal Host Controller Interface driver
[   11.205005] i8042: PNP: PS/2 Controller [PNP0303:PS2K,PNP0f03:PS2M] at 0x60,0x64 irq 1,12
[   11.351785] serio: i8042 KBD port at 0x60,0x64 irq 1
[   11.429801] serio: i8042 AUX port at 0x60,0x64 irq 12
[   11.518869] mousedev: PS/2 mouse device common for all mice
[   11.616926] rtc_cmos 00:01: RTC can wake from S4
[   11.717868] rtc_cmos 00:01: rtc core: registered rtc_cmos as rtc0
[   11.718673] input: AT Translated Set 2 keyboard as /devices/platform/i8042/serio0/input/input1
[   11.930951] rtc_cmos 00:01: alarms up to one month, 114 bytes nvram
[   12.006301] device-mapper: uevent: version 1.0.3
[   12.111157] device-mapper: ioctl: 4.27.0-ioctl (2013-10-30) initialised: [email protected]
[   12.350930] atkbd serio1: Spurious ACK on isa0060/serio1. Some program might be trying to access hardware directly.
[   12.351038] input: AT Raw Set 2 keyboard as /devices/platform/i8042/serio1/input/input2
[   12.627012] ledtrig-cpu: registered to indicate activity on CPUs
[   12.729452] TCP: cubic registered
[   12.779310] NET: Registered protocol family 10
[   13.096274] NET: Registered protocol family 17
[   13.172567] Key type dns_resolver registered
[   13.251474] Loading compiled-in X.509 certificates
[   13.341462] Loaded X.509 cert 'Magrathea: Glacier signing key: d7a84854682fa67fc9074b4067f0fa3467f2e27f'
[   13.503451] registered taskstats version 1
[   13.571791] Key type trusted registered
[   13.646947] Key type encrypted registered
[   13.720342] AppArmor: AppArmor sha1 policy hashing enabled
[   13.782262] IMA: No TPM chip found, activating TPM-bypass!
[   13.875552] regulator-dummy: disabling
[   13.938053]   Magic number: 2:833:694
[   14.054638] rtc_cmos 00:01: setting system clock to 2018-09-25 17:41:23 UTC (1537897283)
[   14.184727] BIOS EDD facility v0.16 2004-Jun-25, 0 devices found
[   14.288805] EDD information not available.
[   14.370997] Freeing unused kernel memory: 1376K (ffffffff81d24000 - ffffffff81e7c000)
[   14.512782] Write protecting the kernel read-only data: 12288k
[   14.620292] Freeing unused kernel memory: 696K (ffff880001752000 - ffff880001800000)
[   14.874588] Freeing unused kernel memory: 656K (ffff880001b5c000 - ffff880001c00000)
[   15.145820] systemd-udevd[135]: starting version 204
[   15.297263] Floppy drive(s): fd0 is 1.44M
[   15.463410] FDC 0 is an 82078.
[   15.539725] hv_vmbus: Hyper-V Host Build:9200-6.2-22-0.22522; Vmbus version:2.4
[   15.654958] hv_vmbus: registering driver hv_storvsc
[   15.697760] hv_utils: Registering HyperV Utility Driver
[   15.697763] hv_vmbus: registering driver hv_util
[   15.698278] scsi2 : storvsc_host_t
[   15.698533] scsi 2:0:0:0: Direct-Access     Msft     Virtual Disk     1.0 PQ: 0 ANSI: 4
[   15.698855] sd 2:0:0:0: Attached scsi generic sg1 type 0
[   15.698955] sd 2:0:0:0: [sda] 251658240 512-byte logical blocks: (128 GB/120 GiB)
[   15.698956] sd 2:0:0:0: [sda] 4096-byte physical blocks
[   15.699633] sd 2:0:0:0: [sda] Write Protect is off
[   15.699976] sd 2:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[   15.772698]  sda: sda1 sda2 < sda5 >
[   15.776179] sd 2:0:0:0: [sda] Attached SCSI disk
[   15.970021] hv_vmbus: registering driver hv_netvsc
[   15.982647] hv_netvsc: hv_netvsc channel opened successfully
[   16.302423] random: lvm urandom read with 106 bits of entropy available
[   16.506895] bio: create slab <bio-1> at 1
[   16.647140] hv_netvsc vmbus_0_11: Device MAC 00:15:5d:11:68:04 link state up
[   17.158484] random: nonblocking pool is initialized
[   18.284335] EXT4-fs (dm-0): mounted filesystem with ordered data mode. Opts: (null)
[   20.121123] init: Handling startup event
[   20.190903] init: mountall goal changed from stop to start
[   20.271347] init: mountall state changed from waiting to starting
[   20.365783] init: hostname goal changed from stop to start
[   20.456907] init: hostname state changed from waiting to starting
[   20.789899] init: plymouth-ready (startup) goal changed from stop to start
[   21.140416] init: plymouth-ready (startup) state changed from waiting to starting
[   21.248964] init: plymouth-upstart-bridge goal changed from stop to start
[   21.335950] init: plymouth-upstart-bridge state changed from waiting to starting
[   21.459545] init: Handling starting event
[   21.533786] init: plymouth goal changed from stop to start
[   21.620985] init: plymouth state changed from waiting to starting
[   21.719479] init: hwclock goal changed from stop to start
[   21.809978] init: hwclock state changed from waiting to starting
[   21.925765] init: ureadahead goal changed from stop to start
[   22.017215] init: ureadahead state changed from waiting to starting
[   22.142134] init: Handling starting event
[   22.246736] init: hostname state changed from starting to security
[   22.362237] init: hostname state changed from security to pre-start
[   22.482104] init: hostname state changed from pre-start to spawned

然后它就挂了。我让它闲置了六个小时,没有任何活动。

当我从 GRUB 命令行启动时,init=/bin/sh我可以看到 init 加载失败:

/bin/sh: 0: can't access tty; job control turned off
# init --verbose 3
init: Failed to connect to socket /com/ubuntu/upstart: Connection refused

现在怎么办?我有此虚拟机的快照,因此我可以将其回滚到do-release-upgrade12.04 之前的版本,但我已经尝试升级两次,每次都会发生这种情况。

答案1

在升级到较新版本时,禁用所有硬件加速并确保系统在 Hyper-V 中具有旧式/慢速 vCPU。

相关内容