Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vfkit exited unexpectedly (invalid virtual machine configuration) #22226

Closed
alechenninger opened this issue Mar 31, 2024 · 9 comments · Fixed by #22288
Closed

vfkit exited unexpectedly (invalid virtual machine configuration) #22226

alechenninger opened this issue Mar 31, 2024 · 9 comments · Fixed by #22288
Assignees
Labels
In Progress This issue is actively being worked by the assignee, please do not work on this at this time. kind/bug Categorizes issue or PR as related to a bug. machine macos MacOS (OSX) related

Comments

@alechenninger
Copy link

alechenninger commented Mar 31, 2024

Issue Description

podman machine init fails with "vfkit exited unexpectedly with exit code 1"

Steps to reproduce the issue

Steps to reproduce the issue

  1. Run podman machine init --cpus 6 -m 3072 -v $(pwd):$(pwd) --now

Based on the error below, I'm assuming this requires the working directory to be a long path (mine is /Users/ahenning/Code/alechenninger.com/macro-server/ps4disasm).

Describe the results you received

podman machine init fails with "vfkit exited unexpectedly with exit code 1"

I tried to run gvproxy and vfkit directly using debug output as another contributor had done to see the error and work around the issue. It appears this may be related to the mount. When running vfkit directly, using the command from podman's debug output, I get:

Error Domain=VZErrorDomain Code=2 Description="Invalid virtual machine configuration. The Virtio file system device “tag” cannot exceed 36 bytes when encoded in UTF-8. The tag “Users-ahenning-Code-alechenninger.com-macro-server-ps4disasm” is invalid" UserInfo={
    NSLocalizedFailure = "Invalid virtual machine configuration.";
    NSLocalizedFailureReason = "The Virtio file system device \U201ctag\U201d cannot exceed 36 bytes when encoded in UTF-8. The tag \U201cUsers-ahenning-Code-alechenninger.com-macro-server-ps4disasm\U201d is invalid";
}

The command I ran was:

/opt/homebrew/Cellar/podman/5.0.0/libexec/podman/vfkit --cpus 6 --memory 3072 --bootloader efi,variable-store=/Users/ahenning/.local/share/containers/podman/machine/applehv/efi-bl-podman-machine-default,create --device virtio-blk,path=/Users/ahenning/.local/share/containers/podman/machine/applehv/podman-machine-default-arm64.raw --device virtio-rng --device virtio-serial,logFilePath=/var/folders/v2/l520vx7s32dfkrd5yz2syq2m0000gn/T/podman/podman-machine-default.log --device virtio-vsock,port=1025,socketURL=/var/folders/v2/l520vx7s32dfkrd5yz2syq2m0000gn/T/podman/podman-machine-default.sock,listen --device virtio-net,unixSocketPath=/var/folders/v2/l520vx7s32dfkrd5yz2syq2m0000gn/T/podman/podman-machine-default-gvproxy-2.sock,mac=***************** --device virtio-fs,sharedDir=/Users/ahenning/Code/alechenninger.com/macro-server/ps4disasm,mountTag=Users-ahenning-Code-alechenninger.com-macro-server-ps4disasm --restful-uri tcp://localhost:49920 --device virtio-gpu,width=800,height=600 --device virtio-input,pointing --device virtio-input,keyboard --gui --device virtio-vsock,port=1024,socketURL=/Users/ahenning/.local/share/containers/podman/machine/applehv/podman-machine-default-ignition.sock,listen

Describe the results you expected

I expected the VM to start.

podman info output

I just downgraded podman to 4.9.4 so I don't have this. But I had just upgraded to 5, and am running macOS 14.4

Podman in a container

No

Privileged Or Rootless

None

Upstream Latest Release

Yes

Additional environment details

No response

Additional information

No response

@alechenninger alechenninger added the kind/bug Categorizes issue or PR as related to a bug. label Mar 31, 2024
@mheon mheon added machine macos MacOS (OSX) related labels Apr 1, 2024
@mheon
Copy link
Member

mheon commented Apr 1, 2024

@baude PTAL

@baude
Copy link
Member

baude commented Apr 1, 2024

@cfergeau is this coming out of the hypervisor? im not seeing the error message in vfkit or otherwise?

@cfergeau
Copy link
Contributor

cfergeau commented Apr 2, 2024

@cfergeau is this coming out of the hypervisor? im not seeing the error message in vfkit or otherwise?

Yes, this would be coming out of Apple Virtualization Framework (NSLocalizedFailure is coming from objective-c code)

@cfergeau
Copy link
Contributor

cfergeau commented Apr 2, 2024

This can be reproduced with this vfkit argument: --device virtio-fs,sharedDir=/Users/teuf/dev,mountTag=AbcdefghijklmnopqrstuvwxyzAbcdefghijklmnopqrstuvwxyz

@ashley-cui ashley-cui self-assigned this Apr 5, 2024
@ashley-cui ashley-cui added the In Progress This issue is actively being worked by the assignee, please do not work on this at this time. label Apr 5, 2024
@BlaineEXE
Copy link

BlaineEXE commented Apr 9, 2024

I am also experiencing this issue. Here is what I think is the relevant debug text from CLI (I added newlines to help finding the sharedDir configs:

DEBU[0000] vfkit command-line: [/opt/homebrew/Cellar/podman/5.0.1/libexec/podman/vfkit --cpus 4 --memory 6144 --bootloader efi,variable-store=/Users/blaine/.local/share/containers/podman/machine/applehv/efi-bl-podman-machine-default,create --device virtio-blk,path=/Users/blaine/.local/share/containers/podman/machine/applehv/podman-machine-default-arm64.raw --device virtio-rng --device virtio-serial,logFilePath=/var/folders/cv/z65lxwd91pz0ndpvllgyjf0h0000gn/T/podman/podman-machine-default.log --device virtio-vsock,port=1025,socketURL=/var/folders/cv/z65lxwd91pz0ndpvllgyjf0h0000gn/T/podman/podman-machine-default.sock,listen --device virtio-net,unixSocketPath=/var/folders/cv/z65lxwd91pz0ndpvllgyjf0h0000gn/T/podman/podman-machine-default-gvproxy.sock,mac=5a:94:ef:e4:0c:ee 
--device virtio-fs,sharedDir=/Users/blaine/development,mountTag=Users-blaine-development 
--device virtio-fs,sharedDir=/Users/blaine/.config/containers/etc/pki/ca-trust/source/anchors,mountTag=etc-pki-ca-trust-source-anchors 
--device virtio-fs,sharedDir=/Users/blaine/.config/containers/registries.conf.d,mountTag=root-.config-containers-registries.conf.d 
--device virtio-fs,sharedDir=/Users/blaine/.config/containers/registries.conf.d,mountTag=home-core-.config-containers-registries.conf.d 
--restful-uri tcp://localhost:61238 --device virtio-gpu,width=800,height=600 --device virtio-input,pointing --device virtio-input,keyboard --gui --device virtio-vsock,port=1024,socketURL=/Users/blaine/.local/share/containers/podman/machine/applehv/podman-machine-default-ignition.sock,listen]
DEBU[0000] ignition socket device: /Users/blaine/.local/share/containers/podman/machine/applehv/podman-machine-default-ignition.sock
DEBU[0001] writing configuration file "/Users/blaine/.config/containers/podman/machine/applehv/podman-machine-default.json"
Error: vfkit exited unexpectedly with exit code 1
DEBU[0001] Shutting down engines

When can we expect #22288 to be merged and fixed in brew?
Is there a way to force use of qemu to work around the bug for now, or do I need to downgrade my podman version?

@ebarrere
Copy link

I also need this fix. The only reason I use different machines is to separate code paths, so all of them are going to be longer than 36 characters...

@cxyfreedom
Copy link

same error

1 similar comment
@nilskuehme
Copy link

same error

@aleleba
Copy link

aleleba commented Apr 27, 2024

same error here, my logs:

arting machine "podman-machine-default"

Error: vfkit exited unexpectedly with exit code 1

Starting machine "podman-machine-default"25

Error: vfkit exited unexpectedly with exit code 1

Command execution failed with exit code 125

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
In Progress This issue is actively being worked by the assignee, please do not work on this at this time. kind/bug Categorizes issue or PR as related to a bug. machine macos MacOS (OSX) related
Projects
None yet
Development

Successfully merging a pull request may close this issue.

10 participants