From owner-freebsd-virtualization@FreeBSD.ORG Mon Oct 28 04:02:06 2013 Return-Path: Delivered-To: freebsd-virtualization@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 29D673D6; Mon, 28 Oct 2013 04:02:06 +0000 (UTC) (envelope-from freebsd@allanjude.com) Received: from mx1.scaleengine.net (beauharnois2.bhs1.scaleengine.net [142.4.218.15]) by mx1.freebsd.org (Postfix) with ESMTP id 06F772EFD; Mon, 28 Oct 2013 04:02:05 +0000 (UTC) Received: from [10.1.1.1] (S01060001abad1dea.hm.shawcable.net [50.70.108.129]) (Authenticated sender: allan.jude@scaleengine.com) by mx1.scaleengine.net (Postfix) with ESMTPSA id 7657C1CEAF; Mon, 28 Oct 2013 04:02:03 +0000 (UTC) Message-ID: <526DE1C1.604@allanjude.com> Date: Mon, 28 Oct 2013 00:02:09 -0400 From: Allan Jude User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.0.1 MIME-Version: 1.0 To: freebsd-virtualization@freebsd.org Subject: Re: Three observations on Bhyve References: <20131025143341.GC26481@lemon> <526A8E95.7090808@freebsd.org> In-Reply-To: <526A8E95.7090808@freebsd.org> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: Devin Teske X-BeenThere: freebsd-virtualization@freebsd.org X-Mailman-Version: 2.1.14 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: Mon, 28 Oct 2013 04:02:06 -0000 On 2013-10-25 11:30, Peter Grehan wrote: >> (1) You can't boot an i386 ISO. It can't load the kernel. I half >> expected this would be the case. It would be nice if this did work. > > The loader work isn't too bad to get this going, but the bhyve work > is quite a bit more effort since the i386 kernel makes a lot more > assumptions about the environment, such as the ability to call back > into BIOS. > > On the TODO list. > >> (2) VirtIO on a raw disc device seems to have some problems. I tried >> installing using the -BETA1 amd64 ISO. The disc particulars seem to be >> detected fine but when I try and commit the partition layout I see: >> >> 5vtbd0: hard error cmd=write 290-305 >> >> The disc is a 640GB WD SATA disc and I used the automatic scheme, if it >> makes any difference. > > That's bhyve colliding with GEOM. There was a thread a while back > about being able to exempt certain block devices from being tasted for > iSCSI LUN usage - bhyve will probably need something similar. > >> (3) I tried to use the live environment in order to play around with >> (2) a bit more but it lacks the necessary /etc/ttys line. It would be >> great if this wasn't required *somehow*. > > The ttys issue does need to be addressed. This applies for serial > console users as well. Hey, works for Linux :) > >> Should I file PRs for these issues? > > Yes, always file PRs please :) > > later, > > Peter. > > _______________________________________________ > 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" > > > Last night Devin made a patch to bsdinstall (at #vBSDCon hacker lounge) to deal with the /etc/ttys issue on the system that bsdinstall installs, but, I wonder what the correct fix is for the livecd environment. During the hacker lounge discussion, we decided it probably wasn't a good idea to enable the serial console by default (bsdinstall only does it if it detects you using the serial console to do the install). I suppose the same logic could be added to the rc.local script in usr/src/release/ maybe, to 'patch' the /etc/ttys file when the serial condition is detected. -- Allan Jude From owner-freebsd-virtualization@FreeBSD.ORG Mon Oct 28 11:06:58 2013 Return-Path: Delivered-To: freebsd-virtualization@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 2F9ECB78 for ; Mon, 28 Oct 2013 11:06:58 +0000 (UTC) (envelope-from owner-bugmaster@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 1C9EC2489 for ; Mon, 28 Oct 2013 11:06:58 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.7/8.14.7) with ESMTP id r9SB6vxj055275 for ; Mon, 28 Oct 2013 11:06:57 GMT (envelope-from owner-bugmaster@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.7/8.14.7/Submit) id r9SB6vpl055273 for freebsd-virtualization@FreeBSD.org; Mon, 28 Oct 2013 11:06:57 GMT (envelope-from owner-bugmaster@FreeBSD.org) Date: Mon, 28 Oct 2013 11:06:57 GMT Message-Id: <201310281106.r9SB6vpl055273@freefall.freebsd.org> X-Authentication-Warning: freefall.freebsd.org: gnats set sender to owner-bugmaster@FreeBSD.org using -f From: FreeBSD bugmaster To: freebsd-virtualization@FreeBSD.org Subject: Current problem reports assigned to freebsd-virtualization@FreeBSD.org X-BeenThere: freebsd-virtualization@freebsd.org X-Mailman-Version: 2.1.14 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: Mon, 28 Oct 2013 11:06:58 -0000 Note: to view an individual PR, use: http://www.freebsd.org/cgi/query-pr.cgi?pr=(number). The following is a listing of current problems submitted by FreeBSD users. These represent problem reports covering all versions including experimental development code and obsolete releases. S Tracker Resp. Description -------------------------------------------------------------------------------- o kern/165252 virtualization[vimage] [pf] [panic] kernel panics with VIMAGE and PF o kern/161094 virtualization[vimage] [pf] [panic] kernel panic with pf + VIMAGE wh o kern/160541 virtualization[vimage][pf][patch] panic: userret: Returning on td 0x o kern/160496 virtualization[vimage] [pf] [patch] kernel panic with pf + VIMAGE o kern/148155 virtualization[vimage] [pf] Kernel panic with PF + VIMAGE kernel opt a kern/147950 virtualization[vimage] [carp] VIMAGE + CARP = kernel crash s kern/143808 virtualization[pf] pf does not work inside jail 7 problems total. From owner-freebsd-virtualization@FreeBSD.ORG Mon Oct 28 16:11:39 2013 Return-Path: Delivered-To: virtualization@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id B913394A for ; Mon, 28 Oct 2013 16:11:39 +0000 (UTC) (envelope-from symbolics@gmx.com) Received: from mout.gmx.net (mout.gmx.net [212.227.15.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 56A632A0E for ; Mon, 28 Oct 2013 16:11:39 +0000 (UTC) Received: from lemon ([80.7.17.14]) by mail.gmx.com (mrgmx001) with ESMTPSA (Nemesis) id 0LwaQZ-1VkQQu3q19-018Gjc for ; Mon, 28 Oct 2013 17:11:31 +0100 Received: by lemon (Postfix, from userid 1001) id 5B768EB2F2; Mon, 28 Oct 2013 16:11:31 +0000 (GMT) Date: Mon, 28 Oct 2013 16:11:31 +0000 From: symbolics@gmx.com To: virtualization@freebsd.org Subject: Re: Three observations on Bhyve Message-ID: <20131028161131.GA3335@lemon> References: <20131025143341.GC26481@lemon> <526A8E95.7090808@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <526A8E95.7090808@freebsd.org> X-Provags-ID: V03:K0:VAEqi5ker3fXXqOPGncWY95a5Gbpd0D5rs0Bq+qPzRMs1Fr1y2F ws1Oj4EZCnqMIXGUDAiWJFKu0gir2Cfn6bqU5eOD1c8aBlbiLkQNFGFrHeHtJS93iPbEQH0 jiOtoTy3c3QczfeuHUQvn2bllCdjSW+Ehp/5zw3wBPrKKEvkcP9B19LeGtWrZsEA296Rtqq Bsw5DFTMThoWZZeRewC2Q== X-BeenThere: freebsd-virtualization@freebsd.org X-Mailman-Version: 2.1.14 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: Mon, 28 Oct 2013 16:11:39 -0000 On Fri, Oct 25, 2013 at 08:30:29AM -0700, Peter Grehan wrote: > > (1) You can't boot an i386 ISO. It can't load the kernel. I half > > expected this would be the case. It would be nice if this did work. > > The loader work isn't too bad to get this going, but the bhyve work is > quite a bit more effort since the i386 kernel makes a lot more > assumptions about the environment, such as the ability to call back into > BIOS. > > On the TODO list. > > > (2) VirtIO on a raw disc device seems to have some problems. I tried > > installing using the -BETA1 amd64 ISO. The disc particulars seem to be > > detected fine but when I try and commit the partition layout I see: > > > > 5vtbd0: hard error cmd=write 290-305 > > > > The disc is a 640GB WD SATA disc and I used the automatic scheme, if it > > makes any difference. > > That's bhyve colliding with GEOM. There was a thread a while back > about being able to exempt certain block devices from being tasted for > iSCSI LUN usage - bhyve will probably need something similar. > > > (3) I tried to use the live environment in order to play around with > > (2) a bit more but it lacks the necessary /etc/ttys line. It would be > > great if this wasn't required *somehow*. > > The ttys issue does need to be addressed. This applies for serial > console users as well. Hey, works for Linux :) > > > Should I file PRs for these issues? > > Yes, always file PRs please :) > Hi Peter, Filed as 183400, 183401 and 183408. --sym From owner-freebsd-virtualization@FreeBSD.ORG Tue Oct 29 00:40:54 2013 Return-Path: Delivered-To: freebsd-virtualization@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 5B83C97A for ; Tue, 29 Oct 2013 00:40:54 +0000 (UTC) (envelope-from crodr001@gmail.com) Received: from mail-la0-x236.google.com (mail-la0-x236.google.com [IPv6:2a00:1450:4010:c03::236]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id DB80D2BFE for ; Tue, 29 Oct 2013 00:40:53 +0000 (UTC) Received: by mail-la0-f54.google.com with SMTP id gx14so5974604lab.27 for ; Mon, 28 Oct 2013 17:40:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:date:message-id:subject:from:to:content-type; bh=t5gcYQC3CgfoHHKEGKyx+7b3za/PhEWLjraVl5lgrqc=; b=Bmwlk8J2/Awm3wPjdVv2LjcwgccEquP+tYb8iz99anZwEmdjCI5Z78hL5ljEZKBThF CQyode5t+4TrrcUhNIlktDyAK705n8Eslm6Bh4D4RemOc9gpg1sGJywWwhUVjJZgIEx4 Sc6G58oAa4ekOCLMTbmv01+NXLGP6pOurJIDwtUnfubIcv5P0urzm2bBdswff811AizW ysuKGxJniTlU4J5u9gz8Kbf9+r7wTBDe9QZuVJfwMeSVn0oL4ndIVCQhzUIKgyLsrTqS Zfj4pNTicuOVAsS07Uxcm3F5Fn6cZu29+Vqkk7hRMsvZWmaXurvPr1yJnaTVSAMtkUlI 451Q== MIME-Version: 1.0 X-Received: by 10.112.141.165 with SMTP id rp5mr13331619lbb.3.1383007251738; Mon, 28 Oct 2013 17:40:51 -0700 (PDT) Sender: crodr001@gmail.com Received: by 10.112.139.132 with HTTP; Mon, 28 Oct 2013 17:40:51 -0700 (PDT) Date: Mon, 28 Oct 2013 17:40:51 -0700 X-Google-Sender-Auth: 9RPvhZXirb4clpNfzL83UnwaCTE Message-ID: Subject: Bhyve: acpi0: AcpiEnterSleepStatePrep failed - AE_NOT_FOUND From: Craig Rodrigues To: "freebsd-virtualization@freebsd.org" Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.14 X-BeenThere: freebsd-virtualization@freebsd.org X-Mailman-Version: 2.1.14 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: Tue, 29 Oct 2013 00:40:54 -0000 Hi, I notice that in BHyve, if I try to do "shutdown -p now", there is an ACPI error: ============================================================== Halting and powering down... Waiting (max 60 seconds) for system process `vnlru' to stop...done Waiting (max 60 seconds) for system process `bufdaemon' to stop...done Waiting (max 60 seconds) for system process `syncer' to stop...at Syncing disks, vnodes remaining...0 done All buffers synced. Uptime: 17s acpi0: AcpiEnterSleepStatePrep failed - AE_NOT_FOUND The operating system has halted. Please press any key to reboot. ============================================================== Is that a known issue? Is there another way to trigger a BHyve VM to shutdown from inside the VM? Right now I need to "bhyve --destroy --vm=myvm". -- Craig From owner-freebsd-virtualization@FreeBSD.ORG Tue Oct 29 00:51:11 2013 Return-Path: Delivered-To: freebsd-virtualization@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 456D9B5E; Tue, 29 Oct 2013 00:51:11 +0000 (UTC) (envelope-from grehan@freebsd.org) Received: from alto.onthenet.com.au (alto.OntheNet.com.au [203.13.68.12]) by mx1.freebsd.org (Postfix) with ESMTP id 06B812C72; Tue, 29 Oct 2013 00:51:10 +0000 (UTC) Received: from dommail.onthenet.com.au (dommail.OntheNet.com.au [203.13.70.57]) by alto.onthenet.com.au (Postfix) with ESMTPS id 08780123A3; Tue, 29 Oct 2013 10:51:03 +1000 (EST) Received: from Peter-Grehans-MacBook-Pro-2.local (c-67-161-27-37.hsd1.ca.comcast.net [67.161.27.37]) by dommail.onthenet.com.au (MOS 4.2.4-GA) with ESMTP id BPL89945 (AUTH peterg@ptree32.com.au); Tue, 29 Oct 2013 10:51:01 +1000 Message-ID: <526F066C.2020001@freebsd.org> Date: Mon, 28 Oct 2013 17:50:52 -0700 From: Peter Grehan User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:24.0) Gecko/20100101 Thunderbird/24.0.1 MIME-Version: 1.0 To: Craig Rodrigues , "freebsd-virtualization@freebsd.org" Subject: Re: Bhyve: acpi0: AcpiEnterSleepStatePrep failed - AE_NOT_FOUND References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-virtualization@freebsd.org X-Mailman-Version: 2.1.14 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: Tue, 29 Oct 2013 00:51:11 -0000 Hi Craig, > I notice that in BHyve, if I try to do "shutdown -p now", > there is an ACPI error: > > ============================================================== > Halting and powering down... > Waiting (max 60 seconds) for system process `vnlru' to stop...done > Waiting (max 60 seconds) for system process `bufdaemon' to stop...done > Waiting (max 60 seconds) for system process `syncer' to stop...at > Syncing disks, vnodes remaining...0 done > All buffers synced. > Uptime: 17s > acpi0: AcpiEnterSleepStatePrep failed - AE_NOT_FOUND > > The operating system has halted. > Please press any key to reboot. > > ============================================================== > > Is that a known issue? Yes. bhyve doesn't advertise sleep/power states so it can't deal with an attempt to invoke ACPI methods to enter those. But, we should probably be able to put something in the DSDT that will force an exit. > Is there another way to trigger a BHyve VM to shutdown from > inside the VM? Right now I need to "bhyve --destroy --vm=myvm". reboot and halt will both work fine. later, Peter. From owner-freebsd-virtualization@FreeBSD.ORG Tue Oct 29 01:02:19 2013 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 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id B4E8B201; Tue, 29 Oct 2013 01:02:19 +0000 (UTC) (envelope-from aryeh.friedman@gmail.com) Received: from mail-pb0-x22b.google.com (mail-pb0-x22b.google.com [IPv6:2607:f8b0:400e:c01::22b]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 826D92D09; Tue, 29 Oct 2013 01:02:19 +0000 (UTC) Received: by mail-pb0-f43.google.com with SMTP id md4so2772796pbc.30 for ; Mon, 28 Oct 2013 18:02:19 -0700 (PDT) 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=+p93/N+WWSbRDoqJ7SYT+K7C/EdDh1VA29LF+wFdpMU=; b=P2sa5V99mDqL6UmOWKTDGaRIgd+gKdUi80v40grXB7t3Vt3vOk0SGYUVAWpaTsN/zb /lxbQsMHG/ZzdfWslDng42J+VBYj/DojFoUT/HbZ/Is8jg08nB+xWUn+3pqZQd4e3SU1 EYLXrd9z9+bhQWFaPWQpGiNjf1CsxJAowfCOenMtuylLLZqHcVOQ30Moz3VZ7vtw6PF1 o5WDvssy2On7y1oiPFkMdVkyIh0YttE0AEttqRK3/Rdz4qB9isntPCAQ9ID2QVe8gT6I 9CP5PAFTMezpWyHsMQFVtyuY3v1YyBgzGt6bR4D86YxpTXC2r8sB2G8Ak8mjPw/lMhZX xocw== MIME-Version: 1.0 X-Received: by 10.66.4.105 with SMTP id j9mr28644185paj.84.1383008537150; Mon, 28 Oct 2013 18:02:17 -0700 (PDT) Received: by 10.68.185.130 with HTTP; Mon, 28 Oct 2013 18:02:17 -0700 (PDT) In-Reply-To: <526F066C.2020001@freebsd.org> References: <526F066C.2020001@freebsd.org> Date: Mon, 28 Oct 2013 21:02:17 -0400 Message-ID: Subject: Re: Bhyve: acpi0: AcpiEnterSleepStatePrep failed - AE_NOT_FOUND From: Aryeh Friedman To: Peter Grehan Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.14 Cc: "freebsd-virtualization@freebsd.org" X-BeenThere: freebsd-virtualization@freebsd.org X-Mailman-Version: 2.1.14 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: Tue, 29 Oct 2013 01:02:19 -0000 On Mon, Oct 28, 2013 at 8:50 PM, Peter Grehan wrote: > Yes. bhyve doesn't advertise sleep/power states [...] When (if ever) is such support planned? It is needed to monitor the current state of the vm so that automated tools like PetiteCloud and FreeNAS can know when to issue any clean up commands they may need to run Also what are the current plans on suspend/resume? From owner-freebsd-virtualization@FreeBSD.ORG Tue Oct 29 22:15:24 2013 Return-Path: Delivered-To: freebsd-virtualization@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 06FEB88B; Tue, 29 Oct 2013 22:15:24 +0000 (UTC) (envelope-from grehan@freebsd.org) Received: from alto.onthenet.com.au (alto.OntheNet.com.au [203.13.68.12]) by mx1.freebsd.org (Postfix) with ESMTP id BAE872C61; Tue, 29 Oct 2013 22:15:23 +0000 (UTC) Received: from dommail.onthenet.com.au (dommail.OntheNet.com.au [203.13.70.57]) by alto.onthenet.com.au (Postfix) with ESMTPS id DEE27123FC; Wed, 30 Oct 2013 08:15:21 +1000 (EST) Received: from Peter-Grehans-MacBook-Pro-2.local ([64.245.0.210]) by dommail.onthenet.com.au (MOS 4.2.4-GA) with ESMTP id BPM36711 (AUTH peterg@ptree32.com.au); Wed, 30 Oct 2013 08:15:21 +1000 Message-ID: <52703376.6010608@freebsd.org> Date: Tue, 29 Oct 2013 15:15:18 -0700 From: Peter Grehan User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:24.0) Gecko/20100101 Thunderbird/24.0.1 MIME-Version: 1.0 To: Aryeh Friedman Subject: Re: Bhyve: acpi0: AcpiEnterSleepStatePrep failed - AE_NOT_FOUND References: <526F066C.2020001@freebsd.org> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: "freebsd-virtualization@freebsd.org" X-BeenThere: freebsd-virtualization@freebsd.org X-Mailman-Version: 2.1.14 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: Tue, 29 Oct 2013 22:15:24 -0000 Hi Aryeh, > Yes. bhyve doesn't advertise sleep/power states [...] > > > When (if ever) is such support planned? It is needed to monitor the > current state of the vm so that automated tools like PetiteCloud and > FreeNAS can know when to issue any clean up commands they may need to run Not sure what you're looking for here: something inside the guest that is told when the host is shutting down or suspending ? > Also what are the current plans on suspend/resume? Slowly getting to it. later, Peter. From owner-freebsd-virtualization@FreeBSD.ORG Tue Oct 29 22:23:33 2013 Return-Path: Delivered-To: freebsd-virtualization@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 42AD8C35 for ; Tue, 29 Oct 2013 22:23:33 +0000 (UTC) (envelope-from aryeh.friedman@gmail.com) Received: from mail-pa0-x233.google.com (mail-pa0-x233.google.com [IPv6:2607:f8b0:400e:c03::233]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 1A07E2CCD for ; Tue, 29 Oct 2013 22:23:33 +0000 (UTC) Received: by mail-pa0-f51.google.com with SMTP id ld10so15698pab.10 for ; Tue, 29 Oct 2013 15:23:32 -0700 (PDT) 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 :content-type; bh=qv5q+B/f839MNbp/vQ1oRma+NtWgRvH0Vr4c8ikARLc=; b=x/tj5zZac+v0V4yFXiNWMO/ATjFRtcmSrjhW31cRtz8uGTp+d/v9eeqlaGhOepUVfh V6u1vMRh4rnZy7KlBZ+KGiCH0xfPwRgjB8sH5wRvy2a5vBd5n1tFbRZ8ZXRBJjmVV5Si UxBdsROam7Z4FMyQl962iDd+nP8j5lOQJ0VoLWbbkLMrUvfRDFsP19AlA2InIjws+A4+ UuNBLYAbh7Px4SuYYbmg1l0Qd5SRu6aDRTff9McU4svzjL74pS99/S0NDj0XOoHD/7GQ lvtnaCTpx2KBcJyECKVWPYBCCy44z8GWYHfnTYQaiXvBc58R6tneCJUJbPcZEKa8vaPr TJxQ== MIME-Version: 1.0 X-Received: by 10.66.66.11 with SMTP id b11mr2747521pat.154.1383085412381; Tue, 29 Oct 2013 15:23:32 -0700 (PDT) Received: by 10.68.185.130 with HTTP; Tue, 29 Oct 2013 15:23:32 -0700 (PDT) In-Reply-To: References: <526F066C.2020001@freebsd.org> <52703376.6010608@freebsd.org> Date: Tue, 29 Oct 2013 18:23:32 -0400 Message-ID: Subject: Fwd: Bhyve: acpi0: AcpiEnterSleepStatePrep failed - AE_NOT_FOUND From: Aryeh Friedman To: "freebsd-virtualization@freebsd.org" Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.14 X-BeenThere: freebsd-virtualization@freebsd.org X-Mailman-Version: 2.1.14 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: Tue, 29 Oct 2013 22:23:33 -0000 ---------- Forwarded message ---------- From: Aryeh Friedman Date: Tue, Oct 29, 2013 at 6:23 PM Subject: Re: Bhyve: acpi0: AcpiEnterSleepStatePrep failed - AE_NOT_FOUND To: Peter Grehan On Tue, Oct 29, 2013 at 6:15 PM, Peter Grehan wrote: > Hi Aryeh, > > > Yes. bhyve doesn't advertise sleep/power states [...] >> >> >> When (if ever) is such support planned? It is needed to monitor the >> current state of the vm so that automated tools like PetiteCloud and >> FreeNAS can know when to issue any clean up commands they may need to run >> > > Not sure what you're looking for here: something inside the guest that is > told when the host is shutting down or suspending ? More like the ability of the host to tell the guest to reboot From owner-freebsd-virtualization@FreeBSD.ORG Tue Oct 29 22:31:01 2013 Return-Path: Delivered-To: freebsd-virtualization@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 23F2DF65 for ; Tue, 29 Oct 2013 22:31:01 +0000 (UTC) (envelope-from grehan@freebsd.org) Received: from alto.onthenet.com.au (alto.OntheNet.com.au [203.13.68.12]) by mx1.freebsd.org (Postfix) with ESMTP id D75B32D54 for ; Tue, 29 Oct 2013 22:31:00 +0000 (UTC) Received: from dommail.onthenet.com.au (dommail.OntheNet.com.au [203.13.70.57]) by alto.onthenet.com.au (Postfix) with ESMTPS id 50F12123FC; Wed, 30 Oct 2013 08:30:59 +1000 (EST) Received: from Peter-Grehans-MacBook-Pro-2.local ([64.245.0.210]) by dommail.onthenet.com.au (MOS 4.2.4-GA) with ESMTP id BPM37365 (AUTH peterg@ptree32.com.au); Wed, 30 Oct 2013 08:30:58 +1000 Message-ID: <5270371F.1050502@freebsd.org> Date: Tue, 29 Oct 2013 15:30:55 -0700 From: Peter Grehan User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:24.0) Gecko/20100101 Thunderbird/24.0.1 MIME-Version: 1.0 To: Aryeh Friedman , "freebsd-virtualization@freebsd.org" Subject: Re: Fwd: Bhyve: acpi0: AcpiEnterSleepStatePrep failed - AE_NOT_FOUND References: <526F066C.2020001@freebsd.org> <52703376.6010608@freebsd.org> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-virtualization@freebsd.org X-Mailman-Version: 2.1.14 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: Tue, 29 Oct 2013 22:31:01 -0000 >> Not sure what you're looking for here: something inside the guest that is >> told when the host is shutting down or suspending ? > > > More like the ability of the host to tell the guest to reboot Ah, yes: this has been requested by others. It would be done by implementing the ACPI event channel, and then allowing something like bhyvectl to send sleep/power-off events to bhyve which would then inject it into the guest via the event channel. later, Peter. From owner-freebsd-virtualization@FreeBSD.ORG Sat Nov 2 03:48:59 2013 Return-Path: Delivered-To: freebsd-virtualization@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id E8140C8E for ; Sat, 2 Nov 2013 03:48:59 +0000 (UTC) (envelope-from freebsd@grem.de) Received: from mail.grem.de (outcast.grem.de [213.239.217.27]) by mx1.freebsd.org (Postfix) with SMTP id 126602CCD for ; Sat, 2 Nov 2013 03:48:58 +0000 (UTC) Received: (qmail 26776 invoked by uid 89); 2 Nov 2013 03:48:57 -0000 Received: from unknown (HELO bsd64.grem.de) (mg@grem.de@88.217.181.6) by mail.grem.de with ESMTPA; 2 Nov 2013 03:48:57 -0000 Date: Sat, 2 Nov 2013 04:48:57 +0100 From: Michael Gmelin To: freebsd-virtualization@freebsd.org Subject: rc.d script for running bhyve in tmux Message-ID: <20131102044857.3d5a2c85@bsd64.grem.de> X-Mailer: Claws Mail 3.9.2 (GTK+ 2.24.18; amd64-portbld-freebsd9.1) Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="MP_/NuWMa/AbkZYBbIFVOW/+MvI" X-BeenThere: freebsd-virtualization@freebsd.org X-Mailman-Version: 2.1.14 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: Sat, 02 Nov 2013 03:49:00 -0000 --MP_/NuWMa/AbkZYBbIFVOW/+MvI Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi, I hacked together a small rc.d script for starting bhyve(4) in tmux, maybe it's useful to others too. Place it in /usr/local/etc/rc.d and install sysutils/tmux. Might need some love to fit your needs. Minimal configuration example: pkg install tmux echo "net.link.tap.up_on_open=1" >> /etc/sysctl.conf cat >> /boot/loader.conf << EOF if_tap_load="YES" if_bridge_load="YES" vmm_load="YES" EOF kldload tap; kldload bridge; kldload vmm cat >> /etc/rc.conf << EOF cloned_interfaces="tap0 bridge0" bhyve_enable="YES" bhyve_diskdev="/dev/zvol/tank/bhyve/virt" EOF ifconfig tap0 create ifconfig bridge0 create service bhyve start tmux list-sessions tmux attach -t bhyve service bhyve status service bhyve stop Multi profile configuration example: cat >> /etc/rc.conf << EOF cloned_interfaces="tap0 tap1 bridge0" bhyve_enable="YES" bhyve_profiles="virt1 virt2" bhyve_virt1_diskdev="/dev/zvol/tank/bhyve/virt1" bhyve_virt2_tapdev="tap1" bhyve_virt2_diskdev="/dev/zvol/tank/bhyve/virt2" bhyve_virt2_memsize="8192" bhyve_virt2_ncpu="4" EOF ifconfig tap0 create ifconfig tap1 create ifconfig bridge0 create service bhyve start # start all service bhyve start virt2 # start individual tmux attach -t bhyve_virt1 tmux attach -t bhyve_virt1 service bhyve stop virt2 # stop individual service bhyve stop # stop all (by default ctrl-b d detaches from tmux). Cheers, Michael -- Michael Gmelin --MP_/NuWMa/AbkZYBbIFVOW/+MvI Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename=bhyve #!/bin/sh # # $FreeBSD: mgmelin # # PROVIDE: bhyve # REQUIRE: LOGIN # KEYWORD: nojail # # # Add the following lines to /etc/rc.conf to enable bhyve: # bhyve_enable (bool): Set to "NO" by default. # Set it to "YES" to enable bhyve # bhyve_profiles (str): Set to "" by default. # Define your profiles here. # bhyve_tapdev (str): Set to "tap0" by default. # Set to the tap(4) device to use. # bhyve_diskdev (str): Must be set, no default. # Set to the disk device to use. # bhyve_ncpu (int): Set to 1 by default. # Set to the number of CPUs for the VM. # bhyve_memsize (int): Set to 512 by default. # Set to the number of MB of memory for the VM. . /etc/rc.subr name=3D"bhyve" rcvar=3Dbhyve_enable start_precmd=3D"bhyve_prestart" status_cmd=3D"bhyve_status" poll_cmd=3D"bhyve_poll" stop_cmd=3D"bhyve_stop" _session=3D$name command=3D"/usr/local/bin/tmux" procname=3D"-sh" [ -z "$bhyve_enable" ] && bhyve_enable=3D"NO" [ -z "$bhyve_tapdev" ] && bhyve_tapdev=3D"tap0" [ -z "$bhyve_diskdev" ] && bhyve_diskdev=3D"none" [ -z "$bhyve_ncpu" ] && bhyve_ncpu=3D"1" [ -z "$bhyve_memsize" ] && bhyve_memsize=3D"512" load_rc_config $name if [ -n "$2" ]; then profile=3D"$2" _session=3D"${_session}_${profile}" if [ "x${bhyve_profiles}" !=3D "x" ]; then eval bhyve_enable=3D"\${${_session}_enable:-${bhyve_enable}}" eval bhyve_tapdev=3D"\${${_session}_tapdev:-${bhyve_tapdev}}" eval bhyve_diskdev=3D"\${${_session}_diskdev:-${bhyve_diskdev}}" eval bhyve_ncpu=3D"\${${_session}_ncpu:-${bhyve_ncpu}}" eval bhyve_memsize=3D"\${${_session}_memsize:-${bhyve_memsize}}" else echo "$0: extra argument ignored" fi else if [ "x${bhyve_profiles}" !=3D "x" -a "x$1" !=3D "x" ]; then for profile in ${bhyve_profiles}; do eval _enable=3D"\${bhyve_${profile}_enable}" case "x${_enable:-${bhyve_enable}}" in x|x[Nn][Oo]|x[Nn][Oo][Nn][Ee]) continue ;; x[Yy][Ee][Ss]) ;; *) if test -z "$_enable"; then _var=3Dbhyve_enable else _var=3Dbhyve_"${profile}"_enable fi echo "Bad value" \ "'${_enable:-${bhyve_enable}}'" \ "for ${_var}. " \ "Profile ${profile} skipped." continue ;; esac echo "=3D=3D=3D> bhyve profile: ${profile}" /usr/local/etc/rc.d/bhyve $1 ${profile} retcode=3D"$?" if [ "0${retcode}" -ne 0 ]; then failed=3D"${profile} (${retcode}) ${failed:-}" else success=3D"${profile} ${success:-}" fi done exit 0 fi profile=3D$name fi pidfile=3D"/var/run/${_session}.pid" bhyve_prestart() { case ${bhyve_diskdev} in [Nn][Oo][Nn][Ee] | '') echo "No ${_session}_diskdev set. Quitting." 1>&2 return 1; ;; esac if [ ! -c "${bhyve_diskdev}" -a ! -f "${bhyve_diskdev}" ]; then echo "${bhyve_diskdev} doesn't exist or is not suitable as a diskdev" 1>&2 return 1; fi } bhyve_status() { if ${command} has-session -t ${_session} 2>/dev/null; then echo "${_session} is running." else echo "${_session} is not running." return 1 fi } bhyve_poll() { echo -n "Waiting for session: ${_session}" while ${command} has-session -t ${_session} 2>dev/null; do sleep 1 done echo } bhyve_stop() { if ${command} has-session -t ${_session} 2>/dev/null; then echo "Stopping ${_session}." ${command} kill-session -t ${_session} while ${command} has-session -t ${_session} 2>dev/null; do sleep 1 done fi rm -f ${pidfile} } command_args=3D"new-session -ds ${_session} \"sh -c 'echo \\\$PPID >${pidfi= le}; while true; do /usr/sbin/bhyvectl --vm=3D${_session} --destroy; /usr/s= bin/bhyveload -m ${bhyve_memsize} -d ${bhyve_diskdev} ${_session} && /usr/s= bin/bhyve -c ${bhyve_ncpu} -m ${bhyve_memsize} -AI -H -P -g 0 -s 0:0,hostbr= idge -s 1:0,virtio-net,${bhyve_tapdev} -s 2:0,virtio-blk,${bhyve_diskdev} -= S 31,uart,stdio ${_session} || break; done'\"" run_rc_command "$1" --MP_/NuWMa/AbkZYBbIFVOW/+MvI--