Re: Kernel Panic on FreeBSD guests with libvirt 1.2.2 and qemu 1.7.91

2014-05-02 Thread Juergen Lock
In article f946e633356b1161c0d43217f5989...@drenet.net you write:
On 05/01/2014 11:00 am, Andre Goree wrote:
 Hello,
 
 I'm running libvirt 1.2.2 and QEMU 1.7.91 on an Ubuntu 12.04LTS host.
 Prior to a recent upgrade, I've been able to run FreeBSD guests (both
 10.0 and 9.2) perfectly fine without issue.  Now, this the
 aforementioned versions, I'm running into a kernel panic almost
 immediately after booting, same message with both 10.0  9.2:  Fatal
 trap 12: page fault while in kernel mode.
 
 To ensure that it had nothing to do with my configuration [of the
 guest OS] I've tried installing the guest from guest using
 virt-install, however I still run into the same kernel panic.  It'll
 be hard for me to post the output of the panic, so I'll try to show as
 much info as possible via images[1].
 
 Upon researching, I've come across a few threads (e.g., this one[2])
 that appear to be related, but none have helped.  Any information that
 you can provide to help me get to the root of this issue would be
 greatly appreciated!
 
 [1]http://www.drenet.net/images/panic1.png
 http://www.drenet.net/images/panic2.png
 http://www.drenet.net/images/panic_noacpi1.png
 http://www.drenet.net/images/panic_noacpi2.png
 
 [2]http://forums.freebsd.org/viewtopic.php?t=36761


After using my noggin a bit, I've determine the culprit to be atkbd.  If 
I disable it via the bootloader with set hint.atkbd.0.disabled=1, the 
vm will boot fine.  HOWEVER, my problem then is that I cannot use the 
keyboard via VNC.  I'm trying to figure out ways around this...any help 
would be much appreciated.  I've already tried setting different flags 
for atkbd, but no matter which flag I set, I get the kernel panic -- 
ostensibly because atkbd is enabled (as it must be for a flag to be set 
for it).

I think you have hit this issue for which the workaround is a patch
to seabios:

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug


http://git.qemu.org/?p=seabios.git;a=commit;h=8032b8a0fec550de5cb2f7d37aa031cebc2200c3

 References:

http://article.gmane.org/gmane.comp.emulators.qemu/254414/

https://lists.gnu.org/archive/html/qemu-stable/2013-03/msg00037.html

 HTH, :)
Juergen
___
freebsd-virtualization@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-virtualization
To unsubscribe, send any mail to 
freebsd-virtualization-unsubscr...@freebsd.org


Re: Kernel Panic on FreeBSD guests with libvirt 1.2.2 and qemu 1.7.91

2014-05-02 Thread Juergen Lock
In article 201405021800.s42i0tie094...@enceladus10.kn-bremen.de you write:
In article 
f946e633356b1161c0d43217f59893b9-62z4zxnhd7cstnjn9+b...@public.gmane.org you 
write:
On 05/01/2014 11:00 am, Andre Goree wrote:
 Hello,
 
 I'm running libvirt 1.2.2 and QEMU 1.7.91 on an Ubuntu 12.04LTS host.
 Prior to a recent upgrade, I've been able to run FreeBSD guests (both
 10.0 and 9.2) perfectly fine without issue.  Now, this the
 aforementioned versions, I'm running into a kernel panic almost
 immediately after booting, same message with both 10.0  9.2:  Fatal
 trap 12: page fault while in kernel mode.
 
 To ensure that it had nothing to do with my configuration [of the
 guest OS] I've tried installing the guest from guest using
 virt-install, however I still run into the same kernel panic.  It'll
 be hard for me to post the output of the panic, so I'll try to show as
 much info as possible via images[1].
 
 Upon researching, I've come across a few threads (e.g., this one[2])
 that appear to be related, but none have helped.  Any information that
 you can provide to help me get to the root of this issue would be
 greatly appreciated!
 
 [1]http://www.drenet.net/images/panic1.png
 http://www.drenet.net/images/panic2.png
 http://www.drenet.net/images/panic_noacpi1.png
 http://www.drenet.net/images/panic_noacpi2.png
 
 [2]http://forums.freebsd.org/viewtopic.php?t=36761


