Bug 566425

Summary: qemu: could not load kernel '/var/lib/libvirt/boot/virtinst-vmlinuz.bmav1g': Permission denied
Product: [Fedora] Fedora Reporter: James Laska <jlaska>
Component: libvirtAssignee: Cole Robinson <crobinso>
Status: CLOSED CURRENTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: 12CC: berrange, clalance, crobinso, itamar, jforbes, jturner, lveyde, notting, rjones, ruben, veillard, virt-maint
Target Milestone: ---Keywords: Reopened
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: libvirt-0.7.7-2.fc13 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 574152 (view as bug list) Environment:
Last Closed: 2013-03-18 00:21:06 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 514890, 538274    

Description James Laska 2010-02-18 13:09:25 UTC
Description of problem:

Unable to create a guest using Fedora 12 and Virtualization Preview Repository (http://fedoraproject.org/wiki/Virtualization_Preview_Repository)

Version-Release number of selected component (if applicable):

* gpxe-roms-qemu-1.0.0-1.fc12.noarch
* libvirt-0.7.6-1.fc12.x86_64
* libvirt-client-0.7.6-1.fc12.x86_64
* libvirt-python-0.7.6-1.fc12.x86_64
* python-virtinst-0.500.2-1.fc12.noarch
* qemu-common-0.12.2-6.fc12.x86_64
* qemu-img-0.12.2-6.fc12.x86_64
* qemu-kvm-0.12.2-6.fc12.x86_64
* qemu-system-x86-0.12.2-6.fc12.x86_64
* virt-manager-0.8.3-1.fc12.noarch
* virt-viewer-0.2.1-1.fc12.x86_64


How reproducible:

* Everytime I try

Steps to Reproduce:
1. Attempt to create a new guest using virt-manager or virt-install
  
Actual results:

virt-install --name RATS --ram 1024 --vcpus 1 --os-type linux --os-variant fedora13 --disk path=/var/lib/libvirt/images/RATS.img,size=10,sparse=false,bus=scsi --network network=default --accelerate --vnc --extra-args "serial console=ttyS0" --location http://dell-t5400.test.redhat.com/cobbler/ks_mirror/F-13-Alpha-TC2-i386

Starting install...
Retrieving file .treeinfo...                                                                                                          | 2.8 kB     00:00 ... 
Retrieving file vmlinuz...                                                                                                            | 7.1 MB     00:00 ... 
Retrieving file initrd.img...                                                                                                         |  57 MB     00:02 ... 
ERROR    internal error unable to start guest: char device redirected to /dev/pts/4
Warning: vlan 0 with no nics
qemu: could not load kernel '/var/lib/libvirt/boot/virtinst-vmlinuz.bmav1g': Permission denied

Domain installation may not have been
 successful.  If it was, you can restart your domain
 by running 'virsh start RATS'; otherwise, please
 restart your installation.
ERROR    internal error unable to start guest: char device redirected to /dev/pts/4
Warning: vlan 0 with no nics
qemu: could not load kernel '/var/lib/libvirt/boot/virtinst-vmlinuz.bmav1g': Permission denied
Traceback (most recent call last):
  File "/usr/sbin/virt-install", line 972, in <module>
    main()
  File "/usr/sbin/virt-install", line 834, in main
    start_time, guest.start_install)
  File "/usr/sbin/virt-install", line 896, in do_install
    dom = install_func(conscb, progresscb, wait=(not wait))
  File "/usr/lib/python2.6/site-packages/virtinst/Guest.py", line 795, in start_install
    return self._do_install(consolecb, meter, removeOld, wait)
  File "/usr/lib/python2.6/site-packages/virtinst/Guest.py", line 896, in _do_install
    self.domain = self.conn.createLinux(install_xml, 0)
  File "/usr/lib64/python2.6/site-packages/libvirt.py", line 1098, in createLinux
    if ret is None:raise libvirtError('virDomainCreateLinux() failed', conn=self)
