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
-
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
0 -
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
0 -
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.
Lee0 -
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!
0 -
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.0 -
Hi Lee.
apparmor is active.
getenforce is not installed. Would installing SELinux help resolve this problem?0 -
Hi @gairsty ,
I just did a test case with Ubuntu 20.04. Apparmor is enabled by default, and SELinux is not configured (it's one or another). So, I couldn't reproduce the issue, because it worked on my environment.
So, I have some few questions:
1.- Is the libvirtd service running? Please provide the output for:
sudo systemctl status libvirtd
2.- What packages have you installed for testing this?
3.- The following are the permissions on my file:
luis@ubuntu20:~$ ls -l CorePlus-current.iso
-rw-r--r-- 1 libvirt-qemu kvm 124780544 Kun 19 18:50 CorePlus-current.isoSo, you have:
-rwxr-xr-x 1 libvirt-qemu kvm 216006656 Jun 29 07:06 CorePlus-current.iso
So, where did you put the file? Is it mounted in a read-only directory? Please try moving it to your home directory or on /tmp, just to be sure.
Regards,
Luis.0 -
Normally you can not run apparmor and selinux at the same time, so there is no way any selinux commands will work. You also have to make sure both are include in the kernel, so that you can turn one or the other off.
1 -
Please try:
$ sudo aa-teardown
$ sudo systemctl stop apparmor
$ sudo systemctl disable apparmor1 -
@luisviveropena said:
Hi @gairsty ,So, I have some few questions:
1.- Is the libvirtd service running? Please provide the output for:
sudo systemctl status libvirtd
Hi Luis. Sorry about the delay in returning to this...
When I check the status of libvirtd prior to launching virt-manager, all is well. However once virt-manager is launched I get this,
Jul 28 07:53:40 liveware-problem libvirtd[8347]: libvirt version: 6.0.0, package: 0ubuntu8.2 (Christian Ehrhardt [email protected] Mon, 22 Jun 2020 21:30:50 +0200)
Jul 28 07:53:40 liveware-problem libvirtd[8347]: hostname: liveware-problem
Jul 28 07:53:40 liveware-problem libvirtd[8347]: operation failed: pool 'default' already exists with uuid ffe65bc4-e3ad-4e58-ab3d-527e844ce476
Jul 28 07:53:40 liveware-problem libvirtd[8347]: operation failed: pool 'default' already exists with uuid ffe65bc4-e3ad-4e58-> ab3d-527e844ce476
Jul 28 07:53:40 liveware-problem libvirtd[8347]: this function is not supported by the connection driver: virConnectGetAllDomainStatsI tried the same thing on my Ubuntu18 vmware machine and after running $ sudo virt-manager, I get,
Jul 28 08:03:15 ubuntu18 libvirtd[932]: 2020-07-28 07:03:15.260+0000: 988: info : libvirt version: 4.0.0, package: 1ubuntu8.17 (Marc Deslauriers [email protected] Wed, 06 May 2020 14:18:23 -0400)
Jul 28 08:03:15 ubuntu18 libvirtd[932]: 2020-07-28 07:03:15.260+0000: 988: info : hostname: ubuntu18
Jul 28 08:03:15 ubuntu18 libvirtd[932]: 2020-07-28 07:03:15.260+0000: 988: error : netcfConnectNumOfInterfacesImpl:288 : internal error: failed to get number of host interfaces: unspecified error - errors in loading some config files
Jul 28 08:03:15 ubuntu18 libvirtd[932]: 2020-07-28 07:03:15.306+0000: 986: error : netcfConnectListAllInterfaces:564 : internal error: failed to get number of host interfaces: unspecified error - errors in loading some config files
Jul 28 08:03:15 ubuntu18 libvirtd[932]: 2020-07-28 07:03:15.353+0000: 989: error : netcfConnectListAllInterfaces:564 : internal error: failed to get number of host interfaces: unspecified error - errors in loading some config filesHowever, I am able to complete the lab in the Ubuntu18 VM
So, more questions than answers...
There is a difference in libvirtd versions, which I suspect is probably the problem. However, I'm intrigued to know what version is running on your system Luis.
In answer to your other questions:
2.- What packages have you installed for testing this?
Answered above, I think.
3 - the file is in my Downloads directory. I also tried it in my /home directory, same permissions, no joy.
0
Categories
- All Categories
- 50 LFX Mentorship
- 103 LFX Mentorship: Linux Kernel
- 555 Linux Foundation Boot Camps
- 297 Cloud Engineer Boot Camp
- 119 Advanced Cloud Engineer Boot Camp
- 52 DevOps Engineer Boot Camp
- 54 Cloud Native Developer Boot Camp
- 4 Express Training Courses
- 4 Express Courses - Discussion Forum
- 1.9K Training Courses
- 18 LFC110 Class Forum
- 7 LFC131 Class Forum
- 25 LFD102 Class Forum
- 150 LFD103 Class Forum
- 17 LFD121 Class Forum
- LFD137 Class Forum
- 61 LFD201 Class Forum
- LFD210 Class Forum
- LFD210-CN Class Forum
- 1 LFD213 Class Forum - Discontinued
- 128 LFD232 Class Forum
- LFD237 Class Forum
- 23 LFD254 Class Forum
- 598 LFD259 Class Forum
- 102 LFD272 Class Forum
- 1 LFD272-JP クラス フォーラム
- LFD273 Class Forum
- 2 LFS145 Class Forum
- 24 LFS200 Class Forum
- 739 LFS201 Class Forum
- 1 LFS201-JP クラス フォーラム
- 3 LFS203 Class Forum
- 69 LFS207 Class Forum
- 300 LFS211 Class Forum
- 54 LFS216 Class Forum
- 47 LFS241 Class Forum
- 41 LFS242 Class Forum
- 37 LFS243 Class Forum
- 11 LFS244 Class Forum
- 34 LFS250 Class Forum
- 1 LFS250-JP クラス フォーラム
- LFS251 Class Forum
- 140 LFS253 Class Forum
- LFS254 Class Forum
- 1K LFS258 Class Forum
- 10 LFS258-JP クラス フォーラム
- 92 LFS260 Class Forum
- 130 LFS261 Class Forum
- 32 LFS262 Class Forum
- 79 LFS263 Class Forum
- 15 LFS264 Class Forum
- 11 LFS266 Class Forum
- 17 LFS267 Class Forum
- 17 LFS268 Class Forum
- 23 LFS269 Class Forum
- 203 LFS272 Class Forum
- 1 LFS272-JP クラス フォーラム
- LFS281 Class Forum
- 221 LFW211 Class Forum
- 168 LFW212 Class Forum
- SKF100 Class Forum
- 902 Hardware
- 219 Drivers
- 74 I/O Devices
- 44 Monitors
- 115 Multimedia
- 209 Networking
- 101 Printers & Scanners
- 85 Storage
- 761 Linux Distributions
- 88 Debian
- 66 Fedora
- 15 Linux Mint
- 13 Mageia
- 24 openSUSE
- 141 Red Hat Enterprise
- 33 Slackware
- 13 SUSE Enterprise
- 356 Ubuntu
- 478 Linux System Administration
- 41 Cloud Computing
- 70 Command Line/Scripting
- Github systems admin projects
- 95 Linux Security
- 77 Network Management
- 108 System Management
- 49 Web Management
- 66 Mobile Computing
- 23 Android
- 29 Development
- 1.2K New to Linux
- 1.1K Getting Started with Linux
- 536 Off Topic
- 131 Introductions
- 216 Small Talk
- 21 Study Material
- 817 Programming and Development
- 275 Kernel Development
- 508 Software Development
- 928 Software
- 260 Applications
- 184 Command Line
- 3 Compiling/Installing
- 76 Games
- 316 Installation
- 59 All In Program
- 59 All In Forum
Upcoming Training
-
August 20, 2018
Kubernetes Administration (LFS458)
-
August 20, 2018
Linux System Administration (LFS301)
-
August 27, 2018
Open Source Virtualization (LFS462)
-
August 27, 2018
Linux Kernel Debugging and Security (LFD440)