From owner-freebsd-virtualization@FreeBSD.ORG Fri Dec 26 20:07:46 2014 Return-Path: Delivered-To: freebsd-virtualization@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6C99F9D7 for ; Fri, 26 Dec 2014 20:07:46 +0000 (UTC) Received: from mail-wg0-x22e.google.com (mail-wg0-x22e.google.com [IPv6:2a00:1450:400c:c00::22e]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id F38FF64B63 for ; Fri, 26 Dec 2014 20:07:45 +0000 (UTC) Received: by mail-wg0-f46.google.com with SMTP id x13so14930408wgg.5 for ; Fri, 26 Dec 2014 12:07:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=+vWqtylCJKuES7OcqowMHQP6nuBWMG1E1qoZvxnDrJQ=; b=fFey19v9v9GgXNMPQO7ayvyRjUE7aG0PEkgV2dEcO0YBm+T8gKpiVjWXco+4Z+VxRf 7AkqvDdv9HaDjp/g5gXGWwBTdZmiS8eR7qMwnofM9RYqn6Ww0Ap6OBafcr13ItxpPSV/ BAZJPvt2W5WnKxldHcP1/ISE8ciN/q7LGjOn1+7Ku03UT2ICYF84cMOW7jXP/KjFEJsO Km5nLzsUi88FwDmVsVNOKMzekWEqlBcmxgMTQWNzMmm44EbDGoHsU/topTMO4CmJzxUt oHqowTkhc2aiSyc5hyfgQYWBOWtkdhL4TQiwMedi3sWDitMBHt4gmbuHt1ZQxPFxbV8I JJLQ== MIME-Version: 1.0 X-Received: by 10.180.75.237 with SMTP id f13mr70646556wiw.69.1419624464268; Fri, 26 Dec 2014 12:07:44 -0800 (PST) Received: by 10.27.5.207 with HTTP; Fri, 26 Dec 2014 12:07:44 -0800 (PST) In-Reply-To: References: Date: Fri, 26 Dec 2014 12:07:44 -0800 Message-ID: Subject: Re: FreeBSD bhyve VM Exiting From: Neel Natu To: Shawn Webb Content-Type: text/plain; charset=UTF-8 Cc: "freebsd-virtualization@freebsd.org" X-BeenThere: freebsd-virtualization@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "Discussion of various virtualization techniques FreeBSD supports." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Dec 2014 20:07:46 -0000 Hi Shawn, On Fri, Dec 26, 2014 at 6:26 AM, Shawn Webb wrote: > Hey All, > > I'm running a FreeBSD/amd64 11-current (r276204) guest VM in bhyve. It > seems that running Poudriere in it causes the VM to exit. > > This is what bhyve outputs when the VM dies: > > reason VMX > rip 0xffffffff80d68564 > inst_length 5 > status 0 > exit_reason 2 > qualification 0x0000000000000000 > inst_type 0 > inst_error 0 > > I have no idea what "reason VMX" means or what "exit_reason 2" means. Is > there a way to decode that? > Exit reason '2' is a triple fault. > What kinds of info/data do you guys need to debug this? > You'll need a FreeBSD host with svn revision >= 276098 and a custom kernel config to enable KTR. https://svnweb.freebsd.org/base?view=revision&revision=276098 Then you can set the following tunable "hw.vmm.trace_guest_exceptions" to "1" before loading vmm.ko. This will cause bhyve to trace all guest exceptions via KTR. You can verify that the tunable took effect using 'sysctl hw.vmm.trace_guest_exceptions'. When the bhyve process exits you can then dump the KTR entries using something like this: 'sudo ktrdump -cto /tmp/ktrdump.out'. You'll probably want to do this in a script so the ktrdump(8) happens immediately after bhyve(8) exits. I use the following options in my kernel config to enable KTR: options KTR options KTR_MASK=(KTR_GEN) options KTR_ENTRIES=(4*1024*1024) Hope this helps. best Neel > Thanks, > > Shawn > _______________________________________________ > freebsd-virtualization@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-virtualization > To unsubscribe, send any mail to "freebsd-virtualization-unsubscribe@freebsd.org"