libvirtError: internal error unable to start guest: char device redirected to /dev/pts/4
Warning: vlan 0 with no nics
qemu: could not load kernel '/var/lib/libvirt/boot/virtinst-vmlinuz.bmav1g': Permission denied

Expected results:

It should not result in a traceback

Additional info:

 * I have performed an SELinux system relabel and the issue remains
 * I have entered SELinux permissive mode, and the problem remains
 * tail -f /var/log/messages shows ...

Feb 18 08:07:31 localhost libvirtd: 08:07:31.985: error : qemudDomainLookupByName:3226 : Domain not found: no domain with matching name 'RATS'
Feb 18 08:07:32 localhost libvirtd: 08:07:32.080: error : qemudDomainLookupByName:3226 : Domain not found: no domain with matching name 'RATS'
Feb 18 08:07:32 localhost libvirtd: 08:07:32.168: error : qemudDomainLookupByUUID:3201 : Domain not found: no domain with matching uuid '8668b0d5-0ba6-6455-d172-52a2dc1ee3a8'
Feb 18 08:07:35 localhost libvirtd: 08:07:35.446: error : qemudDomainLookupByName:3226 : Domain not found: no domain with matching name 'RATS'
Feb 18 08:07:35 localhost kernel: device vnet0 entered promiscuous mode
Feb 18 08:07:35 localhost kernel: virbr0: topology change detected, propagating
Feb 18 08:07:35 localhost kernel: virbr0: port 1(vnet0) entering forwarding state
Feb 18 08:07:35 localhost NetworkManager: <WARN>  device_creator(): /sys/devices/virtual/net/vnet0: couldn't determine device driver; ignoring...
Feb 18 08:07:35 localhost kernel: virbr0: port 1(vnet0) entering disabled state
Feb 18 08:07:35 localhost kernel: device vnet0 left promiscuous mode
Feb 18 08:07:35 localhost kernel: virbr0: port 1(vnet0) entering disabled state
Feb 18 08:07:35 localhost libvirtd: 08:07:35.598: error : qemudReadLogOutput:1370 : internal error Process exited while reading console log output
Feb 18 08:07:35 localhost libvirtd: 08:07:35.598: error : qemudWaitForMonitor:1565 : internal error unable to start guest: char device redirected to /dev/pts/5#012Warning: vlan 0 with no nics#012qemu: could not load kernel '/home/jlaska/.virtinst/boot/virtinst-vmlinuz.KqNC9s': Permission denied#012

Comment 1 Cole Robinson 2010-02-18 16:20:01 UTC
I can reproduce. Seems the libvirt permission + svirt drivers don't try to change the permissions for kernel/initrd. Your initial report looks like you are running as root, but the error from syslog looks like you tried as a regular user. Do both not work? I reproduced as root using /var/lib/libvirt/boot

