Bug 723524

Summary: virt-install: --location install fails: $HOME/.virtinst/boot/kernel: Permission denied
Product: [Fedora] Fedora Reporter: Richard Marko <rmarko>
Component: python-virtinstAssignee: Cole Robinson <crobinso>
Status: CLOSED WONTFIX QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 15CC: berrange, crobinso, jberan, jforbes, rmarko, virt-maint
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-02-06 20:12:49 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Attachments:
Description Flags
Script used to launch virt-install
none
virt-install log
none
ls -l $HOME none

Description Richard Marko 2011-07-20 12:55:52 UTC
Created attachment 514001 [details]
Script used to launch virt-install

Description of problem:
Can't install vm via virt-install when using system-wide instance and location param

Version-Release number of selected component (if applicable):
python-virtinst-0.500.6-2.fc15.noarch

How reproducible:
Always

Steps to Reproduce:
1. sh virt_install_bug.sh
  
Actual results:
Starting install...
Retrieving file .treeinfo...                                        | 1.7 kB     00:00 ... 
Retrieving file vmlinuz...                                          | 7.4 MB     00:00 ... 
Retrieving file initrd.img...                                       | 188 MB     00:01 ... 
ERROR    internal error Process exited while reading console log output: char device redirected to /dev/pts/4
qemu: could not load kernel '/home/rmarko/.virtinst/boot/virtinst-vmlinuz.V6uZ2w': Permission denied

Expected results:
Correct installation

Additional info:
 - Kernel properly downloaded and chowned
 - Selinux disabled

Comment 1 Richard Marko 2011-07-20 12:56:50 UTC
Created attachment 514002 [details]
virt-install log

Comment 2 Cole Robinson 2011-07-20 23:30:10 UTC
can you show the output of:

ls -l $HOME
getfacl $HOME

Have you made any manual changes to /etc/libvirt/qemu.conf?

Comment 3 Richard Marko 2011-07-21 10:48:43 UTC
Reproducible on clean installation of F15, will provide requested info soon.

Comment 4 Cole Robinson 2011-07-21 13:53:36 UTC
Thanks, I'll just re-set the NEEDINFO flag until all the info is provided.

Comment 5 Richard Marko 2011-07-21 20:18:45 UTC
$ getfacl $HOME
getfacl: Removing leading '/' from absolute path names
# file: home/rmarko
# owner: rmarko
# group: rmarko
user::rwx
group::---
other::---

Comment 6 Richard Marko 2011-07-21 20:20:30 UTC
Created attachment 514571 [details]
ls -l $HOME

Comment 7 Cole Robinson 2011-07-22 13:56:31 UTC
Hmm, how about

ls -ld $HOME
ls -ld $HOME/.virtinst

Comment 8 Richard Marko 2011-07-24 09:16:33 UTC
$ ls -ld $HOME
drwx------. 55 rmarko rmarko 4096 Jul 22 10:35 /home/rmarko

$ ls -ld $HOME/.virtinst
drwxr-x--x 3 rmarko rmarko 4096 Jul 20 12:50 /home/rmarko/.virtinst

Comment 9 Cole Robinson 2011-09-22 16:00:19 UTC
Okay, I understand the problem now. Unlike virt-manager, virt-install doesn't prompt the user about changing permissions on their home dir to allow access for URL installs.

F16 solves this problem by uploading the downloaded kernel/initrd to /var/lib/libvirt/boot, avoiding any need to change home permissions.

To work around this for now, you can chmod 711 $HOME && chmod 711 $HOME/.virtinst && chmod 711 $HOME/.virtinst/boot

Comment 10 Cole Robinson 2012-02-06 20:12:49 UTC
This is fixed in f16/upstream, since virt-install now uploads the kernel/initrd to the preferred libvirt location until /var/lib/libvirt. However this requires a recent version of libvirt that won't be rebased to F15, so getting this fixed in Fedora 15 is unlikely. The workaround in comment #9 should still work.

So this is WONTFIX for f15, sorry.