You are not logged in.

#1 2015-12-24 12:18:42

Physicist1616
Member
Registered: 2015-02-16
Posts: 37

QEMU Black Screen with KVM

I'm having a really tough time with KVM.  My board and proc support vt-d (everything is intel, but no onboard video; it goes through an nvidia card).  I can make QEMU show me stuff in emulation modes, but as soon as I specify -enable-kvm, -cpu kvm64, or -machine accel=kvm, the window only shows me a black screen (it doesn't even show me bios lines, and I've simplified as much as possible so I'm just attempting to boot a CD).

What could be going on here?  I suspect more information may be needed; how can I gather more / what would be useful?

edit:  -cpu kvm64 is actually showing me video.  Is it for sure KVM?  What about the -enable-kvm or -machine accel=kvm?  Why aren't they working?

Last edited by Physicist1616 (2015-12-24 12:22:50)

Offline

#2 2015-12-24 14:55:23

Lone_Wolf
Administrator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 15,552

Re: QEMU Black Screen with KVM

https://wiki.archlinux.org/index.php/PCI_passthrough_via_OVMF wrote:

-cpu host, kvm=off - emulate the host's exact CPU. kvm=off is used for NVIDIA cards to stop it detecting a hypervisor and therefore exiting with an error.

I'm not 100% sure this is applicable for you, but it seems worth a try.


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.

clean chroot building not flexible enough ?
Try clean chroot manager by graysky

Offline

#3 2015-12-26 02:49:18

tom.ty89
Member
Registered: 2012-11-15
Posts: 897

Re: QEMU Black Screen with KVM

Is he even trying to passthrough anything though?

try "-enable-kvm -cpu host"

Offline

#4 2016-01-28 11:09:54

Physicist1616
Member
Registered: 2015-02-16
Posts: 37

Re: QEMU Black Screen with KVM

I haven't forgotten about this thread; there was a long (too long) interlude where I was awaiting a coolant pump replacement, so this PC was off and I was stuck on a Raspberry Pi.

Thanks very much for your replies, tom.ty89 and Lone_Wolf.

tom.ty89, you're correct, I'm not actually attempting to pass anything through yet; I attempted doing it all the steps about 6 months ago, but had to take a break.  Getting KVM working before I start fiddling with passthrough seemed an appropriate way to simplify the problems and make it more manageable.

Thanks for the tip, Lone_Wolf.  I gave it a shot, but it still blackscreens.

[spoiler]

qemu-system-x86_64 \
	-cpu host,kvm=off \
	-m size=1G,slots=3,maxmem=4G \
	-cdrom /mnt/data/archlinux-2015.11.01-dual.iso \
	-boot order=d \


#Scraps
if [ ] ; then

   -boot menu=on \
   -m size=1G,slots=3,maxmem=4G \
   -display sdl \
   -hda "$PHYSICAL_DISK" \
   -spice
   -enable-kvm \
   -cpu host \
   -machine \
      pc-i440fx-2.4,iommu=on,accel=kvm \
   -m kvm \
   -cdrom /dev/sr0 \
   -boot order=c \
   -cpu kvm64 \
	-enable-kvm \

else
   echo "Proper ending."
fi

[/spoiler]

Offline

#5 2016-01-28 11:25:32

Physicist1616
Member
Registered: 2015-02-16
Posts: 37

Re: QEMU Black Screen with KVM

tom.ty89 wrote:

Is he even trying to passthrough anything though?

try "-enable-kvm -cpu host"

Also black screen.  I posted my script and it includes many pieces of my experiments trying to make this work in the scraps section.  It feels like I'm caught on documentation of more than one version of QEMU and KVM, so I don't actually know for sure which (if any or all) of those arguments are correct, or which are mutually exclusive.

I did notice that this option seems to have QEMU using 100% CPU of one core even after 5 minutes just trying to load this arch linux image.  At about the 5-minute mark during my tabbing around I saw it had switched cores, too, still at 100% on the new core.  Still black screen, though.

Offline

Board footer

Powered by FluxBB