Comment 2 James Laska 2010-02-18 16:31:16 UTC
(In reply to comment #1)
> I can reproduce. Seems the libvirt permission + svirt drivers don't try to
> change the permissions for kernel/initrd. Your initial report looks like you
> are running as root, but the error from syslog looks like you tried as a
> regular user. Do both not work? I reproduced as root using
> /var/lib/libvirt/boot    

Sorry, my attempts were all through sudo, but I cleaned up the output thinking that would make things clearer.

I've run virt-install as root (from a shell and from sudo) and both fail.  

If I run the same command as non-root (adding --connect qemu:///system) it fails the same way.

Comment 3 Richard W.M. Jones 2010-03-08 21:48:54 UTC
*** Bug 571574 has been marked as a duplicate of this bug. ***

Comment 4 Richard W.M. Jones 2010-03-08 21:49:24 UTC
This happens on a fresh F13 install.  It should be an F13 blocker.

Comment 5 James Laska 2010-03-12 18:09:24 UTC
Moving to F13Beta blocker list per recently added Beta criteria (https://fedoraproject.org/wiki/Fedora_13_Beta_Release_Criteria)

#  The release must boot successfully as a virtual guest in a situation where the virtual host is running the same release (using Fedora's current preferred virtualization technology)

Comment 6 Cole Robinson 2010-03-12 19:03:32 UTC
Patch posted upstream:

https://www.redhat.com/archives/libvir-list/2010-March/msg00546.html

Comment 7 Cole Robinson 2010-03-16 14:50:06 UTC
Upstream now, moving to POST.

Comment 8 James Laska 2010-03-19 17:52:03 UTC
(In reply to comment #7)
> Upstream now, moving to POST.    

Thanks for the update Cole.  When do you anticipate this fix being available in Fedora 13?  This bug is listed as an approved F13Beta blocker, and would need new packages by ~ 2010-03-24 in order to make F13Beta.  If it won't be available in time, we'll need to document this issue+workaround or choose delay the release.

Comment 9 Cole Robinson 2010-03-21 22:35:28 UTC
I'll build a new libvirt package by end of Monday 22nd, so this will be fixed in time. Thanks for the ping.

Comment 10 Fedora Update System 2010-03-22 16:34:26 UTC
libvirt-0.7.7-2.fc13 has been submitted as an update for Fedora 13.
http://admin.fedoraproject.org/updates/libvirt-0.7.7-2.fc13

Comment 11 Fedora Update System 2010-03-23 23:22:29 UTC
libvirt-0.7.7-2.fc13 has been pushed to the Fedora 13 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update libvirt'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/libvirt-0.7.7-2.fc13

Comment 12 Fedora Update System 2010-03-24 00:42:32 UTC
libvirt-0.7.7-2.fc13 has been pushed to the Fedora 13 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 13 Cole Robinson 2010-04-15 20:04:25 UTC
*** Bug 582779 has been marked as a duplicate of this bug. ***

Comment 14 Lev Veyde 2013-03-17 14:03:21 UTC
I'm getting the same issue with RHEL 6.4 :

2013-03-17 12:27:28.631+0000: starting up
LC_ALL=C PATH=/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/sbin:/sbin:/bin /usr/libexec/qemu-kvm -name RHEVM-Engine -S -M rhel6.4.0 -enable-kvm -m 4096 -smp 2,sockets=2,cores=1,threads=1 -uuid 3b442362-86d8-702c-684d-189f9e31bd11 -nographic -nodefconfig -nodefaults -chardev socket,id=charmonitor,path=/var/lib/libvirt/qemu/RHEVM-Engine.monitor,server,nowait -mon chardev=charmonitor,id=monitor,mode=control -rtc base=utc -no-reboot -no-shutdown -kernel /var/lib/libvirt/boot/virtinst-vmlinuz.D3uz9R -initrd /var/lib/libvirt/boot/virtinst-initrd.img.S46JuW -append method=http://download.eng.tlv.redhat.com/pub/rhel/released/RHEL-6/6.4/Server/x86_64/os -device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 -drive file=/rhev/data-center/mnt/shual.eng.lab.tlv.redhat.com:_volumes_shual_integration_rhevm-32-integ-test-3/rhev-ha/rhevm-engine.disk,if=none,id=drive-virtio-disk0,format=raw,cache=none -device virtio-blk-pci,scsi=off,bus=pci.0,addr=0x4,drive=drive-virtio-disk0,id=virtio-disk0,bootindex=1 -netdev tap,fd=23,id=hostnet0,vhost=on,vhostfd=24 -device virtio-net-pci,netdev=hostnet0,id=net0,mac=52:54:00:28:57:64,bus=pci.0,addr=0x3 -chardev pty,id=charserial0 -device isa-serial,chardev=charserial0,id=serial0 -device usb-tablet,id=input0 -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x5
char device redirected to /dev/pts/2
qemu: could not load kernel '/var/lib/libvirt/boot/virtinst-vmlinuz.D3uz9R': Permission denied
2013-03-17 12:27:29.116+0000: shutting down

Comment 15 Cole Robinson 2013-03-18 00:21:06 UTC
Lev, please file a new bug against RHEL, this bug is 3 years old and is against Fedora