Ask Your Question

permission denied libvirt

asked 2018-11-01 03:46:23 -0600

wenzel gravatar image

updated 2018-11-01 06:19:49 -0600

Hi, I'm trying to setup a new VM in virt-manager under Fedora 29, and i always et a permission denied at the end end of the setup, when qemu-system-x86_64 has been started and attempts to access my ISO in /home/wenzel/Downloads/ubuntu-18.04.1-desktop-amd64.iso. permission_denied_libvirt

Libvirtd has the default configuration, and my ISO is now owned by qemu:qemu: -rw-rw-r--. 1 qemu qemu 1,9G 26 oct. 00:33 ubuntu-18.04.1-desktop-amd64.iso

I don't understand what is going on.

  • there is no apparmor DENIEDmessages in dmesg
  • in /etc/libvirt/qemu.conf, the default user and group configured are root:root, so root should be able to access this file ?

/etc/libvirt/qemu.conf user configuration:

# The user for QEMU processes run by the system instance. It can be
# specified as a user name or as a user id. The qemu driver will try to
# parse this value first as a name and then, if the name doesn't exist,
# as a user id.
# Since a sequence of digits is a valid user name, a leading plus sign
# can be used to ensure that a user id will not be interpreted as a user
# name.
# Some examples of valid values are:
#       user = "qemu"   # A user named "qemu"
#       user = "+0"     # Super user (uid=0)
#       user = "100"    # A user named "100" or a user with uid=100
# user = "root"

# The group for QEMU processes run by the system instance. It can be
# specified in a similar way to user.
# group = "root"

# Whether libvirt should dynamically change file ownership
# to match the configured user/group above. Defaults to 1.
# Set to 0 to disable file ownership changes.
#dynamic_ownership = 1

Can somebody help me diagnose the problem ? Thank you !

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted

answered 2018-11-01 05:11:39 -0600

hhlp gravatar image

updated 2018-11-01 05:48:49 -0600

There is a problem beside KVM/LIBVIRT configuration outside his own directory :

if you don't want to run in problem across setting ACL to your home directory and qemu config , just copy your ISO image to /var/lib/libvirt/images (and access it from there) all the problems will go away or move the ISO to \tmp directory.

another solution and I'm not a big fan of this is :

update your /etc/libvirt/qemu.conf

and uncomment user="root" and group="root"

Regards. HTH

edit flag offensive delete link more


thanks, it worked by moving my ISO into /var/lib/libvirt/images. The problem is that i have to keep the qcow there too. Usually i store my VMs in /home/wenzel/kvm I used to do this before, can you explain what has changed in the recent versions of Fedora ?

wenzel gravatar imagewenzel ( 2018-11-01 06:34:46 -0600 )edit
hhlp gravatar imagehhlp ( 2018-11-01 06:43:16 -0600 )edit

answered 2018-11-03 08:17:57 -0600

ed209 gravatar image

Don't move anything at all. Just add the user to libvirt group.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2018-11-01 03:42:36 -0600

Seen: 210 times

Last updated: Nov 03 '18