containers / podman

Podman: A tool for managing OCI containers and pods.
https://podman.io
Apache License 2.0
23.79k stars 2.42k forks source link

Error: qemu exited unexpectedly with exit code 1, stderr: qemu-system-aarch64: -virtfs #18073

Closed prabu4git closed 1 year ago

prabu4git commented 1 year ago

Installed a podman on Mac M1 configuration from the following link :

podman-installer-macos-arm64.pkg

It keeps failing to start with the following error message: podman machine start Starting machine "podman-machine-default" Waiting for VM ... Error: qemu exited unexpectedly with exit code 1, stderr: qemu-system-aarch64: -virtfs local,path=/Users,mount_tag=vol0,security_model=none: There is no option group 'virtfs' qemu-system-aarch64: -virtfs local,path=/Users,mount_tag=vol0,security_model=none: virtfs support is disabled

steps to reproduce :

podman machine init podman machine start

Luap99 commented 1 year ago

@ashley-cui @baude or anyone with a M1 can you reproduce this?

baude commented 1 year ago

is it possible you have more than one version of qemu installed?

prabu4git commented 1 year ago

I have this qemu version installed in my mac.

qemu-system-x86_64 --version QEMU emulator version 6.1.0 (v6.1.0-7-g8e52fc910d) Copyright (c) 2003-2021 Fabrice Bellard and the QEMU Project developers

baude commented 1 year ago

@prabu4git you have an m1, but your qemu is x86_64 ... is it possible you migrated from an Intel Mac or have been using Rosetta? Sometimes migrations and Rosetta will confuse brew and will set the architecture as such.

ashley-cui commented 1 year ago

Looks like the machine is using the correct qemu though - as the error message is coming from qemu-system-aarch64. I wonder if you have another version of qemu-system-aarch64 installed though, from somwhere else that doesn't support virtfs

baude commented 1 year ago

is it not possible aarch64 qemu is also installed?

ashley-cui commented 1 year ago

Entirely possible

prabu4git commented 1 year ago

Is there any documenation to uninstall qemu completely and reinstall it? I used homebrew to uninstall and reinstall qemu.

brew install qemu utm

==> Downloading https://formulae.brew.sh/api/formula.jws.json

==> Downloading https://formulae.brew.sh/api/cask.jws.json

==> Downloading https://github.com/utmapp/UTM/releases/download/v4.1.6/UTM.dmg ==> Downloading from https://objects.githubusercontent.com/github-production-rel ######################################################################## 100.0% ==> Installing Cask utm ==> Moving App 'UTM.app' to '/Applications/UTM.app' ==> Linking Binary 'utmctl' to '/opt/homebrew/bin/utmctl' 🍺 utm was successfully installed! ==> Fetching qemu ==> Downloading https://ghcr.io/v2/homebrew/core/qemu/manifests/7.2.0 Already downloaded: /Users/PMURUGE1/Library/Caches/Homebrew/downloads/d23c81d59c3698b58f1257ee8c3e3332f30043fa74715f775f835a98b1a1add0--qemu-7.2.0.bottle_manifest.json ==> Downloading https://ghcr.io/v2/homebrew/core/qemu/blobs/sha256:fa987f9dc7708 Already downloaded: /Users/PMURUGE1/Library/Caches/Homebrew/downloads/caa7e0351bfe23f800bbcffbbfaffa7a8d4ba62abbe6b6dfdcc3c2aa17c3eab2--qemu--7.2.0.arm64_ventura.bottle.tar.gz ==> Pouring qemu--7.2.0.arm64_ventura.bottle.tar.gz Error: The brew link step did not complete successfully The formula built, but is not symlinked into /opt/homebrew Could not symlink bin/elf2dmp Target /opt/homebrew/bin/elf2dmp is a symlink belonging to qemu-hvf. You can unlink it: brew unlink qemu-hvf

To force the link and overwrite all conflicting files: brew link --overwrite qemu

To list all files that would be deleted: brew link --overwrite --dry-run qemu

