Skip to content

libvirt-qemu cannot access files in my home directory

I'm trying to add a shared folder to one of my guests but libvirt cannot access any directory or file inside my home directory, it works if the directory is anywhere else. Changing permissions doesn't work, changing ownership of files doesn't work either. Anyone knows how I can alter this behavior?

0 points2 comments
Open on Reddit
About this post
Posted
Archived
Score
0 · 50% up
Kind
Text
ID
vt5inc

Author

9
posts
75
comments
0
media
View profile

3 comments

You can change the user that the QEMU process will be run as in /etc/libvirt/qemu.conf to your own user, which appears to be enough to make this work, however, this might not be desirable or may have unintended side effects. YMMV.

2 points

Permissions do work if you set them right. (namei is handy to check if you did), but I would keep this out oh $HOME and make a symlink in instead.(anything other than 700 on ~ can easily lead to accidents)

2 points
unknown author

Deleted before we saved it.

1 points

Keyboard shortcuts

Move and act

jork
Next / previous post or comment
Enteroro
Open the post
f
Open the media viewer
s
Save
h
Hide (the toast has Undo)
Tab
Right after an action: the toast's Undo
x
Collapse the comment
v
Next layout: cards, compact, grid

Go to

/
Search
gthenh
Home
gthena
All
gthens
Subreddits
gthenl
Library
?
This list
Esc
Close a menu or this list

In the viewer

←or→
Previous / next file
↑or↓
Previous / next post
korj
Previous / next post
Space
Play / pause
m
Mute
z
Zoom
s
Save
o
Open the post (on its own page: back to it)
Esc
Close

Keys do nothing while you type in a box.