6

In UTM there is a notion of a shared directory. I can select any directory I want and it's shared with the guest operating system. How do I access that data?

1 Answer 1

5

In order to access the shared directory you'll have to make sure you kernel is built with 9pnet_virtio you can use this command to confirm the module is there, sudo modinfo 9pnet_virtio

Then you can run

sudo mount -t 9p -o trans=virtio share /tmp/host_files

Or you can add this in fstab for persistance upon reboot.

share   /tmp/host_files 9p  trans=virtio,rw,nofail  0   0

Thanks to a user in the comments for pointing out this is docuemnted in the UTM docs

5
  • 2
    Thanks a ton man. I was banging my head because mount command wasn't showing the mounted files (maybe due to this virtio). Mar 14, 2023 at 6:51
  • Does this work between reboots?
    – mmmmmm
    Aug 8, 2023 at 14:37
  • @mmmmmm no you'd have to update your fstab. And if you find the command that works please edit this with that info. If not maybe I'll get around to it soon. I just got another Apple Silicon mac so this is again going to be an issue for me soon (and I'll update this soon). Aug 8, 2023 at 16:46
  • The UTM document docs.getutm.app/guest-support/linux/#macos-virtiofs gives a simpler mount command. It also mention the fstab
    – mmmmmm
    Aug 8, 2023 at 16:48
  • @mmmmmm cool cool, updated. Aug 8, 2023 at 17:08

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .