Skip to content

Conversation

@stephen-fox
Copy link
Contributor

In issue #67, it was reported that VM creation on macOS always fails with the message: "Error setting VM mapped volumes". [^1] It appears krun always calls krun_set_mapped_volumes even if the user has not configured any volumes. That krun library function was disabled in Feb 2024 by commit 186083df9. [^2] Based on the commit message, it sounds like virtio-fs devices will be the preferred way to implement mapped volumes going forward.

For now, we can at least avoid calling the deprecated function if the user has not configured any mapped volumes. That will obviously not fix the krun feature, but it makes krunvm usable on macOS.

References

  1. Error setting VM mapped volumes #67
  2. libkrun commit 186083df9faf704e2b431d90b1ed147363aca004

@slp
Copy link
Collaborator

slp commented Jun 12, 2025

Thanks for the PR! We should start using krun_add_virtiofs to support mapped volumes in macOS, but in the meantime it makes sense to merge this one.

Copy link
Collaborator

@slp slp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please sign the commit (Signed-off-by) to fix the DCO test?

In issue #67, it was reported that VM creation on macOS always fails
with the message: "Error setting VM mapped volumes". [^1] It appears
krun always calls `krun_set_mapped_volumes` even if the user has not
configured any volumes. That krun library function was disabled in
Feb 2024 by commit 186083df9. [^2] Based on the commit message, it
sounds like virtio-fs devices will be the preferred way to implement
mapped volumes going forward.

For now, we can at least avoid calling the deprecated function if
the user has not configured any mapped volumes. That will obviously
not fix the krun feature, but it makes krunvm usable on macOS.

References

1. #67
2. libkrun commit 186083df9faf704e2b431d90b1ed147363aca004

Signed-off-by: Stephen Fox <stephen.j.fox.jr@gmail.com>
@stephen-fox stephen-fox force-pushed the macos-only-map-volumes-if-required branch from 857f718 to 28ad60f Compare June 13, 2025 21:01
@stephen-fox
Copy link
Contributor Author

@slp, I updated the commit with the "Signed-off-by" string.

Copy link
Collaborator

@slp slp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

@slp slp merged commit 21b9cb4 into containers:main Jun 16, 2025
2 checks passed
Grego-GT added a commit to BinSquare/ERA that referenced this pull request Nov 2, 2025
…--> Workaround by using scripts for uploading and downloading files to/from ERA local VMs. These scripts implement file transfer utilities that encode files to base64, transfer chunks via VM command execution, and reconstruct files on the destination side.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants