Welcome to the Linux Foundation Forum!

Lab 28.2 virt-manager problem with permissions

Hi. I have encountered a problem where when following the directions to install tinycore on virt-manager I get the following message:

Unable to complete install: 'internal error: qemu unexpectedly closed the monitor: 2020-06-29T07:52:43.049189Z qemu-system-x86_64: -blockdev {"driver":"file","filename":"/home/andrew/Downloads/CorePlus-current.iso","node-name":"libvirt-1-storage","auto-read-only":true,"discard":"unmap"}: Could not open '/home/andrew/Downloads/CorePlus-current.iso': Permission denied'

Traceback (most recent call last):
  File "/usr/share/virt-manager/virtManager/asyncjob.py", line 75, in cb_wrapper
    callback(asyncjob, *args, **kwargs)
  File "/usr/share/virt-manager/virtManager/createvm.py", line 2089, in _do_async_install
    guest.installer_instance.start_install(guest, meter=meter)
  File "/usr/share/virt-manager/virtinst/install/installer.py", line 542, in start_install
    domain = self._create_guest(
  File "/usr/share/virt-manager/virtinst/install/installer.py", line 491, in _create_guest
    domain = self.conn.createXML(install_xml or final_xml, 0)
  File "/usr/lib/python3/dist-packages/libvirt.py", line 4034, in createXML
    if ret is None:raise libvirtError('virDomainCreateXML() failed', conn=self)
libvirt.libvirtError: internal error: qemu unexpectedly closed the monitor: 2020-06-29T07:52:43.049189Z qemu-system-x86_64: -blockdev {"driver":"file","filename":"/home/andrew/Downloads/CorePlus-current.iso","node-name":"libvirt-1-storage","auto-read-only":true,"discard":"unmap"}: Could not open '/home/andrew/Downloads/CorePlus-current.iso': Permission denied

$ ls -l Core* gives me:

-rwxr-xr-x 1 libvirt-qemu kvm 216006656 Jun 29 07:06 CorePlus-current.iso

Do I need to change the permissions on this file? Or do I need to do something with users?

Thanks in advance!

Comments

  • dacarabdacarab Posts: 8

    When I went through the lab, virt-manager changed the user / group ownership of the iso file to qemu / qemu. I'm running CentOS 8 for this lab, so it might just be a difference in distros that we are running.

    The only other difference I see is my iso is set to 664 in terms of permissions - so am wondering if adding write to the group would make a difference...

    Cheers

  • coopcoop Posts: 437

    Hi: It is pretty hard to debug this stuff unless you tell us things like distribution and version. For the case of anything virtual also it is important to tell us if this is a real machine or a VM running under a hypervisor and if so which one. In some cases telling us how much RAM there is and other HW issues can help.

    As dacarab mentioned he was running CentOS 8 and seems to have been able to get it done. I can't easily debug this as I would be doing the same thing as the only physical boxes I have are running RHEL 8 or CentOS 8

  • lee42xlee42x Posts: 158

    This bit "Could not open '/home/andrew/Downloads/CorePlus-current.iso': Permission denied" makes me want to check the permissions of the "iso" file. We should have avoided permission challenges when we ran "sudo virt-manager" . If it is desired to run the VM as another user, set the group to "qemu" on the "iso" file.

    Please confirm if the command "sudo virt-manager" was used.
    Lee

  • gairstygairsty Posts: 4

    Hi ail. Thank you for responding!

    I'm running Ubuntu 20.04 LTS with 16GB of RAM on a real machine.
    It's virt-manager v2.2.1
    I've had little problems previously using either Virtualbox or VMWare on this machine, both of which were stopped and disabled as per Lab 28.1.

    The command was run as "sudo virt-manager".
    Just tried with permissions set to 664, with no joy.
    When I run $ sudo virt-manager, it changes the user/group ownership of the .iso to libvert-qemu / kvm, from whatever I may have changed it to, (root, andrew, etc). I have also tried $ sudo virt-manager as root.
    If I run $ virt-manager, (i.e.no sudo) I don't get the option for a QEMU/KVM session, only and LXC session in virt-manager.

    This is thoroughly frustrating as I've been really enjoying the course up to now!

  • lee42xlee42x Posts: 158

    Can you please run:

    sudo systemctl status apparmor

    and

    sudo getenforce

    Thanks Lee
    This is interesting as I run Ubuntu 20.04 on my laptop that I do everything on.

Sign In or Register to comment.