After using my noggin a bit, I've determine the culprit to be atkbd.  If 
I disable it via the bootloader with set hint.atkbd.0.disabled=1, the 
vm will boot fine.  HOWEVER, my problem then is that I cannot use the 
keyboard via VNC.  I'm trying to figure out ways around this...any help 
would be much appreciated.  I've already tried setting different flags 
for atkbd, but no matter which flag I set, I get the kernel panic -- 
ostensibly because atkbd is enabled (as it must be for a flag to be set 
for it).

I think you have hit this issue for which the workaround is a patch
to seabios:

   https://bugs.debian.org/cgi-bin/bugreport.cgi?bug

Hm for some reason that link got truncated, try this one:

https://bugs.debian.org/737142

   
 http://git.qemu.org/?p=seabios.git;a=commit;h=8032b8a0fec550de5cb2f7d37aa031cebc2200c3

 References:

   http://article.gmane.org/gmane.comp.emulators.qemu/254414/

   https://lists.gnu.org/archive/html/qemu-stable/2013-03/msg00037.html


Juergen
___
freebsd-virtualization@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-virtualization
To unsubscribe, send any mail to 
freebsd-virtualization-unsubscr...@freebsd.org


Re: kqemu patch for CURRENT/10-STABLE (was Re: Linux on BHyVe in 10.0-RELEASE )

2014-02-06 Thread Juergen Lock
On Thu, Feb 06, 2014 at 05:16:15PM +0200, Shteryana Shopova wrote:
 Hi all,
 
 Sorry for top posting but I'm new to the list and came across this
 thread while playing with bhyve these days. To apply the patch -
 
 #cp patch-unit3minorfix /usr/ports/emulators/kqemu-kmod/files/
 
 compile and install the module.
 
 I've been running kqemu under current with the attached patch (plain
 text below in case the attachment is removed) for a couple of months
 now and the module is loaded successfully -
 
 root@demetra:/usr/ports/emulators/kqemu-kmod # dmesg | tail -n 10 | grep kqemu
 kqemu version 0x00010300
 kqemu: KQEMU installed, max_locked_mem=4120624kB.
 root@demetra:/usr/ports/emulators/kqemu-kmod # uname -v
 FreeBSD 11.0-CURRENT #6 r260863: Sun Jan 19 02:57:49 EET 2014
 
 The original commit that broke kqemu-kmod is from March 9th, 2013, so
 the patch should be applicable to 10-STABLE too. Reports on
 success/failures welcome.
 
 cheers,
 Shteryana
 
 P.S. Example on getting a headless VM with vbox -
 
 #VBoxManage createvm --name MyServer --ostype Windows7 --register
 #VBoxManage createhd --filename MyServer.vdi --size 20
 #VBoxManage storagectl MyServer --name IDE Controller --add ide
 --controller PIIX3
 #VBoxManage storageattach MyServer --storagectl IDE Controller
 --port 0 --device 1 --type hdd --medium MyServer.vdi
 #VBoxManage storageattach MyServer --storagectl IDE Controller
 --port 1 --device 0 --type dvddrive --medium
 /home/myserver/install.iso
 #VBoxManage modifyvm MyServer --nic1 bridged --cableconnected1 on
 --bridgeadapter1 em0 --nictype1 82540EM
 #VBoxManage modifyvm MyServer --memory 1024 --acpi on --boot1 dvd
 #VBoxHeadless -n -m 5901 -s MyServer
 
 The VM is then accessible via vncviewer to the IP of the original
 machine port 5901
 
 --- kqemu-freebsd.c.orig2014-02-06 16:03:15.881335406 +0200
 +++ kqemu-freebsd.c2014-02-06 16:04:25.951329106 +0200
 @@ -109,7 +109,12 @@
  vm_offset_t va;
  vm_paddr_t pa;
 
 +#if __FreeBSD_version = 130
 +va = kmem_malloc(kernel_map, PAGE_SIZE, M_WAITOK);
 +#else
  va = kmem_alloc(kernel_map, PAGE_SIZE);
 +#endif
 +
  if (va == 0) {
  kqemu_log(kqemu_alloc_zeroed_page: NULL\n);
  return NULL;

Oh well kqemu isn't even used by vbox, it's for emulaotors/qemu when
built with the KQEMU knob and run with -enable-kqemu or -kernel-kqemu,
and fixing _that_ needs most likely more changes than this. (I.e. I
think I tried something similar and only got a panic.  And also qemu
uses kqemu-kmod-devel, kqemu-kmod is only left for people still using
even older qemu forks.)

 Sorry...
Juergen
___
freebsd-virtualization@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-virtualization
To unsubscribe, send any mail to 
freebsd-virtualization-unsubscr...@freebsd.org