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

Abierto
#2,532 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
3/5
Tiempo estimado
1-2 días
Aptitud para principiantes
68/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
macos, swift
Área
cli

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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
Lenguaje dominante
Swift
Estrellas
51.9k
Forks
1.8k
Merge medio
2 d 3 h
PR fusionados (30 d)
27

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de apple/container

Todos los issues de apple/container

Issues similares

Más issues de Swift

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.