I am getting 'qemu: could not load kernel' error while trying to create a new VM using virt-install or virt-manager with dynamic_ownership disabled.
virt-install --connect qemu:///system \
-n $guestname \
-r 512 \
--graphics vnc,keymap=en-us \
-w bridge:br1 \
--disk path=$datastore/$guestname.img,size=40 \
-l $repo \
-x "ks=$ksurl/$ksfile ksdevice=eth0 ip=$guestip netmask=$netmask nameserver=$nameserver gateway=$gw"
Retrieving file .treeinfo... | 798 B 00:00 ...
Retrieving file vmlinuz... | 7.5 MB 00:00 ...
Retrieving file initrd.img... | 59 MB 00:01 ...
Allocating 'virtinst-vmlinuz.l4mEAd' | 3.8 MB 00:00
Transferring virtinst-vmlinuz.l4mEAd | 3.8 MB 00:00
Allocating 'virtinst-initrd.img.IvGhFr' | 29 MB 00:00
Transferring virtinst-initrd.img.IvGhFr | 29 MB 00:05
Creating storage file generic-server.img | 40 GB 00:00
ERROR internal error process exited while connecting to monitor: char device redirected to /dev/pts/1
qemu: could not load kernel '/var/lib/libvirt/boot/virtinst-vmlinuz.l4mEAd': Permission denied
Domain installation does not appear to have been successful.
System Information: CentOS 6.2 x86_64, libvirt 0.9.4, qemu-kvm 2:0.12.1.2-2.209.el6_2.1, virt-install 0.600.0.
The error indicates permission issues while loading the kernel image. I have documented related logs at: https://dev.uabgrid.uab.edu/ticket/191 . Right now as a workaround, I am doing OS installation by defining direct kernel boot option and extra kernel command-line arguments in the domain XML file.
I had posted this question on libvirt mailing list 4-5 months back, but I didn't have chance to follow up on the issue for a long time . I was wondering if anyone could provide help in resolving this issue. Does disabled dynamic ownership setting require any changes with '/var/lib/libvirt/boot' directory or any other changes? Any help would be appreciated.