Fedora Linux Support Community & Resources Center
  #1  
Old 15th March 2017, 05:07 AM
ov10fac Online
Registered User
 
Join Date: Feb 2007
Location: Omaha Nebraska
Posts: 193
linuxfedorafirefox
(Solved) Permission denied during VM creation

I have installed Fedora 25 server to use as a Virtual Machine server. I used the same box with CentOS 7 and had no problems building VMs remotely. I say remotely because without a gui, virt-manage doesn't run on the server.

So I create the pool and storage for the new VM, everything is going fine until I click "Finish". Then I get an error that permission is denied to the qcow2 file. I check and the owner of the file is root and the permissions are rw_ ___ ___ . The error message says:

Unable to complete install: 'Cannot access storage file '/home/jwright/virtualMachines/images/fedora25.qcow2' (as uid:107, gid:107): Permission denied'

uid 107 is the qemu user which exists on both machines. Here is the passwd entry on the server:

qemu:x:107:107:qemu user:/:/sbin/nologin.

I have set the permissions to 777 for the qcow2 file, but still get the error. I have disabled selinux and the firewall.

Any suggestions?

Thanks

Last edited by ov10fac; 16th March 2017 at 12:28 AM. Reason: Solved the problem
Reply With Quote
  #2  
Old 15th March 2017, 07:56 AM
bobx001 Offline
Registered User
 
Join Date: Dec 2012
Location: santa barbara, CA
Posts: 394
linuxfedorafirefox
Re: Permission denied during VM creation

Can you post an install log ?
I can't tell if the permissions are wrong on the source file, or the target file.
Reply With Quote
  #3  
Old 15th March 2017, 02:18 PM
ov10fac Online
Registered User
 
Join Date: Feb 2007
Location: Omaha Nebraska
Posts: 193
linuxfedorafirefox
Re: Permission denied during VM creation

I would but they don't seem to be where the documentation says they are. The documentation says they are in the .virt-install directory which doesn't exist on my system. so it appears they are being maintained someplace else and I have no idea where that might be.
Reply With Quote
  #4  
Old 15th March 2017, 04:43 PM
nobody Offline
Registered User
 
Join Date: Mar 2012
Location: München, Deutschland
Posts: 863
windows_98_nt_2000chrome
Talking Re: Permission denied during VM creation

You should go to your home directory /home/jwright/ (cd <CR>), or even /home/jwright/virtualMachines/ and try to search recursively using grep command: grep -r virt * and see if it will give you some signs/directories/files where logs might reside/maybe residing.

_nobody_
__________________
I am nobody, and nobody is perfect, therefore I am perfect!

Last edited by nobody; 15th March 2017 at 04:49 PM.
Reply With Quote
  #5  
Old 15th March 2017, 10:42 PM
ov10fac Online
Registered User
 
Join Date: Feb 2007
Location: Omaha Nebraska
Posts: 193
linuxchrome
Re: Permission denied during VM creation

I tried find / | grep virt and it returned nothing of value. So I'll try your suggestions to see what pops. But it really seems strange that the directory is missing in both Fedora 25 and CenOS 7, but the documentation has not been updated to show the new location, just sayin....

Did grep on the server and the client to no avail. I am wondering if something didn't get installed. Guess I'll review my installation and try again.

Ok, so I tried the virt-install on the server using the following:

virt-install --name Fedora25 --ram 2048 --vcpus 2 --disk path=/home/jwright/virtualMachines/images/fedora25.qcow2,size=100,format=qcow2 --cdrom ./Fedora-Workstation-Live-x86_64-25-1.3.iso --virt-type kvm --os-variant fedora-unknown --graphics spice

That generated the following error:

WARNING /home/jwright/virtualMachines/images/fedora25.qcow2 may not be accessible by the hypervisor. You will need to grant the 'qemu' user search permissions for the following directories: ['/home/jwright']

So I changed the permissions on /home/jwright to 777 and re-ran the virt-install. It started but seems to be hung? At least it seems to be doing something and that's a step in the right direction.

That seems to have solved it, I now have the installation running. Seems strange that I had to change directory permissions, but......

Last edited by ov10fac; 15th March 2017 at 11:36 PM.
Reply With Quote
  #6  
Old 15th March 2017, 11:17 PM
bobx001 Offline
Registered User
 
Join Date: Dec 2012
Location: santa barbara, CA
Posts: 394
linuxfedorafirefox
Re: Permission denied during VM creation

iff u post all your commands, someone can try to replicate your situation.
Reply With Quote
  #7  
Old 16th March 2017, 12:27 AM
ov10fac Online
Registered User
 
Join Date: Feb 2007
Location: Omaha Nebraska
Posts: 193
linuxchrome
Re: Permission denied during VM creation

Which commands would that be? The problems began when I tried to install the VM via the virt-manager on my laptop. I connected to the server with the virt-manager, then tried to do the install as per the instructions found in the documentation. One thing I did was change the directory for the images. That may be the issue as when I look at the default directory structure the permissions are 755. I used 777 on the directories just to test and that worked.

So, I think the bottom line is if you are going to use a custom directory for your images, change the permissions on the whole structure to 755 (chmod -R 755 /top level directory)

Hope that helps someone else in the future.

Last edited by ov10fac; 16th March 2017 at 12:29 AM. Reason: Solution
Reply With Quote
  #8  
Old 17th March 2017, 09:02 AM
nobody Offline
Registered User
 
Join Date: Mar 2012
Location: München, Deutschland
Posts: 863
windows_98_nt_2000chrome
Question Re: Permission denied during VM creation

Here is what I have in my VM directories, by searching with: grep -r virt * !?

Code:
[user@localhost VirtualBox VMs]$ pwd
/home/user/VirtualBox VMs
[user@localhost VirtualBox VMs]$ grep -r virt *
F25_64/Logs/VBox.log.2:00:00:00.992071 Executable: /usr/lib64/virtualbox/VirtualBox
F25_64/Logs/VBox.log.2:00:00:01.069105 SUP: Loaded VMMR0.r0 (/usr/lib64/virtualbox/VMMR0.r0) at 0xffffffffc0000020 - ModuleInit at ffffffffc0026990 and ModuleTerm at ffffffffc0026e90
F25_64/Logs/VBox.log.2:00:00:01.410824 [/Devices/virtio-net/] (level 2)
F25_64/Logs/VBox.log.2:00:00:01.410867   Path <string>  = "/usr/lib64/virtualbox/components/VBoxC" (cb=39)
F25_64/Logs/VBox.log.2:00:00:01.739306 SUP: Loaded VBoxDDR0.r0 (/usr/lib64/virtualbox/VBoxDDR0.r0) at 0xffffffffc0102020 - ModuleInit at 0000000000000000 and ModuleTerm at 0000000000000000
F25_64/Logs/VBox.log.3:00:00:00.696425 Executable: /usr/lib64/virtualbox/VirtualBox
F25_64/Logs/VBox.log.3:00:00:00.745347 SUP: Loaded VMMR0.r0 (/usr/lib64/virtualbox/VMMR0.r0) at 0xffffffffc0000020 - ModuleInit at ffffffffc0026990 and ModuleTerm at ffffffffc0026e90
F25_64/Logs/VBox.log.3:00:00:00.882118 [/Devices/virtio-net/] (level 2)
F25_64/Logs/VBox.log.3:00:00:00.882150   Path <string>  = "/usr/lib64/virtualbox/components/VBoxC" (cb=39)
F25_64/Logs/VBox.log.3:00:00:01.153619 SUP: Loaded VBoxDDR0.r0 (/usr/lib64/virtualbox/VBoxDDR0.r0) at 0xffffffffc0102020 - ModuleInit at 0000000000000000 and ModuleTerm at 0000000000000000
F25_64/Logs/VBox.log:00:00:00.798785 Executable: /usr/lib64/virtualbox/VirtualBox
F25_64/Logs/VBox.log:00:00:00.843650 SUP: Loaded VMMR0.r0 (/usr/lib64/virtualbox/VMMR0.r0) at 0xffffffffc0736020 - ModuleInit at ffffffffc075c920 and ModuleTerm at ffffffffc075ce20
F25_64/Logs/VBox.log:00:00:00.959583 [/Devices/virtio-net/] (level 2)
F25_64/Logs/VBox.log:00:00:00.959610   Path <string>  = "/usr/lib64/virtualbox/components/VBoxC" (cb=39)

[snap]