Possible conflicting files are: /opt/homebrew/bin/elf2dmp -> /opt/homebrew/Cellar/qemu-hvf/6.1.0-patched.0/bin/elf2dmp /opt/homebrew/bin/qemu-edid -> /opt/homebrew/Cellar/qemu-hvf/6.1.0-patched.0/bin/qemu-edid /opt/homebrew/bin/qemu-img -> /opt/homebrew/Cellar/qemu-hvf/6.1.0-patched.0/bin/qemu-img /opt/homebrew/bin/qemu-io -> /opt/homebrew/Cellar/qemu-hvf/6.1.0-patched.0/bin/qemu-io /opt/homebrew/bin/qemu-nbd -> /opt/homebrew/Cellar/qemu-hvf/6.1.0-patched.0/bin/qemu-nbd /opt/homebrew/bin/qemu-storage-daemon -> /opt/homebrew/Cellar/qemu-hvf/6.1.0-patched.0/bin/qemu-storage-daemon /opt/homebrew/bin/qemu-system-aarch64 -> /opt/homebrew/Cellar/qemu-hvf/6.1.0-patched.0/bin/qemu-system-aarch64 /opt/homebrew/bin/qemu-system-alpha -> /opt/homebrew/Cellar/qemu-hvf/6.1.0-patched.0/bin/qemu-system-alpha /opt/homebrew/bin/qemu-system-arm -> /opt/homebrew/Cellar/qemu-hvf/6.1.0-patched.0/bin/qemu-system-arm /opt/homebrew/bin/qemu-system-avr -> /opt/homebrew/Cellar/qemu-hvf/6.1.0-patched.0/bin/qemu-system-avr /opt/homebrew/bin/qemu-system-cris -> /opt/homebrew/Cellar/qemu-hvf/6.1.0-patched.0/bin/qemu-system-cris /opt/homebrew/bin/qemu-system-hppa -> /opt/homebrew/Cellar/qemu-hvf/6.1.0-patched.0/bin/qemu-system-hppa /opt/homebrew/bin/qemu-system-i386 -> /opt/homebrew/Cellar/qemu-hvf/6.1.0-patched.0/bin/qemu-system-i386 /opt/homebrew/bin/qemu-system-m68k -> /opt/homebrew/Cellar/qemu-hvf/6.1.0-patched.0/bin/qemu-system-m68k /opt/homebrew/bin/qemu-system-microblaze -> /opt/homebrew/Cellar/qemu-hvf/6.1.0-patched.0/bin/qemu-system-microblaze /opt/homebrew/bin/qemu-system-microblazeel -> /opt/homebrew/Cellar/qemu-hvf/6.1.0-patched.0/bin/qemu-system-microblazeel /opt/homebrew/bin/qemu-system-mips -> /opt/homebrew/Cellar/qemu-hvf/6.1.0-patched.0/bin/qemu-system-mips /opt/homebrew/bin/qemu-system-mips64 -> /opt/homebrew/Cellar/qemu-hvf/6.1.0-patched.0/bin/qemu-system-mips64 /opt/homebrew/bin/qemu-system-mips64el -> /opt/homebrew/Cellar/qemu-hvf/6.1.0-patched.0/bin/qemu-system-mips64el /opt/homebrew/bin/qemu-system-mipsel -> /opt/homebrew/Cellar/qemu-hvf/6.1.0-patched.0/bin/qemu-system-mipsel /opt/homebrew/bin/qemu-system-nios2 -> /opt/homebrew/Cellar/qemu-hvf/6.1.0-patched.0/bin/qemu-system-nios2 /opt/homebrew/bin/qemu-system-or1k -> /opt/homebrew/Cellar/qemu-hvf/6.1.0-patched.0/bin/qemu-system-or1k /opt/homebrew/bin/qemu-system-ppc -> /opt/homebrew/Cellar/qemu-hvf/6.1.0-patched.0/bin/qemu-system-ppc /opt/homebrew/bin/qemu-system-ppc64 -> /opt/homebrew/Cellar/qemu-hvf/6.1.0-patched.0/bin/qemu-system-ppc64 /opt/homebrew/bin/qemu-system-riscv32 -> /opt/homebrew/Cellar/qemu-hvf/6.1.0-patched.0/bin/qemu-system-riscv32 /opt/homebrew/bin/qemu-system-riscv64 -> /opt/homebrew/Cellar/qemu-hvf/6.1.0-patched.0/bin/qemu-system-riscv64 /opt/homebrew/bin/qemu-system-rx -> /opt/homebrew/Cellar/qemu-hvf/6.1.0-patched.0/bin/qemu-system-rx /opt/homebrew/bin/qemu-system-s390x -> /opt/homebrew/Cellar/qemu-hvf/6.1.0-patched.0/bin/qemu-system-s390x /opt/homebrew/bin/qemu-system-sh4 -> /opt/homebrew/Cellar/qemu-hvf/6.1.0-patched.0/bin/qemu-system-sh4 /opt/homebrew/bin/qemu-system-sh4eb -> /opt/homebrew/Cellar/qemu-hvf/6.1.0-patched.0/bin/qemu-system-sh4eb /opt/homebrew/bin/qemu-system-sparc -> /opt/homebrew/Cellar/qemu-hvf/6.1.0-patched.0/bin/qemu-system-sparc /opt/homebrew/bin/qemu-system-sparc64 -> /opt/homebrew/Cellar/qemu-hvf/6.1.0-patched.0/bin/qemu-system-sparc64 /opt/homebrew/bin/qemu-system-tricore -> /opt/homebrew/Cellar/qemu-hvf/6.1.0-patched.0/bin/qemu-system-tricore /opt/homebrew/bin/qemu-system-x86_64 -> /opt/homebrew/Cellar/qemu-hvf/6.1.0-patched.0/bin/qemu-system-x86_64 /opt/homebrew/bin/qemu-system-xtensa -> /opt/homebrew/Cellar/qemu-hvf/6.1.0-patched.0/bin/qemu-system-xtensa /opt/homebrew/bin/qemu-system-xtensaeb -> /opt/homebrew/Cellar/qemu-hvf/6.1.0-patched.0/bin/qemu-system-xtensaeb /opt/homebrew/include/qemu-plugin.h -> /opt/homebrew/Cellar/qemu-hvf/6.1.0-patched.0/include/qemu-plugin.h /opt/homebrew/share/applications/qemu.desktop -> /opt/homebrew/Cellar/qemu-hvf/6.1.0-patched.0/share/applications/qemu.desktop /opt/homebrew/share/icons/hicolor/128x128/apps/qemu.png -> /opt/homebrew/Cellar/qemu-hvf/6.1.0-patched.0/share/icons/hicolor/128x128/apps/qemu.png /opt/homebrew/share/icons/hicolor/16x16/apps/qemu.png -> /opt/homebrew/Cellar/qemu-hvf/6.1.0-patched.0/share/icons/hicolor/16x16/apps/qemu.png /opt/homebrew/share/icons/hicolor/24x24/apps/qemu.png -> /opt/homebrew/Cellar/qemu-hvf/6.1.0-patched.0/share/icons/hicolor/24x24/apps/qemu.png /opt/homebrew/share/icons/hicolor/256x256/apps/qemu.png -> /opt/homebrew/Cellar/qemu-hvf/6.1.0-patched.0/share/icons/hicolor/256x256/apps/qemu.png /opt/homebrew/share/icons/hicolor/32x32/apps/qemu.bmp -> /opt/homebrew/Cellar/qemu-hvf/6.1.0-patched.0/share/icons/hicolor/32x32/apps/qemu.bmp /opt/homebrew/share/icons/hicolor/32x32/apps/qemu.png -> /opt/homebrew/Cellar/qemu-hvf/6.1.0-patched.0/share/icons/hicolor/32x32/apps/qemu.png /opt/homebrew/share/icons/hicolor/48x48/apps/qemu.png -> /opt/homebrew/Cellar/qemu-hvf/6.1.0-patched.0/share/icons/hicolor/48x48/apps/qemu.png /opt/homebrew/share/icons/hicolor/512x512/apps/qemu.png -> /opt/homebrew/Cellar/qemu-hvf/6.1.0-patched.0/share/icons/hicolor/512x512/apps/qemu.png /opt/homebrew/share/icons/hicolor/64x64/apps/qemu.png -> /opt/homebrew/Cellar/qemu-hvf/6.1.0-patched.0/share/icons/hicolor/64x64/apps/qemu.png /opt/homebrew/share/icons/hicolor/scalable/apps/qemu.svg -> /opt/homebrew/Cellar/qemu-hvf/6.1.0-patched.0/share/icons/hicolor/scalable/apps/qemu.svg Error: Could not symlink share/qemu/QEMU,cgthree.bin Target /opt/homebrew/share/qemu/QEMU,cgthree.bin is a symlink belonging to qemu-hvf. You can unlink it: brew unlink qemu-hvf

To force the link and overwrite all conflicting files: brew link --overwrite qemu-hvf

To list all files that would be deleted: brew link --overwrite --dry-run qemu-hvf

~ % brew info qemu ==> qemu: stable 7.2.0 (bottled), HEAD Emulator for x86 and PowerPC https://www.qemu.org/ /opt/homebrew/Cellar/qemu/7.2.0 (163 files, 508.7MB) Poured from bottle using the formulae.brew.sh API on 2023-04-06 at 10:20:57 From: https://github.com/Homebrew/homebrew-core/blob/HEAD/Formula/qemu.rb License: GPL-2.0-only ==> Dependencies Build: libtool ✔, meson ✔, ninja ✔, pkg-config ✔ Required: capstone ✔, glib ✔, gnutls ✔, jpeg-turbo ✔, libpng ✔, libslirp ✔, libssh ✔, libusb ✔, lzo ✔, ncurses ✔, nettle ✔, pixman ✔, snappy ✔, vde ✔, zstd ✔ ==> Options --HEAD Install HEAD version ==> Analytics install: 1,164 (30 days), 111,995 (90 days), 682,171 (365 days) install-on-request: 661 (30 days), 74,583 (90 days), 436,598 (365 days) build-error: 1 (30 days)

ashley-cui commented 1 year ago

