lima: [kernel v6.2 regression, affects Ubuntu 23.04 and Fedora 38] `limactl start --set '.vmType = "vz"'` crashes: "usernet unable to resolve IP for SSH forwarding"
EDIT This seems to be a regression in kernel 6.2, reported to https://bugzilla.kernel.org/show_bug.cgi?id=217485 . kernel 6.3 seems to be bootable (via GRUB).
- Report to kernel bugzilla https://bugzilla.kernel.org/show_bug.cgi?id=217485
- Report to LKML https://lkml.org/lkml/2023/5/27/252
- Report to Apple to fix Virtualization.framework (reported via https://www.apple.com/feedback/macos.html , but no bug ticket is available)
- Report to Ubuntu to cherrypick https://github.com/torvalds/linux/commit/8e41e0a575664d26bb87e012c39435c4c3914ed9 into Ubuntu 23.04 https://bugs.launchpad.net/ubuntu/+source/linux/+bug/2021403
- Wait for Ubuntu to cherrypick https://github.com/torvalds/linux/commit/8e41e0a575664d26bb87e012c39435c4c3914ed9
- Report to Fedora to cherrypick https://github.com/torvalds/linux/commit/8e41e0a575664d26bb87e012c39435c4c3914ed9 into Fedora 38 (Fedora usually do not update qcow2 images, so probably we should just wait for Fedora 39, which is likely to use kernel >= 6.3)
- Wait for Fedora to cherrypick https://github.com/torvalds/linux/commit/8e41e0a575664d26bb87e012c39435c4c3914ed9
$ limactl start --set '.vmType = "vz"'
WARN[0000] `--set` is experimental
? Creating an instance "default" Proceed with the current configuration
WARN[0003] `vmType: vz` is experimental
WARN[0003] Ignoring: vmType vz: [CPUType]
INFO[0003] Attempting to download the image arch=x86_64 digest="sha256:13965c84c65cbab0b34326ac34ac0c47a88030f9dff80e6391e56cb9077cadd0" location="https://cloud-images.ubuntu.com/releases/23.04/release-20230502/ubuntu-23.04-server-cloudimg-amd64.img"
INFO[0003] Using cache "/Users/suda/Library/Caches/lima/download/by-url-sha256/74b79a035df1cdfbe81415cae56f2b86377b8d62c75937cdd415e18fbc482a1c/data"
INFO[0007] Attempting to download the nerdctl archive arch=x86_64 digest="sha256:3bb5f5358ee2c3bd9097e0bf37649c1775e2449094e75acf629f129ec2c7915f" location="https://github.com/containerd/nerdctl/releases/download/v1.4.0/nerdctl-full-1.4.0-linux-amd64.tar.gz"
INFO[0007] Using cache "/Users/suda/Library/Caches/lima/download/by-url-sha256/7f7d5c10ef2e2b350e26ceca17d2e3a7ce9993c867ce53f0a1114aa0264bfb4b/data"
INFO[0009] [hostagent] Starting VZ (hint: to watch the boot progress, see "/Users/suda/.lima/default/serial.log")
INFO[0009] [hostagent] new connection from to
INFO[0009] SSH Local Port: 60022
INFO[0009] [hostagent] Waiting for the essential requirement 1 of 5: "ssh"
INFO[0009] [hostagent] [VZ] - vm state change: running
INFO[0019] [hostagent] Waiting for the essential requirement 1 of 5: "ssh"
INFO[0029] [hostagent] Waiting for the essential requirement 1 of 5: "ssh"
INFO[0039] [hostagent] Waiting for the essential requirement 1 of 5: "ssh"
INFO[0049] [hostagent] Waiting for the essential requirement 1 of 5: "ssh"
INFO[0059] [hostagent] Waiting for the essential requirement 1 of 5: "ssh"
INFO[0069] [hostagent] Driver stopped due to error: "usernet unable to resolve IP for SSH forwarding"
INFO[0069] [hostagent] Shutting down the host agent
WARN[0069] [hostagent] failed to exit SSH master
INFO[0069] [hostagent] Shutting down VZ
FATA[0069] exiting, status={Running:false Degraded:false Exiting:true Errors:[] SSHLocalPort:0} (hint: see "/Users/suda/.lima/default/ha.stderr.log")
- Lima: master (ffd57dc)
- macOS: 13.4 (Intel)
template://experimental/vz still works.
(Slightly off-topic: a patch for loading kernel >= 6.2 using VZLinuxBootLoader, without GRUB)
- Submitted a kernel patch https://lore.kernel.org/linux-efi/CAG8fp8Te=oT1JJhTpOZvgWJrgcTq2DXan8UOVZ=KYCYNa8cKog@mail.gmail.com/
- Wait for the kernel patch to be merged: https://github.com/torvalds/linux/commit/36e4fc57fc1619f462e669e939209c45763bc8f5 (commit message was modified and slightly inaccurate)
About this issue
- Original URL
- State: closed
- Created a year ago
- Comments: 15 (14 by maintainers)
This seems resolved on macOS 13.5 🎉
( Cross-posting: https://bugzilla.kernel.org/show_bug.cgi?id=217485#c6 )
Turned out that this is a mixture of an ACPICA issue and an EFISTUB issue.
Kernel v6.2 can boot by reverting the both of the following two commits:
Kernel v6.3 can boot by just reverting torvalds/linux@e346bebb, as torvalds/linux@5c62d5a has been already reverted in torvalds/linux@8e41e0a575664d26bb87e012c39435c4c3914ed9. The situation is same for v6.4-rc3 too.
Note that in my test I let Virtualization.framework directly load bzImage without GRUB (akin to
qemu-system-x86_64 -kernel bzImage). Apparently, reverting torvalds/linux@e346bebb is not necessary for loading bzImage via GRUB. ( So, Lima can just boot unmodified v6.3 and v6.4-rc3: https://github.com/lima-vm/lima/issues/1577#issuecomment-1562649337 )Reported to the kernel bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=217485
Turned out to be a regression in https://github.com/torvalds/linux/commit/5c62d5aab8752e5ee7bfbe75ed6060db1c787f98
ACPICA: Events: Support fixed PCIe wake event(Ported from https://github.com/acpica/acpica/commit/32d875705c8ee8f99fd8b78dbed48633486a7640)This commit was introduced in v6.2-rc1, and apparently reverted in v6.3 (https://github.com/torvalds/linux/commit/8e41e0a575664d26bb87e012c39435c4c3914ed9). However, v6.3 and the latest v6.4-rc3 still don’t boot 🤔
Its related to Linux kernel 6.2 https://github.com/utmapp/UTM/issues/5138
The issue seems specific to Ubuntu 23.04. 22.10 works 🤔