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 christian.ehrhardt@canonical.com 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 marc.deslauriers@ubuntu.com 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
- 167 LFX Mentorship
- 219 LFX Mentorship: Linux Kernel
- 795 Linux Foundation IT Professional Programs
- 355 Cloud Engineer IT Professional Program
- 179 Advanced Cloud Engineer IT Professional Program
- 82 DevOps Engineer IT Professional Program
- 127 Cloud Native Developer IT Professional Program
- 112 Express Training Courses
- 112 Express Courses - Discussion Forum
- 6.2K Training Courses
- 48 LFC110 Class Forum - Discontinued
- 17 LFC131 Class Forum
- 35 LFD102 Class Forum
- 227 LFD103 Class Forum
- 14 LFD110 Class Forum
- 39 LFD121 Class Forum
- 15 LFD133 Class Forum
- 7 LFD134 Class Forum
- 17 LFD137 Class Forum
- 63 LFD201 Class Forum
- 3 LFD210 Class Forum
- 5 LFD210-CN Class Forum
- 2 LFD213 Class Forum - Discontinued
- 128 LFD232 Class Forum - Discontinued
- 1 LFD233 Class Forum
- 2 LFD237 Class Forum
- 23 LFD254 Class Forum
- 697 LFD259 Class Forum
- 109 LFD272 Class Forum
- 3 LFD272-JP クラス フォーラム
- 10 LFD273 Class Forum
- 152 LFS101 Class Forum
- 1 LFS111 Class Forum
- 1 LFS112 Class Forum
- 1 LFS116 Class Forum
- 1 LFS118 Class Forum
- LFS120 Class Forum
- 7 LFS142 Class Forum
- 7 LFS144 Class Forum
- 3 LFS145 Class Forum
- 1 LFS146 Class Forum
- 3 LFS147 Class Forum
- 1 LFS148 Class Forum
- 15 LFS151 Class Forum
- 1 LFS157 Class Forum
- 33 LFS158 Class Forum
- 8 LFS162 Class Forum
- 1 LFS166 Class Forum
- 1 LFS167 Class Forum
- 3 LFS170 Class Forum
- 2 LFS171 Class Forum
- 1 LFS178 Class Forum
- 1 LFS180 Class Forum
- 1 LFS182 Class Forum
- 1 LFS183 Class Forum
- 29 LFS200 Class Forum
- 736 LFS201 Class Forum - Discontinued
- 2 LFS201-JP クラス フォーラム
- 14 LFS203 Class Forum
- 102 LFS207 Class Forum
- 1 LFS207-DE-Klassenforum
- 1 LFS207-JP クラス フォーラム
- 301 LFS211 Class Forum
- 55 LFS216 Class Forum
- 48 LFS241 Class Forum
- 42 LFS242 Class Forum
- 37 LFS243 Class Forum
- 15 LFS244 Class Forum
- LFS245 Class Forum
- LFS246 Class Forum
- 50 LFS250 Class Forum
- 1 LFS250-JP クラス フォーラム
- LFS251 Class Forum
- 154 LFS253 Class Forum
- LFS254 Class Forum
- LFS255 Class Forum
- 5 LFS256 Class Forum
- 1 LFS257 Class Forum
- 1.3K LFS258 Class Forum
- 10 LFS258-JP クラス フォーラム
- 111 LFS260 Class Forum
- 159 LFS261 Class Forum
- 41 LFS262 Class Forum
- 82 LFS263 Class Forum - Discontinued
- 15 LFS264 Class Forum - Discontinued
- 11 LFS266 Class Forum - Discontinued
- 20 LFS267 Class Forum
- 24 LFS268 Class Forum
- 29 LFS269 Class Forum
- 1 LFS270 Class Forum
- 199 LFS272 Class Forum
- 1 LFS272-JP クラス フォーラム
- LFS274 Class Forum
- 3 LFS281 Class Forum
- 9 LFW111 Class Forum
- 260 LFW211 Class Forum
- 182 LFW212 Class Forum
- 13 SKF100 Class Forum
- 1 SKF200 Class Forum
- 1 SKF201 Class Forum
- 782 Hardware
- 198 Drivers
- 68 I/O Devices
- 37 Monitors
- 96 Multimedia
- 174 Networking
- 91 Printers & Scanners
- 83 Storage
- 743 Linux Distributions
- 80 Debian
- 67 Fedora
- 15 Linux Mint
- 13 Mageia
- 23 openSUSE
- 143 Red Hat Enterprise
- 31 Slackware
- 13 SUSE Enterprise
- 348 Ubuntu
- 461 Linux System Administration
- 39 Cloud Computing
- 70 Command Line/Scripting
- Github systems admin projects
- 90 Linux Security
- 77 Network Management
- 101 System Management
- 46 Web Management
- 64 Mobile Computing
- 17 Android
- 34 Development
- 1.2K New to Linux
- 1K Getting Started with Linux
- 371 Off Topic
- 114 Introductions
- 174 Small Talk
- 19 Study Material
- 507 Programming and Development
- 285 Kernel Development
- 204 Software Development
- 1.8K Software
- 211 Applications
- 180 Command Line
- 3 Compiling/Installing
- 405 Games
- 309 Installation
- 97 All In Program
- 97 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)