I believe the pkginstaller installs its own version of qemu as well, apart from brew. I don't think you need the brew version of qemu if you used the .pkg to install podman.

prabu4git commented 1 year ago

When i install podman from package it always picks up the aarch64 qemu version.. Any thoughts?

podman machine rm podman-machine-default

The following files will be deleted:

/Users/PMURUGE1/.ssh/podman-machine-default /Users/PMURUGE1/.ssh/podman-machine-default.pub /Users/PMURUGE1/.config/containers/podman/machine/qemu/podman-machine-default.ign /Users/PMURUGE1/.local/share/containers/podman/machine/qemu/podman-machine-default_fedora-coreos-37.20230401.2.0-qemu.aarch64.qcow2 /Users/PMURUGE1/.local/share/containers/podman/machine/podman-machine-default/podman.sock /Users/PMURUGE1/.local/share/containers/podman/machine/qemu/podman-machine-default_ovmf_vars.fd /Users/PMURUGE1/.config/containers/podman/machine/qemu/podman-machine-default.json

prabu4git commented 1 year ago

I completely removed the whole podman and reinstalled the arm package. still no luck.

image
github-actions[bot] commented 1 year ago

A friendly reminder that this issue had no activity for 30 days.

manico commented 1 year ago

I have same issue. When MacOS is updated podman points to an old podman-machine-default_fedora-coreos-37.20230401.2.0-qemu.aarch64.qcow2 when I have in same location podman-machine-default_fedora-coreos-38.20230514.2.0-qemu.aarch64.qcow2

ashley-cui commented 1 year ago

Hi, are you still running into this issue with the latest podman installer?

sherviiin commented 1 year ago

try this:

$ podman machine rm --force
$ podman machine init
$ podman machine start 
JayDi11a commented 1 year ago

So I think @baude @ashley-cui and @prabu4git were on to something seeing as how I too was having the same issue (admittedly I had migrated from an intel to M1). I think what is happening in the case of brew install podman is that it pulls down qemu-hvf and qemu and then has you symlink. So what I did was first make sure the dependencies for qemu (and qemu-hvf for that matter) of course were met for brew. Then I ran the following:

$ brew uninstall --ignore-dependencies qemu-hvf
$ brew uninstall --ignore-dependencies qemu
$ brew uninstall --force qemu
$ brew install qemu
$ podman machine rm --force
$ podman machine init
$ podman machine start

This did the trick for me.

ashley-cui commented 1 year ago

Closing as this was an installation issue.