F25_64_UEFI/Logs/VBox.log.3:00:00:01.348758   EfiRom                  <string>  = "/usr/lib64/virtualbox/VBoxEFI64.fd" (cb=35)
F25_64_UEFI/Logs/VBox.log.3:00:00:01.348954 [/Devices/virtio-net/] (level 2)
F25_64_UEFI/Logs/VBox.log.3:00:00:01.348980   Path <string>  = "/usr/lib64/virtualbox/components/VBoxC" (cb=39)
F25_64_UEFI/Logs/VBox.log.3:00:00:01.505642 SUP: Loaded VBoxDDR0.r0 (/usr/lib64/virtualbox/VBoxDDR0.r0) at 0xffffffffc0224020 - ModuleInit at 0000000000000000 and ModuleTerm at 0000000000000000
F25_64_UEFI/Logs/VBox.log:00:00:00.834131 Executable: /usr/lib64/virtualbox/VirtualBox
F25_64_UEFI/Logs/VBox.log:00:00:00.933088 SUP: Loaded VMMR0.r0 (/usr/lib64/virtualbox/VMMR0.r0) at 0xffffffffc0000020 - ModuleInit at ffffffffc0026990 and ModuleTerm at ffffffffc0026e90
F25_64_UEFI/Logs/VBox.log:00:00:01.063494   EfiRom                  <string>  = "/usr/lib64/virtualbox/VBoxEFI64.fd" (cb=35)
F25_64_UEFI/Logs/VBox.log:00:00:01.063752 [/Devices/virtio-net/] (level 2)
F25_64_UEFI/Logs/VBox.log:00:00:01.063989   Path <string>  = "/usr/lib64/virtualbox/components/VBoxC" (cb=39)
F25_64_UEFI/Logs/VBox.log:00:00:01.515931 SUP: Loaded VBoxDDR0.r0 (/usr/lib64/virtualbox/VBoxDDR0.r0) at 0xffffffffc0102020 - ModuleInit at 0000000000000000 and ModuleTerm at 0000000000000000
F25_64_UEFI/Logs/VBox.log.1:00:00:01.144496 Executable: /usr/lib64/virtualbox/VirtualBox
F25_64_UEFI/Logs/VBox.log.1:00:00:01.223498 SUP: Loaded VMMR0.r0 (/usr/lib64/virtualbox/VMMR0.r0) at 0xffffffffc0123020 - ModuleInit at ffffffffc0149990 and ModuleTerm at ffffffffc0149e90
F25_64_UEFI/Logs/VBox.log.1:00:00:01.737292   EfiRom                  <string>  = "/usr/lib64/virtualbox/VBoxEFI64.fd" (cb=35)
F25_64_UEFI/Logs/VBox.log.1:00:00:01.737544 [/Devices/virtio-net/] (level 2)
F25_64_UEFI/Logs/VBox.log.1:00:00:01.737571   Path <string>  = "/usr/lib64/virtualbox/components/VBoxC" (cb=39)
F25_64_UEFI/Logs/VBox.log.1:00:00:01.875550 SUP: Loaded VBoxDDR0.r0 (/usr/lib64/virtualbox/VBoxDDR0.r0) at 0xffffffffc0225020 - ModuleInit at 0000000000000000 and ModuleTerm at 0000000000000000
F25_64_UEFI/F25_64_UEFI.vbox-prev:<VirtualBox xmlns="http://www.virtualbox.org/" version="1.16-linux">
F25_64_UEFI/F25_64_UEFI.vbox:<VirtualBox xmlns="http://www.virtualbox.org/" version="1.16-linux">
Binary file F25_64_UEFI/F25_64_UEFI.vdi matches
F25_BETA/F25_BETA.vbox:<VirtualBox xmlns="http://www.virtualbox.org/" version="1.16-linux">
F25_BETA/Logs/VBox.log.2:00:00:01.006373 Executable: /usr/lib64/virtualbox/VirtualBox
F25_BETA/Logs/VBox.log.2:00:00:01.072525 SUP: Loaded VMMR0.r0 (/usr/lib64/virtualbox/VMMR0.r0) at 0xffffffffc0000020 - ModuleInit at ffffffffc0026990 and ModuleTerm at ffffffffc0026e90
F25_BETA/Logs/VBox.log.2:00:00:01.329825 [/Devices/virtio-net/] (level 2)
F25_BETA/Logs/VBox.log.2:00:00:01.329852   Path <string>  = "/usr/lib64/virtualbox/components/VBoxC" (cb=39)
F25_BETA/Logs/VBox.log.2:00:00:01.525625 SUP: Loaded VBoxDDR0.r0 (/usr/lib64/virtualbox/VBoxDDR0.r0) at 0xffffffffc0102020 - ModuleInit at 0000000000000000 and ModuleTerm at 0000000000000000
F25_BETA/Logs/VBox.log.3:00:00:00.921026 Executable: /usr/lib64/virtualbox/VirtualBox
F25_BETA/Logs/VBox.log.3:00:00:00.995805 SUP: Loaded VMMR0.r0 (/usr/lib64/virtualbox/VMMR0.r0) at 0xffffffffc09c4020 - ModuleInit at ffffffffc09ea990 and ModuleTerm at ffffffffc09eae90
F25_BETA/Logs/VBox.log.3:00:00:01.388819 [/Devices/virtio-net/] (level 2)
F25_BETA/Logs/VBox.log.3:00:00:01.388845   Path <string>  = "/usr/lib64/virtualbox/components/VBoxC" (cb=39)
F25_BETA/Logs/VBox.log.3:00:00:01.495593 SUP: Loaded VBoxDDR0.r0 (/usr/lib64/virtualbox/VBoxDDR0.r0) at 0xffffffffc0142020 - ModuleInit at 0000000000000000 and ModuleTerm at 0000000000000000
F25_BETA/Logs/VBox.log:00:00:01.107514 Executable: /usr/lib64/virtualbox/VirtualBox
F25_BETA/Logs/VBox.log.1:00:00:01.075769 Executable: /usr/lib64/virtualbox/VirtualBox
F25_BETA/Logs/VBox.log.1:00:00:01.154561 SUP: Loaded VMMR0.r0 (/usr/lib64/virtualbox/VMMR0.r0) at 0xffffffffc0874020 - ModuleInit at ffffffffc089a990 and ModuleTerm at ffffffffc089ae90
F25_BETA/Logs/VBox.log.1:00:00:01.429044 [/Devices/virtio-net/] (level 2)
F25_BETA/Logs/VBox.log.1:00:00:01.429086   Path <string>  = "/usr/lib64/virtualbox/components/VBoxC" (cb=39)
F25_BETA/Logs/VBox.log.1:00:00:01.603213 SUP: Loaded VBoxDDR0.r0 (/usr/lib64/virtualbox/VBoxDDR0.r0) at 0xffffffffc0122020 - ModuleInit at 0000000000000000 and ModuleTerm at 0000000000000000
F25_BETA/F25_BETA.vbox-prev:<VirtualBox xmlns="http://www.virtualbox.org/" version="1.16-linux">
Binary file Fedora-Workstation-Live-x86_64-25_Beta-1.1.iso matches
WIN10PESE_64/Logs/VBox.log.2:00:00:00.569572 Executable: /usr/lib64/virtualbox/VirtualBox
WIN10PESE_64/Logs/VBox.log.2:00:00:00.613990 SUP: Loaded VMMR0.r0 (/usr/lib64/virtualbox/VMMR0.r0) at 0xffffffffc09d2020 - ModuleInit at ffffffffc09f8990 and ModuleTerm at ffffffffc09f8e90
WIN10PESE_64/Logs/VBox.log.2:00:00:00.857806 [/Devices/virtio-net/] (level 2)
WIN10PESE_64/Logs/VBox.log.2:00:00:00.857833   Path <string>  = "/usr/lib64/virtualbox/components/VBoxC" (cb=39)
WIN10PESE_64/Logs/VBox.log.2:00:00:00.963950 SUP: Loaded VBoxDDR0.r0 (/usr/lib64/virtualbox/VBoxDDR0.r0) at 0xffffffffc0264020 - ModuleInit at 0000000000000000 and ModuleTerm at 0000000000000000
WIN10PESE_64/Logs/VBox.log.3:00:00:00.687009 Executable: /usr/lib64/virtualbox/VirtualBox
WIN10PESE_64/Logs/VBox.log.3:00:00:00.717062 SUP: Loaded VMMR0.r0 (/usr/lib64/virtualbox/VMMR0.r0) at 0xffffffffc08d0020 - ModuleInit at ffffffffc08f6990 and ModuleTerm at ffffffffc08f6e90
WIN10PESE_64/Logs/VBox.log.3:00:00:00.903192   EfiRom                  <string>  = "/usr/lib64/virtualbox/VBoxEFI64.fd" (cb=35)
WIN10PESE_64/Logs/VBox.log.3:00:00:00.903484 [/Devices/virtio-net/] (level 2)
WIN10PESE_64/Logs/VBox.log.3:00:00:00.903524   Path <string>  = "/usr/lib64/virtualbox/components/VBoxC" (cb=39)
WIN10PESE_64/Logs/VBox.log.3:00:00:00.980947 SUP: Loaded VBoxDDR0.r0 (/usr/lib64/virtualbox/VBoxDDR0.r0) at 0xffffffffc0244020 - ModuleInit at 0000000000000000 and ModuleTerm at 0000000000000000
WIN10PESE_64/Logs/VBox.log:00:00:00.729175 Executable: /usr/lib64/virtualbox/VirtualBox
WIN10PESE_64/Logs/VBox.log:00:00:00.765340 SUP: Loaded VMMR0.r0 (/usr/lib64/virtualbox/VMMR0.r0) at 0xffffffffc0122020 - ModuleInit at ffffffffc0148920 and ModuleTerm at ffffffffc0148e20
WIN10PESE_64/Logs/VBox.log:00:00:00.993240 [/Devices/virtio-net/] (level 2)
WIN10PESE_64/Logs/VBox.log:00:00:00.993270   Path <string>  = "/usr/lib64/virtualbox/components/VBoxC" (cb=39)
WIN10PESE_64/Logs/VBox.log:00:00:01.062472 SUP: Loaded VBoxDDR0.r0 (/usr/lib64/virtualbox/VBoxDDR0.r0) at 0xffffffffc0224020 - ModuleInit at 0000000000000000 and ModuleTerm at 0000000000000000
WIN10PESE_64/Logs/VBox.log.1:00:00:01.127671 Executable: /usr/lib64/virtualbox/VirtualBox
WIN10PESE_64/Logs/VBox.log.1:00:00:01.229792 SUP: Loaded VMMR0.r0 (/usr/lib64/virtualbox/VMMR0.r0) at 0xffffffffc0000020 - ModuleInit at ffffffffc0026990 and ModuleTerm at ffffffffc0026e90
WIN10PESE_64/Logs/VBox.log.1:00:00:01.380846 [/Devices/virtio-net/] (level 2)
WIN10PESE_64/Logs/VBox.log.1:00:00:01.380873   Path <string>  = "/usr/lib64/virtualbox/components/VBoxC" (cb=39)
WIN10PESE_64/Logs/VBox.log.1:00:00:01.855904 SUP: Loaded VBoxDDR0.r0 (/usr/lib64/virtualbox/VBoxDDR0.r0) at 0xffffffffc0102020 - ModuleInit at 0000000000000000 and ModuleTerm at 0000000000000000
WIN10PESE_64/WIN10PESE_64.vbox:<VirtualBox xmlns="http://www.virtualbox.org/" version="1.15-linux">
WIN10PESE_64/WIN10PESE_64.vbox:      <Paravirt provider="Default"/>
WIN10PESE_64/WIN10PESE_64.vbox-prev:<VirtualBox xmlns="http://www.virtualbox.org/" version="1.15-linux">
WIN10PESE_64/WIN10PESE_64.vbox-prev:      <Paravirt provider="Default"/>
Binary file Win10PESE_x64.ISO matches
Binary file Windows_10_Pro_x86_EN.ISO matches
[user@localhost VirtualBox VMs]$
Please, do note directories F25_64/Logs/VBox.log, F25_64_UEFI/Logs/VBox.log, etc!

