I just compiled a vanilla kernel (ver. 4.16.8) from kernel.org (working GREAT, btw. Even has 8 little tux's on boot! ), and I was hoping to run that same kernel on my Fedora VM (both F28-64).

Upon running the command:

VM script (critical info at bottom of qemu command):
qemu-system-x86_64 \
-enable-kvm -cpu host \
-m 4096M -mem-prealloc -mem-path /dev/hugepages/f28 \
-drive format=raw,file=/home/user/Downloads/f28-64.img,if=virtio,aio=native,cache.direct=on, \
-smp 8,sockets=1,cores=8,threads=1 \
-device virtio-vga,virgl=on \
-device virtio-serial-pci \
-cdrom /home/user/Downloads/f28-dvd.iso -boot c \
-device virtserialport,chardev=spicechannel0,name=com.redhat.spice.0 \
-chardev spicevmc,id=spicechannel0,name=vdagent \
-spice unix,addr=/tmp/vm_spice.socket,disable-ticketing \
-machine accel=kvm,type=q35,kernel-irqchip=split \
-device intel-iommu,intremap=on,caching-mode=on \
-fsdev local,security_model=passthrough,id=fsdev0,path=/home/user/share \
-device virtio-9p-pci,id=fs0,fsdev=fsdev0,mount_tag=hostshare \
-balloon virtio -soundhw hda -sandbox on -daemonize \
-kernel /home/user/kernel/linux-4.16.8/arch/x86_64/boot/bzImage \
-initrd /boot/initramfs-4.16.8.img \

#-append "root=/dev/vda1"

# View the WM with:
spicy --uri="spice+unix:///tmp/vm_spice.socket"
Note that the kernel was compiled in my /home dir. as /boot simply didn't have enough space...

It boots, and starts to loads modules, and then I get this splash (I put only critical info here as all was copied by hand):
[Failed] Failed to start Switch Root.
See 'systemctl status initrd-switch-root.service' for details.

Generating "/run/initramfs/rdsosreport.txt"

Entering emergency mode...

# systemctl status initrd-switch-root.service
... Failed to switch root: Specified switch root path '/sysroot' does not seem to be an OS tree. os-release file is missing.

At which point a web search brought me to this recommendation:

I had the same issue after upgrading to F26.

I solved the problem by following in the emergency shell:

mount - o remount,rw /sysroot
rm -rf /sysroot/etc/os-release
cp /usr/lib/os-release /sysroot/etc
Unfortunately, it wouldn't let me mount with that command. Nonetheless I was able to copy the files, exit, and issue a successful reboot. The rebooted VM was the exact same. Also, I noticed that when I copied the /run/initramfs/rdsosreport.txt file to root, it was gone upon the next bootup. I then wrote a test file with vi in the root directory to test this and rebooted. It was gone upon reboot; so I guess the changes are just not sticking somehow this early in boot?

I'm not sure if/how to add the '-append' parameter to the qemu command. I tried several different variations of it and each brought me to a stopped boot which mentions something to do with system 'ticks' and just hangs forever (2 minutes was my patience).

Any info you need to help troubleshoot, I am glad to give it.