[Bug]: `run --virtualization` on M1 fails late with internalError; `machine create` checks up front

Aperta
#2,532 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
68/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
macos, swift
Ambito
cli

Direzione di ricerca

Start by tracing the run command's --virtualization path and compare its host checks with those used by machine create; the issue names no source files or tests. Reproduce on an unsupported Apple Silicon host if available, then locate the existing machine create check and its tests. Done when run and create reject unsupported hosts up front with a clear error.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

I have done the following
  • I have searched the existing issues
  • If possible, I've reproduced the issue using the 'main' branch of this project (reproduced on the 1.7.1 release)
Steps to reproduce

On an Apple M1:

container run --rm --virtualization alpine:3.22 true
container machine create --name test --virtualization alpine:3.22
Problem description

run fetches the image and boots the VM, then fails with:

Error: failed to bootstrap container (cause: "internalError: "failed to bootstrap container <id> (cause: "unsupported: "nested virtualization is not supported on the platform"")"")

machine create fails right away with a clear message:

Error: nested virtualization is not supported on this host (requires Apple Silicon M3+ and macOS 15+)

Expected: run/create do the same up-front host check.

Related: on an M4 Pro, --virtualization with the default kernel (6.18.56) succeeds but /dev/kvm is missing. --help mentions CONFIG_KVM=y, but a runtime warning would save a debugging round (see #1222).

Environment
- OS: macOS 27.2.1 (26B131)
- Xcode: n/a (signed release pkg)
- Container: 1.7.1 (a15b460)
Code of Conduct
  • I agree to follow this project's Code of Conduct
Lingua principale
Swift
Stelle
51.9k
Fork
1.8k
Merge medio
2g 3h
PR unite (30g)
27

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di apple/container

Tutte le issue di apple/container

Issue simili

Altre issue su Swift

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.