_nobody_
__________________
I am nobody, and nobody is perfect, therefore I am perfect!
Reply With Quote
  #9  
Old 17th March 2017, 09:53 AM
DBelton's Avatar
DBelton Offline
Administrator
 
Join Date: Aug 2009
Posts: 8,463
linuxfedorafirefox
Re: Permission denied during VM creation

You would probably be better off creating a separate folder in /home for the VM you create rather than change the permissions on other users folders/files.

You could create (for example) /home/VM and chown it to 107:107 This would give the qemu user full read/write access to it without changing other users permissions.
__________________
Why is it that all of the instruments seeking intelligent life in the universe are pointed away from Earth?
Reply With Quote
  #10  
Old 17th March 2017, 04:24 PM
ov10fac Online
Registered User
 
Join Date: Feb 2007
Location: Omaha Nebraska
Posts: 193
linuxchrome
Re: Permission denied during VM creation

Found the problem. When I created the VMs in the past I used the default directory, or just added another directory to the default. But with this system, I am booting from a 64GB SSHD so don't have enough space to do that. Hence the strange directory structure. The virtualMachines folder is actually simply a mount point for a 1TB drive.

So, what I did was do an install using virt-install instead of using the virt-manager on my laptop and a remote install. The error message I received pointed me to the permissions of the entire directory chain not just the virtMachines folder. I changed permissions on the home/jwright/virtMachines and below, and low and behold it installed.

So a lesson to be learned, make sure the permission are correct, not only for the directory you are install into, but also for the upper layers as well.

Thanks to everyone for your help, it made the search much easier.

Now if I can just get the VM consol to run at something faster than a snail......
Reply With Quote
Reply

Tags
creation, denied, permission

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Permission Denied T3256 Using Fedora 24 22nd September 2008 03:49 AM
permission denied anitha2324 Using Fedora 13 26th April 2008 10:18 AM


Current GMT-time: 14:37 (Tuesday, 26-09-2017)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat