From owner-freebsd-virtualization@FreeBSD.ORG Sun Aug 17 19:44:59 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 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D9F0443A for ; Sun, 17 Aug 2014 19:44:59 +0000 (UTC) Received: from fallback1.mail.ru (fallback1.mail.ru [94.100.181.184]) by mx1.freebsd.org (Postfix) with ESMTP id 8A85727D1 for ; Sun, 17 Aug 2014 19:44:58 +0000 (UTC) Received: from f342.i.mail.ru (f342.i.mail.ru [217.69.140.238]) by fallback1.mail.ru (mPOP.Fallback_MX) with ESMTP id 866EE3EE7CFE for ; Sun, 17 Aug 2014 23:39:44 +0400 (MSK) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=inbox.ru; s=mail; h=Content-Type:Message-ID:Reply-To:Date:Mime-Version:Subject:To:From; bh=DZOYrlXnAFGbC9fA8VpzX92LuZYMxugri51zunpS5F8=; b=gychm+E0olF/mp4HgBjGVJnEH/NSYz58GJ1Km2SnrzmuGTIkCu/dVWIFZdiSAXpEP+RKIyA3vyY99BvkQedxCSRNaSe09HySDyZVhHy5RRvtcsNebTKhHiG82kJeIGewXWYaqjHj0EI2AupWurWTGsLk13o09FR7Uu54S/oJtSA=; Received: from [109.225.18.51] (ident=mail) by f342.i.mail.ru with local (envelope-from ) id 1XJ6Ih-0005tX-BQ for freebsd-virtualization@freebsd.org; Sun, 17 Aug 2014 23:39:35 +0400 Received: from [109.225.18.51] by e.mail.ru with HTTP; Sun, 17 Aug 2014 23:39:35 +0400 From: =?UTF-8?B?RGVuaXMgTWVuc2hpa292?= To: freebsd-virtualization@freebsd.org Subject: =?UTF-8?B?Vk5DIHNlcnZlciBvbiBiaHl2ZQ==?= Mime-Version: 1.0 X-Mailer: Mail.Ru Mailer 1.0 X-Originating-IP: [109.225.18.51] Date: Sun, 17 Aug 2014 23:39:35 +0400 Reply-To: =?UTF-8?B?RGVuaXMgTWVuc2hpa292?= X-Priority: 3 (Normal) Message-ID: <1408304375.152231185@f342.i.mail.ru> X-Cloud-Ids: X-Mras: Ok X-Spam: undefined Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: base64 X-Content-Filtered-By: Mailman/MimeDel 2.1.18-1 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: Sun, 17 Aug 2014 19:44:59 -0000 CkRvZXMgKG9yIHdpbGwgaW5jbHVkZSkgYmh5dmUgVk5DIHNlcnZlcj8gVGhhbmsgeW91LgoKLS0g CtChINGD0LLQsNC20LXQvdC40LXQvCBEZW5pcyBNZW5zaGlrb3Y= From owner-freebsd-virtualization@FreeBSD.ORG Sun Aug 17 19:49:15 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 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4CECB7C0 for ; Sun, 17 Aug 2014 19:49:15 +0000 (UTC) Received: from alto.onthenet.com.au (alto.OntheNet.com.au [203.13.68.12]) by mx1.freebsd.org (Postfix) with ESMTP id 0D18E2803 for ; Sun, 17 Aug 2014 19:49:14 +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 0B5F61269D; Mon, 18 Aug 2014 05:49:13 +1000 (EST) Received: from Peters-MacBook-Pro.local (c-69-181-164-196.hsd1.ca.comcast.net [69.181.164.196]) by dommail.onthenet.com.au (MOS 4.4.4-GA) with ESMTP id BXT61532 (AUTH peterg@ptree32.com.au); Mon, 18 Aug 2014 05:49:12 +1000 Message-ID: <53F10736.3040402@freebsd.org> Date: Sun, 17 Aug 2014 12:49:10 -0700 From: Peter Grehan User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 MIME-Version: 1.0 To: Denis Menshikov Subject: Re: VNC server on bhyve References: <1408304375.152231185@f342.i.mail.ru> In-Reply-To: <1408304375.152231185@f342.i.mail.ru> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit 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: Sun, 17 Aug 2014 19:49:15 -0000 Hi Denis, > Does (or will include) bhyve VNC server? For the console, currently not. It will hopefully be there at some point. later, Peter. From owner-freebsd-virtualization@FreeBSD.ORG Mon Aug 18 07:08:40 2014 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 ESMTPS id 5DB61ACC; Mon, 18 Aug 2014 07:08:40 +0000 (UTC) Received: from mail-vc0-x22a.google.com (mail-vc0-x22a.google.com [IPv6:2607:f8b0:400c:c03::22a]) (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 0FB7A339F; Mon, 18 Aug 2014 07:08:39 +0000 (UTC) Received: by mail-vc0-f170.google.com with SMTP id lf12so5408521vcb.1 for ; Mon, 18 Aug 2014 00:08:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=ynch0Z+d2ZLXJzECYHwLPbpV3BiPUG+pmdbS14vFGWY=; b=U7HrDKoGZyLuhefBZmGa6HkWwWsisF2mCfHObtc+XYdZ4A/bnZeTDdWBDPaaerae8N jkAr29FG5Gbaw97RIjqjt4hv1PAH+GcnLAv/8Uq06D64xmmzCZvJBS3AnUqRQaniCVBi U7P85FQGLVw438C+ZHjmmCs+Z76/b2wJxf/1LDt5/zreCKW2HaQ6AcuzRZJ3aqKKCfqy dO7JNe3rYVpItiYAyVDfqJVAQHCVgpeGsJPaWdHDl1ikLo+0ezTsUCMoSlZfPduI1CfT LChZ2U9mLZ1bP4busgdFdSCMyvF9Ro1lewRb6u5oCHFBJb25iGJgqTnRbyT94d5pSDng 8WDQ== MIME-Version: 1.0 X-Received: by 10.52.156.100 with SMTP id wd4mr3785997vdb.39.1408345719048; Mon, 18 Aug 2014 00:08:39 -0700 (PDT) Received: by 10.53.3.139 with HTTP; Mon, 18 Aug 2014 00:08:39 -0700 (PDT) Date: Mon, 18 Aug 2014 11:08:39 +0400 Message-ID: Subject: vt(4) performance on Hyper-V From: Pavel Timofeev To: freebsd-stable stable , "freebsd-virtualization@freebsd.org" Content-Type: text/plain; charset=UTF-8 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: Mon, 18 Aug 2014 07:08:40 -0000 Hi! Just in case, just so you know. I've tried FreeBSD 10-STABLE r270125 with vt(4) on Hyper-V (Win Server 2012 DataCenter). Its performance is extremely bad (while syscons is ok). Here is video http://www.youtube.com/watch?v=62CIKCJ7bog P.S. vt(4) is a bit faster on VirtualBox though when I tried it last time. From owner-freebsd-virtualization@FreeBSD.ORG Mon Aug 18 08:25:12 2014 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 ESMTPS id B7FF7ACF; Mon, 18 Aug 2014 08:25:12 +0000 (UTC) Received: from mail-lb0-x230.google.com (mail-lb0-x230.google.com [IPv6:2a00:1450:4010:c04::230]) (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 019C33A1D; Mon, 18 Aug 2014 08:25:11 +0000 (UTC) Received: by mail-lb0-f176.google.com with SMTP id u10so3896354lbd.35 for ; Mon, 18 Aug 2014 01:25:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=HW0AkLQBmqiBwNLOcz2clfM91+L5v1+XwcY0AG4mzHE=; b=j1qNzlMO4w0ESgsvpOZ0X01wgyPfQD6D78hOTM9uk3DG3ArjTRT+bMG/ZXUJ2Mp/jG 8UfegcF+r9doEZRpCxQ5zwKENPHlyxAdg16b3shfbWwaEsKpunEqAw5w4Oak/qedEzr6 tn2xcAOMM3N6qEqBFngfi5A8hu7/z4CFckxm/2GSUfVrd50KfoWnLoIcTtY5W6w9pkpd 6SYIz2APNXuKzeHIcFkNpHl3qYA8oQF5+JuChX+kSiWpvxjrH2MU8zgb/jTQ0uUT1jhm 4oLhRj7FgVTqyewZlEXPjzPKe7KPGjq9S8vTW7Xarf60WMT/lnojRvn4Ny9+f3vy6EzT 0EIw== MIME-Version: 1.0 X-Received: by 10.112.22.37 with SMTP id a5mr26565522lbf.76.1408350309334; Mon, 18 Aug 2014 01:25:09 -0700 (PDT) Sender: rizzo.unipi@gmail.com Received: by 10.114.244.2 with HTTP; Mon, 18 Aug 2014 01:25:09 -0700 (PDT) In-Reply-To: References: Date: Mon, 18 Aug 2014 10:25:09 +0200 X-Google-Sender-Auth: V-jquVYVGoDTc1gCa9zCQQhySzs Message-ID: Subject: Re: vt(4) performance on Hyper-V From: Luigi Rizzo To: Pavel Timofeev Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.18-1 Cc: freebsd-stable stable , "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: Mon, 18 Aug 2014 08:25:12 -0000 On Mon, Aug 18, 2014 at 9:08 AM, Pavel Timofeev wrote: > Hi! > Just in case, just so you know. > I've tried FreeBSD 10-STABLE r270125 with vt(4) on Hyper-V (Win Server > 2012 DataCenter). > Its performance is extremely bad (while syscons is ok). > Here is video http://www.youtube.com/watch?v=3D62CIKCJ7bog > > =E2=80=8Bi think you need to put the following in /boot/loader.conf =E2=80=8B =E2=80=8B =E2=80=8B hw.vga.textmode=3D1 =E2=80=8Botherwise it is very slow even on bare metal. cheers luigi=E2=80=8B > P.S. vt(4) is a bit faster on VirtualBox though when I tried it last time= . > _______________________________________________ > freebsd-stable@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-stable > To unsubscribe, send any mail to "freebsd-stable-unsubscribe@freebsd.org" > --=20 -----------------------------------------+------------------------------- Prof. Luigi RIZZO, rizzo@iet.unipi.it . Dip. di Ing. dell'Informazione http://www.iet.unipi.it/~luigi/ . Universita` di Pisa TEL +39-050-2211611 . via Diotisalvi 2 Mobile +39-338-6809875 . 56122 PISA (Italy) -----------------------------------------+------------------------------- From owner-freebsd-virtualization@FreeBSD.ORG Mon Aug 18 08:30:06 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 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D48B7D1F; Mon, 18 Aug 2014 08:30:06 +0000 (UTC) Received: from mail-vc0-x22f.google.com (mail-vc0-x22f.google.com [IPv6:2607:f8b0:400c:c03::22f]) (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 8027A3A58; Mon, 18 Aug 2014 08:30:06 +0000 (UTC) Received: by mail-vc0-f175.google.com with SMTP id ik5so5341678vcb.20 for ; Mon, 18 Aug 2014 01:30:05 -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=hJ1idKUR5hH/vj9jTbkOhdRp2lrepWX0mrPT+s+AY+U=; b=Jefh5mjayHMvGUaC5lBbj4y7v5I3jcKYnQgoKx4IEZtmfOCpVZqxhLfnuNkZy/BwGp 0tEwvA5shXnMLOGR0J/dTLLUPtUkZUtnrTGsHO2iPBi8N7urI6NLE5H3VXXUifCn5MhF WXgPOjAXhzK3RgeDCUp4vNc6oJPGTAMNvfMohlRLtltwTl00TX2UfX++5gSM9tsNfFDB k4B/kJ+vJJZiDnnzchzVkKqBXhzVK6XXuzyqGWMffV8pw+ZRcuPz6FsorrXsh/EIuI0s yUbv+PcUyJyP0D/sOFqmn8BOb824lTSVIH/1pfClkmMphbpNTO9mns+9b5J7ODrjSJtr BmnA== MIME-Version: 1.0 X-Received: by 10.52.146.194 with SMTP id te2mr21158096vdb.4.1408350605363; Mon, 18 Aug 2014 01:30:05 -0700 (PDT) Received: by 10.53.3.139 with HTTP; Mon, 18 Aug 2014 01:30:05 -0700 (PDT) In-Reply-To: References: Date: Mon, 18 Aug 2014 12:30:05 +0400 Message-ID: Subject: Re: vt(4) performance on Hyper-V From: Pavel Timofeev To: Luigi Rizzo Content-Type: text/plain; charset=UTF-8 Cc: freebsd-stable stable , "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: Mon, 18 Aug 2014 08:30:06 -0000 Wow, thank you! It helped. Sorry for the noise, it's even written in man vt. 2014-08-18 12:25 GMT+04:00 Luigi Rizzo : > > > > On Mon, Aug 18, 2014 at 9:08 AM, Pavel Timofeev wrote: >> >> Hi! >> Just in case, just so you know. >> I've tried FreeBSD 10-STABLE r270125 with vt(4) on Hyper-V (Win Server >> 2012 DataCenter). >> Its performance is extremely bad (while syscons is ok). >> Here is video http://www.youtube.com/watch?v=62CIKCJ7bog >> > > i think you need to put the following in /boot/loader.conf > > hw.vga.textmode=1 > > otherwise it is very slow even on bare metal. > > cheers > luigi > > >> >> P.S. vt(4) is a bit faster on VirtualBox though when I tried it last time. >> _______________________________________________ >> freebsd-stable@freebsd.org mailing list >> http://lists.freebsd.org/mailman/listinfo/freebsd-stable >> To unsubscribe, send any mail to "freebsd-stable-unsubscribe@freebsd.org" > > > > > -- > -----------------------------------------+------------------------------- > Prof. Luigi RIZZO, rizzo@iet.unipi.it . Dip. di Ing. dell'Informazione > http://www.iet.unipi.it/~luigi/ . Universita` di Pisa > TEL +39-050-2211611 . via Diotisalvi 2 > Mobile +39-338-6809875 . 56122 PISA (Italy) > -----------------------------------------+------------------------------- From owner-freebsd-virtualization@FreeBSD.ORG Tue Aug 19 00:14:21 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 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 88DA7FAB; Tue, 19 Aug 2014 00:14:21 +0000 (UTC) Received: from mail-lb0-x22c.google.com (mail-lb0-x22c.google.com [IPv6:2a00:1450:4010:c04::22c]) (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 DD1C63780; Tue, 19 Aug 2014 00:14:20 +0000 (UTC) Received: by mail-lb0-f172.google.com with SMTP id z11so4858120lbi.17 for ; Mon, 18 Aug 2014 17:14:18 -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:cc:content-type; bh=JL9Ris/r63UX47GaPMtcO0YCAa7z6L02sKkQvA/3nso=; b=zjw5l+5qvZET82DEuaq4Ph1EApy4p3CXQMEr6AgSOUbTj6lmnRDCzhRzP79n8tWgnu D0LyfPwydXUjlt4IcfH4chmuXgzFKAT+qL7pt+l/tWyWBN+r5EUoh9tngZQYrjp7BTnX Pnw4dsVWKyPzvssaUyaATOsaSirh5rs7FDCI/u+AMojmzZIrUkdFHMcqFMgfJ2Abx2k6 J7O7XKp/iCvECUi64JKW3WE0RrSaJpJGKATt/8gZ2/s9bMpqYv/Lm5cjp5qemveTEit0 YhZNMCKcn9HQRob7llMSA45EMQgV6EelsQnHuEq6qpq4QoYXY8fyCb3Z0h6+3n5zzEjv WNjA== MIME-Version: 1.0 X-Received: by 10.112.84.75 with SMTP id w11mr31062082lby.24.1408407258581; Mon, 18 Aug 2014 17:14:18 -0700 (PDT) Sender: crodr001@gmail.com Received: by 10.112.197.107 with HTTP; Mon, 18 Aug 2014 17:14:18 -0700 (PDT) Date: Mon, 18 Aug 2014 17:14:18 -0700 X-Google-Sender-Auth: 2BP8lJBInNpge5v_3KDvtG28GbM Message-ID: Subject: libvirt and rebooting of a bhyve VM From: Craig Rodrigues To: Roman Bogorodskiy Content-Type: text/plain; charset=ISO-8859-1 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: Tue, 19 Aug 2014 00:14:21 -0000 Roman, I am using libvirt and bhyve according to this XML: http://libvirt.org/drvbhyve.html and it works great. I gave a presentation at BAFUG on this: http://www.slideshare.net/CraigRodrigues1/libvirt-bhyve I have one question. If I reboot the bhyve VM started with libvirt with "shutdown -r now", the VM shuts down, but it does not restart. How can I get the machine to reboot with "shutdown -r now" when started with libvirt? Thanks -- Craig From owner-freebsd-virtualization@FreeBSD.ORG Tue Aug 19 03:59:29 2014 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 ESMTPS id 8FECFC37 for ; Tue, 19 Aug 2014 03:59:29 +0000 (UTC) Received: from mail-qg0-x233.google.com (mail-qg0-x233.google.com [IPv6:2607:f8b0:400d:c04::233]) (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 5142339AE for ; Tue, 19 Aug 2014 03:59:29 +0000 (UTC) Received: by mail-qg0-f51.google.com with SMTP id a108so5408134qge.38 for ; Mon, 18 Aug 2014 20:59:28 -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=K2k4Yf0yyvui1k2/v6eWN/GvqL4A25s43WUd1BAhhhM=; b=TB+BIh2bO5yyhsFvZXKVdipW+yj4stMKXyQ3sL86CXpv7kaIUXbL7dhhLlwtZr3yfS lta177ZDIp69quYwwWHW4HyEzImh+7lNry0H3/jHIOOaT7DqEO3sGph1ZfnjSqxwKRO8 hjF01n3nWsISb4vgXV3mWj3BaccPsFHt1yfRociXpf1Z6lvmLH2jiXR9q2mAvK/OSfEr Z2ni7LgwMdWfXohltbDfWf6BAN+Y31au/4x4BFZIj94TJXWp81N29wa8VM8T8pyhL46t ge6pxeNLaVcfYwd/SBOBjF2d9mrBTRaQrK/uIkUke0SX0YRaSOsE0I7A9nnrgW88/uBz R09w== MIME-Version: 1.0 X-Received: by 10.224.104.1 with SMTP id m1mr64079311qao.81.1408420768344; Mon, 18 Aug 2014 20:59:28 -0700 (PDT) Received: by 10.140.84.80 with HTTP; Mon, 18 Aug 2014 20:59:28 -0700 (PDT) In-Reply-To: <20140816193345.GC5519@mail.demonism.de> References: <20140812092407.GC11403@mail.demonism.de> <20140816193345.GC5519@mail.demonism.de> Date: Mon, 18 Aug 2014 20:59:28 -0700 Message-ID: Subject: Re: Problem with vmexit on mtrap From: Neel Natu To: Martin Steegmanns 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: Tue, 19 Aug 2014 03:59:29 -0000 Hi Martin, On Sat, Aug 16, 2014 at 12:33 PM, Martin Steegmanns wrote: > On Tue, Aug 12, 2014 at 06:39:18PM -0700, Neel Natu wrote: >> The VM-exit instruction length field is valid only for a subset of VM >> exits. See section 27.2.4 "Information for VM exits due to instruction >> execution" in the Intel SDM. >> >> In particular, the instruction length is not guaranteed to be valid if >> the VM-exit is due to a hardware exception. Therefore it cannot be >> used to "skip over" the UD2 instruction. >> >> On my machine the VM-exit instruction length field was set to '2' for >> the first UD2 and '5' for the second UD2. > > OK, thx for the clarification. > >> For this specific test, you can either hardcode the instruction length >> to '2' if the VM exit is due to a UD2 or use an instruction like "OUT" >> to a specific I/O port to trigger the monitor-trap-flag on and off. A >> VM-exit due to "OUT" will have the correct value in the VM-exit >> instruction length field. > > But this "instruction length" issue only affects my way to toggle > the MTF bit. The MTF itself does not rely internally on the > "instruction length" field, or does it? > As far as I understand, bhyve does not need a valid instruction length > for MTF, because the handler returns VMEXIT_RESTART. No need for bhyve > to adjust the rip on vmentry. > > If I set the MTF bit via bhyvectl, the guest system still > seems to enter a loop. > My mtrap handler writes the RIP to a file, but all I see are high > addresses e.g: > > 0xffffffff806bf0b0 Xapic_isr1 > > According to kdb, these are addresses point to Xapic_isr1 and > interrupt handlers. > > I wonder if a vmexit caused by the MTF could overlay with another > vmexit. With the MTF bit set, I expect the guest system to > behave exactly as without the MTF bit. Of course slower due to > single stepping :). > On my Xeon E5-2650 running at 2.0GHz a single vcpu VM is still not at the login prompt after 7+ hours with MTRAP enabled. However, it is making forward progress and is chugging through the /etc/rc startup scripts very slowly. best Neel > Regards, > Martin From owner-freebsd-virtualization@FreeBSD.ORG Tue Aug 19 09:06:50 2014 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 ESMTPS id 894535CE for ; Tue, 19 Aug 2014 09:06:50 +0000 (UTC) Received: from srv1.unix-users.de (srv1.unix-users.de [81.20.131.154]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "smtp.unix-users.de", Issuer "StartCom Class 1 Primary Intermediate Server CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 18D223378 for ; Tue, 19 Aug 2014 09:06:49 +0000 (UTC) Received: from localhost (bchm-d9bb93a2.pool.mediaWays.net [217.187.147.162]) (authenticated bits=0) by srv1.unix-users.de (8.14.9/8.14.5) with ESMTP id s7J96dkR056713 (version=TLSv1/SSLv3 cipher=AES128-GCM-SHA256 bits=128 verify=NO); Tue, 19 Aug 2014 11:06:39 +0200 (CEST) (envelope-from martin@steegmanns.net) X-Authentication-Warning: srv1.unix-users.de: Host bchm-d9bb93a2.pool.mediaWays.net [217.187.147.162] claimed to be localhost Date: Tue, 19 Aug 2014 11:06:38 +0200 From: Martin Steegmanns To: Neel Natu Subject: Re: Problem with vmexit on mtrap Message-ID: <20140819090638.GD5519@mail.demonism.de> References: <20140812092407.GC11403@mail.demonism.de> <20140816193345.GC5519@mail.demonism.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.4.3 (srv1.unix-users.de [81.20.131.154]); Tue, 19 Aug 2014 11:06:39 +0200 (CEST) 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: Tue, 19 Aug 2014 09:06:50 -0000 On Mon, Aug 18, 2014 at 08:59:28PM -0700, Neel Natu wrote: > > I wonder if a vmexit caused by the MTF could overlay with another > > vmexit. With the MTF bit set, I expect the guest system to > > behave exactly as without the MTF bit. Of course slower due to > > single stepping :). > > On my Xeon E5-2650 running at 2.0GHz a single vcpu VM is still not at > the login prompt after 7+ hours with MTRAP enabled. > > However, it is making forward progress and is chugging through the > /etc/rc startup scripts very slowly. Thank you! I assumed malfunction because I did no expect it to be that slow. Regards, Martin From owner-freebsd-virtualization@FreeBSD.ORG Tue Aug 19 15:41:49 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 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B936C6F7; Tue, 19 Aug 2014 15:41:49 +0000 (UTC) Received: from mail-lb0-x22f.google.com (mail-lb0-x22f.google.com [IPv6:2a00:1450:4010:c04::22f]) (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 0760A3D23; Tue, 19 Aug 2014 15:41:48 +0000 (UTC) Received: by mail-lb0-f175.google.com with SMTP id 10so5735091lbg.34 for ; Tue, 19 Aug 2014 08:41:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=aT+8qCElsVfIWR8HHuOZRRZXiknK7Qyvs4Eu6GyVLus=; b=XsQf3OW2PvDg5d9CDWJUhTEuG2eoHK9tZuzoLPfxv0oQfutUmJ3rwiRIBS84xzQ//0 Ppz80RlX78gwND4ncZr12r23NjEzZE+Q21YfB6aPe7MJv6+SZan2meQn3RGIJENUbdpk WtJ/eg7EF9tXaT8GHAryaFTmgR410+v0g3dn9YhzAclGQZLjEv4mdQ8MMKYuvw1bNKJm yhOERAGMmL4Base377GhVcCvx3HzuksIhYwT4h1603Q8vWDNPVrKjwfoeZJ/ALYqR7en IzqhgkcC2KwOY3rJ42gqy+nxaKw/EM0i+8/DCM+kLjGizk6pbnq5Bx34IL0H8avB1U5f sVSQ== X-Received: by 10.152.18.166 with SMTP id x6mr10235830lad.1.1408462906811; Tue, 19 Aug 2014 08:41:46 -0700 (PDT) Received: from kloomba ([77.94.197.103]) by mx.google.com with ESMTPSA id je8sm16920331lbc.34.2014.08.19.08.41.45 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 19 Aug 2014 08:41:46 -0700 (PDT) Sender: Roman Bogorodskiy Date: Tue, 19 Aug 2014 19:40:36 +0400 From: Roman Bogorodskiy To: Craig Rodrigues Subject: Re: libvirt and rebooting of a bhyve VM Message-ID: <20140819154035.GA62903@kloomba> References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="2oS5YaxWCcQjTEyO" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) 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: Tue, 19 Aug 2014 15:41:49 -0000 --2oS5YaxWCcQjTEyO Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Craig Rodrigues wrote: > Roman, >=20 > I am using libvirt and bhyve according to this XML: > http://libvirt.org/drvbhyve.html > and it works great. > I gave a presentation at BAFUG on this: > http://www.slideshare.net/CraigRodrigues1/libvirt-bhyve >=20 > I have one question. If I reboot the bhyve VM started with libvirt > with "shutdown -r now", > the VM shuts down, but it does not restart. >=20 > How can I get the machine to reboot with "shutdown -r now" when > started with libvirt? Hi Craig, Unfortunately, I'm not sure how to get the reboot working. Moreover, I get the same behaviour when starting bhyve manually -- when I do a reboot, bhyve(8) exits as soon as the system is ready to restart. So looks like that's a default bhyve behaviour or I'm missing something? Roman Bogorodskiy --2oS5YaxWCcQjTEyO Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.13 (FreeBSD) iQEcBAEBAgAGBQJT82/zAAoJEMltX/4IwiJqTLEIAL1KRkkrRgEw9NrqrGccJSHN t5gRsUiVBs8k9djfGwkvL2vpS35B3ZyyIY0aE7yLecsGsYiBeBmqJZPYVSyV1Ee/ aZYJykgG2LOP5ruqfCojtj5UcvVLt/a9P9Igxjl3uERdRsQ/s+Xr4T/xPPm+GyyW wdrzX0JRkcgzUYWD3jcIOrUY2OGeFaMno0/n3H+WLhaNv20jvRTmYdbeurQWjbXL 4uEQTLp268r8utCW4ZQxVAhlCQjd8bWBDfhStBw3SBOasqFv9Lv3KWpPnyVAff2F lCjnSjS2wnxkloK9hpxiTR1Itm70y/6ilJt37pJkFk3m4+dleeXqL4Nrhni0CYY= =xzEi -----END PGP SIGNATURE----- --2oS5YaxWCcQjTEyO-- From owner-freebsd-virtualization@FreeBSD.ORG Tue Aug 19 15:44:39 2014 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 ESMTPS id B89648DD for ; Tue, 19 Aug 2014 15:44:39 +0000 (UTC) Received: from mx1.scaleengine.net (beauharnois2.bhs1.scaleengine.net [142.4.218.15]) by mx1.freebsd.org (Postfix) with ESMTP id 90B463D4D for ; Tue, 19 Aug 2014 15:44:39 +0000 (UTC) Received: from [192.168.1.2] (senat1-01.HML3.ScaleEngine.net [209.51.186.5]) (Authenticated sender: allanjude.freebsd@scaleengine.com) by mx1.scaleengine.net (Postfix) with ESMTPSA id 2119E3A7E1 for ; Tue, 19 Aug 2014 15:44:38 +0000 (UTC) Message-ID: <53F370F6.1020006@freebsd.org> Date: Tue, 19 Aug 2014 11:44:54 -0400 From: Allan Jude User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 MIME-Version: 1.0 To: freebsd-virtualization@freebsd.org Subject: Re: libvirt and rebooting of a bhyve VM References: <20140819154035.GA62903@kloomba> In-Reply-To: <20140819154035.GA62903@kloomba> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="gMbHv5rswJqMgPWjiH3AJ0Anw96Eo7LT7" 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: Tue, 19 Aug 2014 15:44:39 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --gMbHv5rswJqMgPWjiH3AJ0Anw96Eo7LT7 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On 2014-08-19 11:40, Roman Bogorodskiy wrote: > Craig Rodrigues wrote: >=20 >> Roman, >> >> I am using libvirt and bhyve according to this XML: >> http://libvirt.org/drvbhyve.html >> and it works great. >> I gave a presentation at BAFUG on this: >> http://www.slideshare.net/CraigRodrigues1/libvirt-bhyve >> >> I have one question. If I reboot the bhyve VM started with libvirt >> with "shutdown -r now", >> the VM shuts down, but it does not restart. >> >> How can I get the machine to reboot with "shutdown -r now" when >> started with libvirt? >=20 > Hi Craig, >=20 > Unfortunately, I'm not sure how to get the reboot working. Moreover, I > get the same behaviour when starting bhyve manually -- when I do a > reboot, bhyve(8) exits as soon as the system is ready to restart. >=20 > So looks like that's a default bhyve behaviour or I'm missing something= ? >=20 > Roman Bogorodskiy >=20 Which version are you running? 10-RELEASE, 10-STABLE or -CURRENT? --=20 Allan Jude --gMbHv5rswJqMgPWjiH3AJ0Anw96Eo7LT7 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (MingW32) iQIcBAEBAgAGBQJT83D+AAoJEJrBFpNRJZKf3ecQAItFiAYlmoX/pu18p/R7c2dX Uo0EcRS8itSP83gZ6KTiFgx8QbcL9lg58AhroAw7dVUjK07aojWFyFCzhSgVxphZ 3tXueFQzsJNZpQOkR70J/mXfK7TuTZTV2M9OQDdtprwsIN6rinxD1SNH2gNaTTsk zCmLcI2Mof6Xz30AXIZ/EIp+cXBpYhIyDJO3BLpZmgEMzyPsB3ofa0szs21c1ReO DgmGGGGm6dUptvKz5pMmZ3BNRftrPWII52eINYOXueOBc6DBHdhWVieSWVtitAwr xV2pm2nA5dslW0ZtBpBCUgnTmYT+KomYM4v70T+QWqzlVxt4Vcq9DKDxBu38aGf5 V4OXnP92VpjgYGUTElpuLVc4iApydAz3j/TSeX+S14J+/E7cCeu02zItJYFhKINh aqE7oHYGIhPBRm7m08hwmkKfF2AipA2Jh+0QZsnCKWdpN2/Rd1RHx1+9cLCHSolh LvRwRoDW+s7tAQSq/JwLROG48ghvXcxDem1ueHI9drP3+7D2/bT/21nOVD1v30Zb S+n/HFO05WwKFscaDRmh6reZxQuMvI4he+kgLOnj4QmvcyOVzh1XJT7SC3a8v/RE 1Ka3RlZqaB9rq7vBBS6e0GU502z8I0FC7NyhY+Kti84ZHy4wlcfsQoAMBYctfWZf T6kqoWgQu1e/xIXNUnj0 =YaJd -----END PGP SIGNATURE----- --gMbHv5rswJqMgPWjiH3AJ0Anw96Eo7LT7-- From owner-freebsd-virtualization@FreeBSD.ORG Tue Aug 19 15:47:07 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 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5259FC01; Tue, 19 Aug 2014 15:47:07 +0000 (UTC) Received: from mail-la0-x22c.google.com (mail-la0-x22c.google.com [IPv6:2a00:1450:4010:c03::22c]) (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 9E08C3D7A; Tue, 19 Aug 2014 15:47:06 +0000 (UTC) Received: by mail-la0-f44.google.com with SMTP id el20so6090914lab.31 for ; Tue, 19 Aug 2014 08:47:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=TJKb751w89NQzeI18MztranFgAzR5SlDgvghJSoedug=; b=NfpYihx8vRm5GOatXmCbcXkq/5bP26aScAbZXlwOp6oPuO/CW2gI2+/Ag4voW2MS4x 5aQHPBYwXtNXYagy+iIWiIqAEi9I0bgCi0ZAWG7SrbRkfX/kYZM3QumOvWsd1Dko6W0z azyvuVgEQ+vwVSu4g/Z3J+O3c7FfzHpSvYukSbCK6l7cfpr7FCaC8yuJgq7EhfAj9kdp RSnXt8eT8THV/wThWTW3gVe5oM1BwmPa1rCfklEfRput3YHPwQ7+QnJaB9nziozdJFMx ZCxNoP8J+sc0B4iOCkhN93EwqsV0EJNLDtimWsk3b8d6TJfdeSaUgcN9lIYxHaf3W1SU a0HQ== X-Received: by 10.152.87.97 with SMTP id w1mr10597089laz.92.1408463224550; Tue, 19 Aug 2014 08:47:04 -0700 (PDT) Received: from kloomba ([77.94.197.103]) by mx.google.com with ESMTPSA id a5sm32649625lbp.14.2014.08.19.08.47.03 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 19 Aug 2014 08:47:03 -0700 (PDT) Sender: Roman Bogorodskiy Date: Tue, 19 Aug 2014 19:45:57 +0400 From: Roman Bogorodskiy To: Allan Jude Subject: Re: libvirt and rebooting of a bhyve VM Message-ID: <20140819154556.GB62903@kloomba> References: <20140819154035.GA62903@kloomba> <53F370F6.1020006@freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="LpQ9ahxlCli8rRTG" Content-Disposition: inline In-Reply-To: <53F370F6.1020006@freebsd.org> User-Agent: Mutt/1.5.23 (2014-03-12) 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: Tue, 19 Aug 2014 15:47:07 -0000 --LpQ9ahxlCli8rRTG Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Allan Jude wrote: > On 2014-08-19 11:40, Roman Bogorodskiy wrote: > > Craig Rodrigues wrote: > >=20 > >> Roman, > >> > >> I am using libvirt and bhyve according to this XML: > >> http://libvirt.org/drvbhyve.html > >> and it works great. > >> I gave a presentation at BAFUG on this: > >> http://www.slideshare.net/CraigRodrigues1/libvirt-bhyve > >> > >> I have one question. If I reboot the bhyve VM started with libvirt > >> with "shutdown -r now", > >> the VM shuts down, but it does not restart. > >> > >> How can I get the machine to reboot with "shutdown -r now" when > >> started with libvirt? > >=20 > > Hi Craig, > >=20 > > Unfortunately, I'm not sure how to get the reboot working. Moreover, I > > get the same behaviour when starting bhyve manually -- when I do a > > reboot, bhyve(8) exits as soon as the system is ready to restart. > >=20 > > So looks like that's a default bhyve behaviour or I'm missing something? > >=20 > > Roman Bogorodskiy > >=20 >=20 > Which version are you running? 10-RELEASE, 10-STABLE or -CURRENT? 10-STABLE. Roman Bogorodskiy --LpQ9ahxlCli8rRTG Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.13 (FreeBSD) iQEcBAEBAgAGBQJT83E0AAoJEMltX/4IwiJqdnQIAKq4fF6ovJyZbSHjuhMRd0wl iU/DsMZlx79A4LLpow9qRncbb1G5GTO+2lPW0tHqFHwr0JImalAlv6xPVTjU9UTE Veqlm8oI5RFoF5eGOfnO1+cnQXVf0+7mKOws/s/6X1N4dcfvdrlNYbKLl+aB0vvr 8eNOrLoFG6fbTRCfztjcM6SASxv76v5fAZ8hTVFexAQCZwaWU8YnnCJG9ye0YWt5 cYglzutQW1yxrvnMGgZ33i5KeQNSvAHyn/9jqGapghAQZ5VcpdqMWBgssIl55UT+ U4Qp8udMl4e2wqSpTp5W0FyKk9SiYnDx/7VpD6zPiFc6TGAnzWmN0SxDmMIa2Oc= =q9oM -----END PGP SIGNATURE----- --LpQ9ahxlCli8rRTG-- From owner-freebsd-virtualization@FreeBSD.ORG Tue Aug 19 15:50:46 2014 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 ESMTPS id C6A77F3B; Tue, 19 Aug 2014 15:50:46 +0000 (UTC) Received: from mail-lb0-x22a.google.com (mail-lb0-x22a.google.com [IPv6:2a00:1450:4010:c04::22a]) (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 254693E72; Tue, 19 Aug 2014 15:50:45 +0000 (UTC) Received: by mail-lb0-f170.google.com with SMTP id l4so5714801lbv.15 for ; Tue, 19 Aug 2014 08:50:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=zph3Aj0r3TQB1lG8T08fPMndiICwRcmRolJpYWIAaiU=; b=Geme4Yu++AFu6JpMTjAedGJ4K5GKp1BCeHYM4NbRFloLftnUO8YdfuF5Bh7bA2T8LY DdYwZWRFJ4Wo3OPlXGoyEXNtkXyC1owCnVzZtQDpoW+z7EvAd4y6bXVe8H4cOBc91pil QenYX8iV61imChjsqqIyhnEOGVjKrw+ji/690dB3niaBQ3D3psPeruQMt+8cyDI2D1Pi hzG1qtAJluq9r7qCFGsO9dqkm2/C4mPDESzG6CSIZQs180e6462P0yjJPvEZmarZpcM5 dczk/W5UNZ2cENucklBpCKCvva2i7YWu+4AYwhtLG1AHO2pxcdiG93+4vOG5rJlOkNYn R1ug== MIME-Version: 1.0 X-Received: by 10.152.115.171 with SMTP id jp11mr6614lab.90.1408463443946; Tue, 19 Aug 2014 08:50:43 -0700 (PDT) Sender: crodr001@gmail.com Received: by 10.112.197.107 with HTTP; Tue, 19 Aug 2014 08:50:43 -0700 (PDT) In-Reply-To: <20140819154035.GA62903@kloomba> References: <20140819154035.GA62903@kloomba> Date: Tue, 19 Aug 2014 08:50:43 -0700 X-Google-Sender-Auth: dfKXo_-149mR0RHXsbBPBZgtpII Message-ID: Subject: Re: libvirt and rebooting of a bhyve VM From: Craig Rodrigues To: Roman Bogorodskiy Content-Type: text/plain; charset=ISO-8859-1 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: Tue, 19 Aug 2014 15:50:46 -0000 On Tue, Aug 19, 2014 at 8:40 AM, Roman Bogorodskiy wrote: > Hi Craig, > > Unfortunately, I'm not sure how to get the reboot working. Moreover, I > get the same behaviour when starting bhyve manually -- when I do a > reboot, bhyve(8) exits as soon as the system is ready to restart. > > So looks like that's a default bhyve behaviour or I'm missing something? Well, if you look at /usr/share/examples/bhyve/vmrun.sh, you will see that byvectl --destroy --vm=xx ; bhyveload; bhyve is run in a loop. That loop only terminates of bhyve returns non-zero. I don't think that this is a very good API, but that's what we have for now. If there was some way to detect of the bhyve process exited due to ACPI shutdown or normal reboot, that would be helpful. That would help people writing scripts around bhyve. -- Craig From owner-freebsd-virtualization@FreeBSD.ORG Tue Aug 19 16:03:28 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 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 55D1536B; Tue, 19 Aug 2014 16:03:28 +0000 (UTC) Received: from webmail2.jnielsen.net (webmail2.jnielsen.net [50.114.224.20]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "webmail2.jnielsen.net", Issuer "freebsdsolutions.net" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 305B73FAA; Tue, 19 Aug 2014 16:03:27 +0000 (UTC) Received: from [10.10.1.198] (office.betterlinux.com [199.58.199.60]) (authenticated bits=0) by webmail2.jnielsen.net (8.14.9/8.14.9) with ESMTP id s7JFo3AW031670 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO); Tue, 19 Aug 2014 09:50:04 -0600 (MDT) (envelope-from lists@jnielsen.net) X-Authentication-Warning: webmail2.jnielsen.net: Host office.betterlinux.com [199.58.199.60] claimed to be [10.10.1.198] Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.6\)) Subject: Re: libvirt and rebooting of a bhyve VM From: John Nielsen In-Reply-To: <20140819154035.GA62903@kloomba> Date: Tue, 19 Aug 2014 09:50:03 -0600 Content-Transfer-Encoding: 7bit Message-Id: References: <20140819154035.GA62903@kloomba> To: Roman Bogorodskiy X-Mailer: Apple Mail (2.1878.6) X-Virus-Scanned: clamav-milter 0.98.4 at webmail2.jnielsen.net X-Virus-Status: Clean 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: Tue, 19 Aug 2014 16:03:28 -0000 On Aug 19, 2014, at 9:40 AM, Roman Bogorodskiy wrote: > Craig Rodrigues wrote: > >> Roman, >> >> I am using libvirt and bhyve according to this XML: >> http://libvirt.org/drvbhyve.html >> and it works great. >> I gave a presentation at BAFUG on this: >> http://www.slideshare.net/CraigRodrigues1/libvirt-bhyve >> >> I have one question. If I reboot the bhyve VM started with libvirt >> with "shutdown -r now", >> the VM shuts down, but it does not restart. >> >> How can I get the machine to reboot with "shutdown -r now" when >> started with libvirt? > > Hi Craig, > > Unfortunately, I'm not sure how to get the reboot working. Moreover, I > get the same behaviour when starting bhyve manually -- when I do a > reboot, bhyve(8) exits as soon as the system is ready to restart. > > So looks like that's a default bhyve behaviour or I'm missing something? Wasn't changing this the intention of r267216 (MFCed as r270071)? Roman, was your 10-STABLE built after that revision? JN From owner-freebsd-virtualization@FreeBSD.ORG Tue Aug 19 16:13:09 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 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E9A9674F; Tue, 19 Aug 2014 16:13:08 +0000 (UTC) Received: from mail-la0-x22d.google.com (mail-la0-x22d.google.com [IPv6:2a00:1450:4010:c03::22d]) (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 3EC3430DC; Tue, 19 Aug 2014 16:13:08 +0000 (UTC) Received: by mail-la0-f45.google.com with SMTP id ty20so6116134lab.32 for ; Tue, 19 Aug 2014 09:13:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=KPKtZtARCb9WvgrDP8vMfY13xNYtymSukoIDdBsxTLs=; b=NUDHFCtQM5wCEtYUoqJoA6nxcuiiEN2lAijHQe5E7/3XtyG6j+X1Nf94/7dAHeFBOQ kdJExSfrY6Y+YYn2ew7p0fU1Ox5kyzivF8kXOtYKV8ZToaSiwaJstYyjhiGZgLNP0DnN HdCCmgrEyi0abWFEfaAXPgbr74Yrj7J7jN6E2aPwrdPyXQ8D55KUxHeISOjwWVATe03Z I3oytxjHalK1U8oR8FI5K+Uss2dv2UJIMKD05s8Qc2FTr6B0yuDou+cPE3y78NXOBLoo /9kcel9zLekx75kWEweOfrX2vHizgCD8Dr5ul+1D8Qeag6QDgGC7CNixVZhfMo/Mv+oF h7iw== X-Received: by 10.112.34.78 with SMTP id x14mr35612340lbi.38.1408464785475; Tue, 19 Aug 2014 09:13:05 -0700 (PDT) Received: from kloomba ([77.94.197.103]) by mx.google.com with ESMTPSA id go8sm32746265lbc.8.2014.08.19.09.13.04 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 19 Aug 2014 09:13:04 -0700 (PDT) Sender: Roman Bogorodskiy Date: Tue, 19 Aug 2014 20:11:58 +0400 From: Roman Bogorodskiy To: John Nielsen Subject: Re: libvirt and rebooting of a bhyve VM Message-ID: <20140819161156.GC62903@kloomba> References: <20140819154035.GA62903@kloomba> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="DIOMP1UsTsWJauNi" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) 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: Tue, 19 Aug 2014 16:13:09 -0000 --DIOMP1UsTsWJauNi Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable John Nielsen wrote: > On Aug 19, 2014, at 9:40 AM, Roman Bogorodskiy wrote: >=20 > > Craig Rodrigues wrote: > >=20 > >> Roman, > >>=20 > >> I am using libvirt and bhyve according to this XML: > >> http://libvirt.org/drvbhyve.html > >> and it works great. > >> I gave a presentation at BAFUG on this: > >> http://www.slideshare.net/CraigRodrigues1/libvirt-bhyve > >>=20 > >> I have one question. If I reboot the bhyve VM started with libvirt > >> with "shutdown -r now", > >> the VM shuts down, but it does not restart. > >>=20 > >> How can I get the machine to reboot with "shutdown -r now" when > >> started with libvirt? > >=20 > > Hi Craig, > >=20 > > Unfortunately, I'm not sure how to get the reboot working. Moreover, I > > get the same behaviour when starting bhyve manually -- when I do a > > reboot, bhyve(8) exits as soon as the system is ready to restart. > >=20 > > So looks like that's a default bhyve behaviour or I'm missing something? >=20 > Wasn't changing this the intention of r267216 (MFCed as r270071)? >=20 > Roman, was your 10-STABLE built after that revision? Thanks for pointing at this commit. My -STABLE is older than that so I'll need to update. Anyway, if it works without restarting bhyve(8) then it should work in libvirt 'for free'. :) Roman Bogorodskiy --DIOMP1UsTsWJauNi Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.13 (FreeBSD) iQEcBAEBAgAGBQJT83dMAAoJEMltX/4IwiJqZbsH/3Cu4zucJJOtYFctCxGVPDTj WYbbcrdSLIOBhBD60UlgXP6HXTz46JEP6/7OQLKqFUJrO0eih8dJelD9WESzQc6w AJMYphk+lYhGQasUUL9YlKweU+onBcNltdDWQCLzkNdHTDAzQxmjZ2NFMVx/DbAs k/hQXyBKnPGJSBJUNmCoqXzQUpCIURMcSDQm3zovGSWBkusGFFDzuivxRTxBDHg0 h/ZVRh+lQfsYo+jfTI3j0Uq9dprk+w0UBIOgbMR9K+73SJUeBhPI/clHgrAeNVuH PjLurrLHxcJaD71CO1GjH4NE9GoqrtuFqmN0ixjFmG5yASluX34gZUKQYfSpOCU= =92tk -----END PGP SIGNATURE----- --DIOMP1UsTsWJauNi-- From owner-freebsd-virtualization@FreeBSD.ORG Tue Aug 19 16:25:00 2014 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 ESMTPS id E60B0AE4 for ; Tue, 19 Aug 2014 16:24:59 +0000 (UTC) Received: from mx1.scaleengine.net (beauharnois2.bhs1.scaleengine.net [142.4.218.15]) by mx1.freebsd.org (Postfix) with ESMTP id A4B733260 for ; Tue, 19 Aug 2014 16:24:59 +0000 (UTC) Received: from [192.168.1.2] (senat1-01.HML3.ScaleEngine.net [209.51.186.5]) (Authenticated sender: allanjude.freebsd@scaleengine.com) by mx1.scaleengine.net (Postfix) with ESMTPSA id 058E83A96B for ; Tue, 19 Aug 2014 16:24:58 +0000 (UTC) Message-ID: <53F37A6F.90405@freebsd.org> Date: Tue, 19 Aug 2014 12:25:19 -0400 From: Allan Jude User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 MIME-Version: 1.0 To: freebsd-virtualization@freebsd.org Subject: Re: libvirt and rebooting of a bhyve VM References: <20140819154035.GA62903@kloomba> In-Reply-To: Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="oBjVRgfdHvuDgla2dE7bwRScJdmMOddga" 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: Tue, 19 Aug 2014 16:25:00 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --oBjVRgfdHvuDgla2dE7bwRScJdmMOddga Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On 2014-08-19 11:50, John Nielsen wrote: > On Aug 19, 2014, at 9:40 AM, Roman Bogorodskiy wrot= e: >=20 >> Craig Rodrigues wrote: >> >>> Roman, >>> >>> I am using libvirt and bhyve according to this XML: >>> http://libvirt.org/drvbhyve.html >>> and it works great. >>> I gave a presentation at BAFUG on this: >>> http://www.slideshare.net/CraigRodrigues1/libvirt-bhyve >>> >>> I have one question. If I reboot the bhyve VM started with libvirt >>> with "shutdown -r now", >>> the VM shuts down, but it does not restart. >>> >>> How can I get the machine to reboot with "shutdown -r now" when >>> started with libvirt? >> >> Hi Craig, >> >> Unfortunately, I'm not sure how to get the reboot working. Moreover, I= >> get the same behaviour when starting bhyve manually -- when I do a >> reboot, bhyve(8) exits as soon as the system is ready to restart. >> >> So looks like that's a default bhyve behaviour or I'm missing somethin= g? >=20 > Wasn't changing this the intention of r267216 (MFCed as r270071)? >=20 > Roman, was your 10-STABLE built after that revision? >=20 > JN >=20 > _______________________________________________ > freebsd-virtualization@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-virtualization > To unsubscribe, send any mail to "freebsd-virtualization-unsubscribe@fr= eebsd.org" >=20 Yes, this revision adds the ability to 'reboot'. This does not exit bhyve at all, so there is no exit level You can 'reboot' a bhyve externally using: bhyvectl --force-reset --vm=3Dxxx or force a poweroff with: bhyvectl --force-reset --vm=3Dxxx SIGTERM simulates an ACPI shutdown the bhyvectl --destroy is to clean up, the instance remains even after a clean shutdown. In the past, it had to be destroyed and recreated to start the VM again, although now with reboot support, that may not be required. --=20 Allan Jude --oBjVRgfdHvuDgla2dE7bwRScJdmMOddga Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (MingW32) iQIcBAEBAgAGBQJT83pzAAoJEJrBFpNRJZKfLosP/R8GMgAqvxaSayXVFnkvhEvd 7b5+yVVzxQORBjScr1F3M3nsajFsQnyx0MPb18QPPWnRr1T5DaZ74m+kx0wizVuG HQ6fsJknrbXEykI4iF3ANzY8qHck8GSN/HBOGrrhwSdZkjo+cUvWEOqqd8e8070W CgxA5yke+u4HZA+ew49aNb+3TH0Ipc+8CRZu2yWge3cAav2WAMXICJJL+5Fy4Fk6 r708scg4EaZrdkiKBlTM1b/b4hd86ncgsOTYUd17qu2OW/MDNECpRT+NoizJUlSz URRnMLyphIhIga0vWvP3YXUa3R5uJuH8aGphcSzjm8xXHkBWDAuyR8fr//mVWZlW FgzSRH9J6C8AlgdMSlwBQ6VqId3i6bkPfGLLClQLZ8njzPotMjWDWlztD6rHrkD0 DxJvGv1OMoMk8XD7bz84en8fMIAu3H4onSpfQ2pmSAviB1HCLxX8LQnaLWpY9a3+ 2q/vMjBGQS0uk18mt5h5WnXv7C1Y3abLxYk+He1KjS890V0mDQHqLpACl7lvV3R5 kGBIlOao3+Wy7eQNEyF5KV2KDwujnqV7c4xhZsjmqExWzzR0KDKlQcJ2c8cPwOX9 9htnWTNu1ImR1U4046C/C+xKLrrxeQy72i/7//2cq1UYHbS638B3zaKlX9pyDIZG Il3j0k8TjLdcB7UQWkJa =FzmC -----END PGP SIGNATURE----- --oBjVRgfdHvuDgla2dE7bwRScJdmMOddga-- From owner-freebsd-virtualization@FreeBSD.ORG Tue Aug 19 16:32:37 2014 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 ESMTPS id 80AA5D0B; Tue, 19 Aug 2014 16:32:37 +0000 (UTC) Received: from mail-lb0-x235.google.com (mail-lb0-x235.google.com [IPv6:2a00:1450:4010:c04::235]) (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 D06E23390; Tue, 19 Aug 2014 16:32:36 +0000 (UTC) Received: by mail-lb0-f181.google.com with SMTP id 10so5586407lbg.26 for ; Tue, 19 Aug 2014 09:32:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=ABDiNtGTj8xUm9n2DeJHwaucojUYt6msPUjeFNfUuvk=; b=Mp/jAVS/JYdOTbEYa/E+U5cgAVwM1+OPrN78EsKfInvdZQsdXADv09rkOsd94+K2nR COkQZBDdFy/tUGOv2r7c3Qgjn+oaiJMEev6lxeSCEM5Imi4Xf88e3F3oxbNei1XdMXks frKfvNSFrIsntyT0PoXne1kWBVvYPJUtfV6Cyzcp/JyEFDRvBQoTSSsVsqLKGRH9M1Vp ObI5hvTfxl5CYa8wMwOHLhPjaHZMB2UZ6M9gigyXLYIB9eQFHnb8wiSK6ZFpYggcgpDe +jZLZccPYI5RTBT6VqyZgEB2ieIBZyr9dXnZnL3Lqx45ioHN/WJ/QHmO+d2tCOSCdbqn E4XQ== MIME-Version: 1.0 X-Received: by 10.112.114.202 with SMTP id ji10mr10308338lbb.92.1408465954739; Tue, 19 Aug 2014 09:32:34 -0700 (PDT) Sender: crodr001@gmail.com Received: by 10.112.197.107 with HTTP; Tue, 19 Aug 2014 09:32:34 -0700 (PDT) In-Reply-To: <53F37A6F.90405@freebsd.org> References: <20140819154035.GA62903@kloomba> <53F37A6F.90405@freebsd.org> Date: Tue, 19 Aug 2014 09:32:34 -0700 X-Google-Sender-Auth: eEAJ3SnLFZqz54Zj_kfgvzGPOH8 Message-ID: Subject: Re: libvirt and rebooting of a bhyve VM From: Craig Rodrigues To: Allan Jude Content-Type: text/plain; charset=ISO-8859-1 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: Tue, 19 Aug 2014 16:32:37 -0000 On Tue, Aug 19, 2014 at 9:25 AM, Allan Jude wrote: > > Yes, this revision adds the ability to 'reboot'. This does not exit > bhyve at all, so there is no exit level > > You can 'reboot' a bhyve externally using: > bhyvectl --force-reset --vm=xxx > > or force a poweroff with: bhyvectl --force-reset --vm=xxx > > SIGTERM simulates an ACPI shutdown > > > the bhyvectl --destroy is to clean up, the instance remains even after a > clean shutdown. In the past, it had to be destroyed and recreated to > start the VM again, although now with reboot support, that may not be > required. Can you suggest patches to vmrun.sh to make these new behaviors more obvious? People who write scripts over bhyve often look at vmrun.sh for inspiration. These new behaviors are definitely going in the right direction. -- Craig From owner-freebsd-virtualization@FreeBSD.ORG Tue Aug 19 16:59:30 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 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id F3601ABC for ; Tue, 19 Aug 2014 16:59:29 +0000 (UTC) Received: from mx1.scaleengine.net (beauharnois2.bhs1.scaleengine.net [142.4.218.15]) by mx1.freebsd.org (Postfix) with ESMTP id C8DDA3691 for ; Tue, 19 Aug 2014 16:59:29 +0000 (UTC) Received: from [192.168.1.2] (senat1-01.HML3.ScaleEngine.net [209.51.186.5]) (Authenticated sender: allanjude.freebsd@scaleengine.com) by mx1.scaleengine.net (Postfix) with ESMTPSA id 8F8C03A9F3 for ; Tue, 19 Aug 2014 16:59:28 +0000 (UTC) Message-ID: <53F38286.7050609@freebsd.org> Date: Tue, 19 Aug 2014 12:59:50 -0400 From: Allan Jude User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 MIME-Version: 1.0 To: freebsd-virtualization@freebsd.org Subject: Re: libvirt and rebooting of a bhyve VM References: <20140819154035.GA62903@kloomba> <53F37A6F.90405@freebsd.org> In-Reply-To: Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="NBnfAM9UO1243jfHWU4Cl9HgFJu1Rn9XF" 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: Tue, 19 Aug 2014 16:59:30 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --NBnfAM9UO1243jfHWU4Cl9HgFJu1Rn9XF Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On 2014-08-19 12:32, Craig Rodrigues wrote: > On Tue, Aug 19, 2014 at 9:25 AM, Allan Jude wro= te: >> >> Yes, this revision adds the ability to 'reboot'. This does not exit >> bhyve at all, so there is no exit level >> >> You can 'reboot' a bhyve externally using: >> bhyvectl --force-reset --vm=3Dxxx >> >> or force a poweroff with: bhyvectl --force-reset --vm=3Dxxx >> >> SIGTERM simulates an ACPI shutdown >> >> >> the bhyvectl --destroy is to clean up, the instance remains even after= a >> clean shutdown. In the past, it had to be destroyed and recreated to >> start the VM again, although now with reboot support, that may not be >> required. >=20 >=20 > Can you suggest patches to vmrun.sh to make these new behaviors more > obvious? People who write scripts over bhyve often look at vmrun.sh > for inspiration. >=20 > These new behaviors are definitely going in the right direction. >=20 > -- > Craig > _______________________________________________ > freebsd-virtualization@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-virtualization > To unsubscribe, send any mail to "freebsd-virtualization-unsubscribe@fr= eebsd.org" >=20 I am not sure what you'd change in vmrun.sh. In -STABLE, for a reboot, bhyve doesn't exit so vmrun.sh doesn't need to change at all. The loop in vmrun.sh ensures the VM gets restarted if bhyve crashes (making this optional may be useful). I am not sure what else one might change. I'll write to write some better documentation so that there is something else to refer to, rather than just the vmrun script. --=20 Allan Jude --NBnfAM9UO1243jfHWU4Cl9HgFJu1Rn9XF Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (MingW32) iQIcBAEBAgAGBQJT84KJAAoJEJrBFpNRJZKf+YgP/1t392ZihH3u0j6/L7P1mgml gAqsO0zB1Z4BdI48DPeLV4sWjiET/XNN79ncuLyCpdbJbG24deSdadgTA56i3Zqd lRBVlKg8GIBOm8zK/KudDW2qmtz0atU8bZ1Yzzix91v/dr4wQ+W0e3vAAoylsowx TWkXYTAEzd5fv87vW8Q7ctvwxIzR5oVkIAYLZ78yjKWVSxXFvANUOOdrJEvyRimG 1Nobw80B82zUGMv1XhBFBfSAwe/YI+2gMvrHN1B3zGh41gzPPjXX621vXqgRqRYQ QjyLG/ORkLHJddujdtk3RhZ1wzt2Dz5hcXShPQbm8aN50zEUBmQ+flTsGTXIJB6U pjEjvMh2Bu9HP8ZAVJdZwUwVVPBEsBE+XFUFl0Tt8rfQnUqJiJ1N+IAbT9OsSQJ3 FOEI3Fkam1F+Chxv+PAwnjKOwHSrpMrZ1+V9fvxuwq45N3Tp/OTAIxILYWeAuXNz AYofRAxpwIGcbqJ+SEMGH/n9mEofXj6gG0qtk5mJSaDdSe74XchHQp8jkLagP1wp GCH79OsZ7T7ofzy/ewpezBFCQ9lVJTBJbIo/95RN0Cnwuudxkmkv0/o86FAkluWr MyHvjDzuGV1qLeCnBnxiHnQJbkaIbcUIQ/S97nyczEEVWGMEY8raBD7U5sRAweOj TlOAi5iJrNBIduvbaPFe =laAP -----END PGP SIGNATURE----- --NBnfAM9UO1243jfHWU4Cl9HgFJu1Rn9XF-- From owner-freebsd-virtualization@FreeBSD.ORG Tue Aug 19 18:05:51 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 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0E11E84D; Tue, 19 Aug 2014 18:05:51 +0000 (UTC) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D6F003D9A; Tue, 19 Aug 2014 18:05:50 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id BA330B9A3; Tue, 19 Aug 2014 14:05:49 -0400 (EDT) From: John Baldwin To: freebsd-virtualization@freebsd.org Subject: Re: libvirt and rebooting of a bhyve VM Date: Tue, 19 Aug 2014 13:32:48 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.4-CBSD-20140415; KDE/4.5.5; amd64; ; ) References: <20140819154035.GA62903@kloomba> In-Reply-To: MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201408191332.48730.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Tue, 19 Aug 2014 14:05:49 -0400 (EDT) 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: Tue, 19 Aug 2014 18:05:51 -0000 On Tuesday, August 19, 2014 11:50:43 am Craig Rodrigues wrote: > On Tue, Aug 19, 2014 at 8:40 AM, Roman Bogorodskiy wrote: > > Hi Craig, > > > > Unfortunately, I'm not sure how to get the reboot working. Moreover, I > > get the same behaviour when starting bhyve manually -- when I do a > > reboot, bhyve(8) exits as soon as the system is ready to restart. > > > > So looks like that's a default bhyve behaviour or I'm missing something? > > Well, if you look at /usr/share/examples/bhyve/vmrun.sh, you > will see that byvectl --destroy --vm=xx ; bhyveload; bhyve > is run in a loop. That loop only terminates of bhyve returns non-zero. > > I don't think that this is a very good API, but that's what we have for now. > > If there was some way to detect of the bhyve process exited due to > ACPI shutdown or normal reboot, that would be helpful. That would > help people writing scripts around bhyve. The exit code is different. An ACPI shutdown uses an exit code of 1 whereas a reboot uses an exit code of 0 IIRC. -- John Baldwin From owner-freebsd-virtualization@FreeBSD.ORG Tue Aug 19 18:33:23 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 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0EF32384; Tue, 19 Aug 2014 18:33:23 +0000 (UTC) Received: from mail-la0-x22b.google.com (mail-la0-x22b.google.com [IPv6:2a00:1450:4010:c03::22b]) (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 32F33312E; Tue, 19 Aug 2014 18:33:22 +0000 (UTC) Received: by mail-la0-f43.google.com with SMTP id gi9so3776211lab.16 for ; Tue, 19 Aug 2014 11:33:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=t+mWDlNzPdv7la/MLUBG2Ptgm3fkrznLVJMWqk3eVXs=; b=CuAG0vSnhzo+qrpr74lnH+C1IxN9m/B9BGNrarHbjDbZdP3V88rlrw2MA3cSc3DqMn Vgix/nK6MB88sWFFXssjEsXqfbdIFbsLpRA9m1M+fb9SKeb6EGZB0voVuU8VW79hkS25 yZmQyFgLgNPkETq0eysmP9OCqzVbxa2PGQWRr7CZR5w4U/8hYE624GnQT3KWPyzbBM95 /amANUGadCdLTG/GRYcZFhD81uaYBrH27opNcmNS7IjYduLQvV3imlUsi86XpkRdSbLD uHQVXL4zw1C2H8YUp5F3+sCyctmKIPArpxxl0ug7fWla/EBW5IThOiuDDoOmr4f+Qedt Fu+Q== MIME-Version: 1.0 X-Received: by 10.152.22.165 with SMTP id e5mr16913535laf.57.1408473200068; Tue, 19 Aug 2014 11:33:20 -0700 (PDT) Sender: crodr001@gmail.com Received: by 10.112.197.107 with HTTP; Tue, 19 Aug 2014 11:33:19 -0700 (PDT) In-Reply-To: <201408191332.48730.jhb@freebsd.org> References: <20140819154035.GA62903@kloomba> <201408191332.48730.jhb@freebsd.org> Date: Tue, 19 Aug 2014 11:33:19 -0700 X-Google-Sender-Auth: UEKJh_0oC43nIRPXhlZl0dqJNW4 Message-ID: Subject: Re: libvirt and rebooting of a bhyve VM From: Craig Rodrigues To: John Baldwin Content-Type: text/plain; charset=ISO-8859-1 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: Tue, 19 Aug 2014 18:33:23 -0000 On Tue, Aug 19, 2014 at 10:32 AM, John Baldwin wrote: > The exit code is different. An ACPI shutdown uses an exit code of 1 whereas a > reboot uses an exit code of 0 IIRC. Hi, I have a CURRENT system, and ran some tests doing a "shutdown -r" and "shutdown -p" verified that you are right, with respect to the exit codes. Looking at src/usr.sbin/bhyve/bhyverun.c, I see that fbsdrun_start_thread() -> vm_loop() Inside vm_loop(), there is this line: rc = (*handler[exitcode])(ctx, &vmexit[vcpu], &vcpu); That line ends up calling vmexit_suspend(). In vmexit_suspend() there is this: switch (how) { case VM_SUSPEND_RESET: exit(0); case VM_SUSPEND_POWEROFF: exit(1); case VM_SUSPEND_HALT: exit(2); case VM_SUSPEND_TRIPLEFAULT: exit(3); default: fprintf(stderr, "vmexit_suspend: invalid reason %d\n", how); exit(100); } I think that: (1) vmrun.sh should be changed a little bit to accomodate this new logic (2) the bhyve man page should document these return codes. -- Craig From owner-freebsd-virtualization@FreeBSD.ORG Tue Aug 19 19:04:06 2014 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 ESMTPS id A548538F; Tue, 19 Aug 2014 19:04:06 +0000 (UTC) Received: from mail-la0-x234.google.com (mail-la0-x234.google.com [IPv6:2a00:1450:4010:c03::234]) (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 01B47348B; Tue, 19 Aug 2014 19:04:05 +0000 (UTC) Received: by mail-la0-f52.google.com with SMTP id b17so6330770lan.11 for ; Tue, 19 Aug 2014 12:04:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=FXYbrObEiscD1nh4Nb76Dd8740pYn9NPTv1gqH/A72Y=; b=YPt0I5QRi5ku9erbz3Z/kGrOoItRlkBiRu322Pfm854pbDswptKnzZXK5iI/lmejtK 3wbovhEE0qAmJgNGCtgCYRQC8heWNOS3SOFp0SH5wHT53035d83zCVjYTGKbeaTWXWpm XhymvrMdebDxa5/Dm8++WO+Kl43qkYwfZBYaDqHNMK+HvhyieKN2KEq0NLyUMZtUvfGS egDEbqOyf7pK9C87EQXOVpXmlri127zNSNCWLqyY3jUpt0UpzkQYplr5up4HZL4P7l+W 6U4qRm0HqFZqGk5jFdBA7XfmN4BIcILZi+/BjjXEFHsJSF5+u83DvC/ZmzIuMIJSNs3R BymA== MIME-Version: 1.0 X-Received: by 10.112.163.103 with SMTP id yh7mr36424960lbb.73.1408475043873; Tue, 19 Aug 2014 12:04:03 -0700 (PDT) Sender: crodr001@gmail.com Received: by 10.112.197.107 with HTTP; Tue, 19 Aug 2014 12:04:03 -0700 (PDT) In-Reply-To: <53F37A6F.90405@freebsd.org> References: <20140819154035.GA62903@kloomba> <53F37A6F.90405@freebsd.org> Date: Tue, 19 Aug 2014 12:04:03 -0700 X-Google-Sender-Auth: ppR8RayrXc2wILKycRKXkCJm9p0 Message-ID: Subject: Re: libvirt and rebooting of a bhyve VM From: Craig Rodrigues To: Allan Jude Content-Type: text/plain; charset=ISO-8859-1 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: Tue, 19 Aug 2014 19:04:06 -0000 On Tue, Aug 19, 2014 at 9:25 AM, Allan Jude wrote: > > Yes, this revision adds the ability to 'reboot'. This does not exit > bhyve at all, so there is no exit level > > You can 'reboot' a bhyve externally using: > bhyvectl --force-reset --vm=xxx > > or force a poweroff with: bhyvectl --force-reset --vm=xxx > > SIGTERM simulates an ACPI shutdown > > > the bhyvectl --destroy is to clean up, the instance remains even after a > clean shutdown. In the past, it had to be destroyed and recreated to > start the VM again, although now with reboot support, that may not be > required. Thanks for that information. It's very useful. There doesn't seem to be a bhyvectl man page. Do you have the bandwidth to write one up and check it into the tree? That would be very helpful. I ran some experiments with bhyvectl --force-reset and --force-poweroff. They work as expected. There doesn't seem to be a bhyvectl command which simulates ACPI shutdown. If I have the name of the bhyve VM, is there a way that I can obtain the pid of the bhyve process which started the VM, so I can send it a SIGTERM, or do I need to keep track of that myself when starting the bhyve process? > > > the bhyvectl --destroy is to clean up, the instance remains even after a > clean shutdown. In the past, it had to be destroyed and recreated to > start the VM again, although now with reboot support, that may not be > required. You are right, calling bhyvectl --destroy does not seem to be required. I ran some experiments: DOESN'T WORK ============== bhyvectl --destroy ...... bhyveload ..... while true; do byve ...... if [ $? -ne 0 ]; then break fi done if I do a shutdown -r inside the VM, then when the VM reboots, I get: Assertion failed: (error == 0), function fbsdrun_addcpu, file /usr/src/usr.sbin/bhyve/bhyverun.c, line 266. WORKING ======== bhyvectl --destroy ...... while true; do bhyveload ..... byve ...... if [ $? -ne 0 ]; then break fi done This combination seems to work fine. I can do "shutdown -r" inside the VM, and it reboots fine. I can also do "shutdown -p", and the VM shuts down. So I think vmrun.sh can be changed to accomodate this new behavior, and make it more clear to people writing scripts on top of bhyve. -- Craig From owner-freebsd-virtualization@FreeBSD.ORG Tue Aug 19 19:18:07 2014 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 ESMTPS id 20A1C7FD for ; Tue, 19 Aug 2014 19:18:07 +0000 (UTC) Received: from mx1.scaleengine.net (beauharnois2.bhs1.scaleengine.net [142.4.218.15]) by mx1.freebsd.org (Postfix) with ESMTP id EAC7235A4 for ; Tue, 19 Aug 2014 19:18:06 +0000 (UTC) Received: from [192.168.1.2] (senat1-01.HML3.ScaleEngine.net [209.51.186.5]) (Authenticated sender: allanjude.freebsd@scaleengine.com) by mx1.scaleengine.net (Postfix) with ESMTPSA id 6946D3A056 for ; Tue, 19 Aug 2014 19:18:00 +0000 (UTC) Message-ID: <53F3A2FF.3070600@freebsd.org> Date: Tue, 19 Aug 2014 15:18:23 -0400 From: Allan Jude User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 MIME-Version: 1.0 To: freebsd-virtualization@freebsd.org Subject: Re: libvirt and rebooting of a bhyve VM References: <20140819154035.GA62903@kloomba> <53F37A6F.90405@freebsd.org> In-Reply-To: Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="vHJKRCJ2PrgNhNC40E7X5EAGSidkeQXug" 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: Tue, 19 Aug 2014 19:18:07 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --vHJKRCJ2PrgNhNC40E7X5EAGSidkeQXug Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On 2014-08-19 15:04, Craig Rodrigues wrote: > On Tue, Aug 19, 2014 at 9:25 AM, Allan Jude wro= te: >> >> Yes, this revision adds the ability to 'reboot'. This does not exit >> bhyve at all, so there is no exit level >> >> You can 'reboot' a bhyve externally using: >> bhyvectl --force-reset --vm=3Dxxx >> >> or force a poweroff with: bhyvectl --force-reset --vm=3Dxxx >> >> SIGTERM simulates an ACPI shutdown >> >> >> the bhyvectl --destroy is to clean up, the instance remains even after= a >> clean shutdown. In the past, it had to be destroyed and recreated to >> start the VM again, although now with reboot support, that may not be >> required. >=20 > Thanks for that information. It's very useful. > There doesn't seem to be a bhyvectl man page. Do you have the > bandwidth to write one up and check it into the tree? > That would be very helpful. >=20 > I ran some experiments with bhyvectl --force-reset and > --force-poweroff. They work as expected. > There doesn't seem to be a bhyvectl command which simulates ACPI shutdo= wn. >=20 > If I have the name of the bhyve VM, is there a way that I can obtain > the pid of the bhyve process which started > the VM, so I can send it a SIGTERM, or do I need to keep track of that > myself when starting the bhyve process? >=20 The name of the vm is in the title of the bhyve process, but yes, it would be nice to expose the ACPI style shutdown via bhyvectl --graceful-shutdown or something >=20 >> >> >> the bhyvectl --destroy is to clean up, the instance remains even after= a >> clean shutdown. In the past, it had to be destroyed and recreated to >> start the VM again, although now with reboot support, that may not be >> required. >=20 > You are right, calling bhyvectl --destroy does not seem to be required.= > I ran some experiments: >=20 >=20 > DOESN'T WORK > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > bhyvectl --destroy ...... > bhyveload ..... > while true; do > byve ...... > if [ $? -ne 0 ]; then > break > fi > done >=20 > if I do a shutdown -r inside the VM, then when the VM reboots, I get: >=20 > Assertion failed: (error =3D=3D 0), function fbsdrun_addcpu, file > /usr/src/usr.sbin/bhyve/bhyverun.c, line 266. >=20 >=20 >=20 >=20 > WORKING > =3D=3D=3D=3D=3D=3D=3D=3D > bhyvectl --destroy ...... > while true; do > bhyveload ..... > byve ...... > if [ $? -ne 0 ]; then > break > fi > done >=20 >=20 > This combination seems to work fine. I can do "shutdown -r" inside > the VM, and it reboots fine. > I can also do "shutdown -p", and the VM shuts down. >=20 > So I think vmrun.sh can be changed to accomodate this new behavior, > and make it more clear > to people writing scripts on top of bhyve. > -- > Craig > _______________________________________________ > freebsd-virtualization@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-virtualization > To unsubscribe, send any mail to "freebsd-virtualization-unsubscribe@fr= eebsd.org" >=20 The question is, inside the while loop, after bhyve exits, does /dev/vmm/ still exist? Depending what you are doing, you may want to destroy it. If you actually want to fully destroy and recreate the vm, you want to destroy it. If you want to change the amount of ram or devices etc, you might need to destroy it, etc. --=20 Allan Jude --vHJKRCJ2PrgNhNC40E7X5EAGSidkeQXug Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (MingW32) iQIcBAEBAgAGBQJT86MBAAoJEJrBFpNRJZKfEeQQAJpB/TB/X8ZylLpuv5E4yxF3 U6+0Yz/KVhjshdxqv2/vo6Lt/NQu42iVccKF4DQq0VVwtXKmfBDWSrPXsLi9dm4J 4gCpMH+HfvFQ3aqPkJTgeOpzzrepHk8SSJHHSWTCvXwX3C8ZngXndp+nYfb3gCI5 SWlE2zWbLMS7kmC8M4AsBK37c46ICATzv9VfM+ofew3vpYpU3qlpygtA3AABvFfD +SP34UbDp2+i6EldwYEHM5iR4f2JKCRbE/4dDoyREK6rasWb8PFcTIRDrbbIdG/K XPSuXfAhMfJ5+5Oqd7aV0wvrY1cJxQMaGNLGUNmzqoa+/6cMbcvQ8vn8m5eSVgPO fc3fzBicbZm3SFz0dBJ1zFZsLja1T/2LOnEfYrgX4zpkYCXPXBr0/lLp8EQrR4rl MBbm8asIb/yk43wVRi4OpYbxtUlJFK2gKfrG2ghyO16yG86LxlIFtfNBbV+N5HeC h34pvlufuQ595Z8OrOzZqEZaGubkSb8qR8TGdrj5bbjx6zPQxhBEn/NwlS2FMENU Fv7UrBfw7R4cBWaQDIkZS/qsEoJvQzQIkNUGm8m7ykAtAYN4LTQOIwX9f8EUm/pD h5CJawYL79uAZLhfwLqG9YhemFFZWPpRZ5xKTBa2VRwB9itzwxPWFFGYYtRiP2LE Wcy1mbUF9uWl3y+I8Udx =CPBh -----END PGP SIGNATURE----- --vHJKRCJ2PrgNhNC40E7X5EAGSidkeQXug-- From owner-freebsd-virtualization@FreeBSD.ORG Tue Aug 19 19:44:44 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 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DA0241C9; Tue, 19 Aug 2014 19:44:44 +0000 (UTC) Received: from mail-lb0-x22b.google.com (mail-lb0-x22b.google.com [IPv6:2a00:1450:4010:c04::22b]) (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 36BFB3848; Tue, 19 Aug 2014 19:44:44 +0000 (UTC) Received: by mail-lb0-f171.google.com with SMTP id l4so5973590lbv.16 for ; Tue, 19 Aug 2014 12:44:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=8a9bQp3vzd4glrMccUe8R3J6wqcDHS5Y8KKQMPbemLc=; b=QXlmTpLH6a7SxOVx7EBV1jr46typlsW7hToXItsLHajh+k10FwAEcOjSifkDwQI+ae s8+AQwyuDAvmRBPO+C3vOY8huwELhgyaHQ6GTjl3Ua+Sbca01qqyzbgqLx5wHBRImhJ7 IGwE2A9mcjS29vkJFrXBTfbkTs9nK8S+ISshoTE5W5hKUS7t2Ihos5hVhRY0Dl7Ws6pg KoJMa2CxqgawFXXhhnij6ZjiRbCc8CCwhHC+OkSh4BL2wXawMcORVG3woTQ0B00MKD7Z IyjyEYueJ6fOrETvzwrX2fISWEAJ8o8Mx6rLtYp/Wa8ws390oLcvxlp/B7tfGERogtkI UTmA== MIME-Version: 1.0 X-Received: by 10.152.229.133 with SMTP id sq5mr37758055lac.67.1408477482139; Tue, 19 Aug 2014 12:44:42 -0700 (PDT) Sender: crodr001@gmail.com Received: by 10.112.197.107 with HTTP; Tue, 19 Aug 2014 12:44:42 -0700 (PDT) In-Reply-To: <53F3A2FF.3070600@freebsd.org> References: <20140819154035.GA62903@kloomba> <53F37A6F.90405@freebsd.org> <53F3A2FF.3070600@freebsd.org> Date: Tue, 19 Aug 2014 12:44:42 -0700 X-Google-Sender-Auth: l8TNNlr-PSAlBhgezTo1dZZdqpU Message-ID: Subject: Re: libvirt and rebooting of a bhyve VM From: Craig Rodrigues To: Allan Jude Content-Type: text/plain; charset=ISO-8859-1 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: Tue, 19 Aug 2014 19:44:44 -0000 On Tue, Aug 19, 2014 at 12:18 PM, Allan Jude wrote: > > The name of the vm is in the title of the bhyve process, but yes, it Hmm, OK, that would require me to grep the processes and send SIGTERM to the right pid. That's not ideal, especially if I start lots of VM's, but it is workable. > would be nice to expose the ACPI style shutdown via bhyvectl > --graceful-shutdown or something Yes, it would. > > The question is, inside the while loop, after bhyve exits, does > /dev/vmm/ still exist? Yes, /dev/vmm/ still exists when bhyve exists, no matter if it is a "shutdown -r" , or "shutdown -p". -- Craig From owner-freebsd-virtualization@FreeBSD.ORG Wed Aug 20 09:20:07 2014 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 ESMTPS id C9258757; Wed, 20 Aug 2014 09:20:07 +0000 (UTC) Received: from na01-bn1-obe.outbound.protection.outlook.com (mail-bn1lp0141.outbound.protection.outlook.com [207.46.163.141]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client CN "mail.protection.outlook.com", Issuer "MSIT Machine Auth CA 2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 5CDCF32EF; Wed, 20 Aug 2014 09:20:05 +0000 (UTC) Received: from BY1PR0301MB0902.namprd03.prod.outlook.com (25.160.195.141) by BY1PR0301MB0901.namprd03.prod.outlook.com (25.160.195.140) with Microsoft SMTP Server (TLS) id 15.0.1005.10; Wed, 20 Aug 2014 09:19:57 +0000 Received: from BY1PR0301MB0902.namprd03.prod.outlook.com ([25.160.195.141]) by BY1PR0301MB0902.namprd03.prod.outlook.com ([25.160.195.141]) with mapi id 15.00.1005.008; Wed, 20 Aug 2014 09:19:57 +0000 From: Wei Hu To: "freebsd-drivers@freebsd.org" , "freebsd-xen@freebsd.org" Subject: Directly reserve an interrupt IDT entry for Hyper-V Thread-Topic: Directly reserve an interrupt IDT entry for Hyper-V Thread-Index: Ac+8UT9e97G9LT7sSf25pxsUhlOuiA== Date: Wed, 20 Aug 2014 09:19:56 +0000 Message-ID: <3defccd56bc0407c88bdda139b2462ac@BY1PR0301MB0902.namprd03.prod.outlook.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [167.220.232.169] x-microsoft-antispam: BCL:0;PCL:0;RULEID:;UriScan:; x-forefront-prvs: 03094A4065 x-forefront-antispam-report: SFV:NSPM; SFS:(6009001)(164054003)(189002)(199003)(85306004)(101416001)(105586002)(19300405004)(15202345003)(16236675004)(46102001)(54356999)(50986999)(4396001)(33646002)(81542001)(76576001)(106356001)(21056001)(561944003)(74662001)(99396002)(74502001)(81342001)(31966008)(64706001)(86612001)(92566001)(80022001)(95666004)(19580395003)(15975445006)(2656002)(86362001)(77982001)(229853001)(74316001)(66066001)(19625215002)(99286002)(79102001)(108616004)(83072002)(83322001)(20776003)(107046002)(87936001)(85852003)(77096002)(76482001)(24736002); DIR:OUT; SFP:; SCL:1; SRVR:BY1PR0301MB0901; H:BY1PR0301MB0902.namprd03.prod.outlook.com; FPR:; MLV:sfv; PTR:InfoNoRecords; MX:1; A:1; LANG:en; MIME-Version: 1.0 X-OriginatorOrg: microsoft.onmicrosoft.com Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.18-1 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: Wed, 20 Aug 2014 09:20:07 -0000 Hello, Sending to Xen, drivers and virtualization mailing lists since this might b= e of interest to the folks on these aliases. I am working for Microsoft to improve the performance of FreeBSD running on= Hyper-V. Right now I am adding a feature in the vmbus driver which could h= andle the host-guest channel communications on all vCPUs simultaneously. In= order to achieve this, the hypervisor will send same interrupt concurrentl= y on all the vCPUs. The traditional way on FreeBSD to set up interrupt hand= ling for devicse, such as calling bus_alloc_resource() to reserve an IRQ li= ne, and then calling bus_setup_intr() to create a vector, doesn't seem to w= ork in this case. It seems if the interrupt is routed via legacy IRQ, it ca= n only be active on one vCPU at a time. In order to allow the same interrup= t to be handled on all vCPUs concurrently, all I need is an IDT entry, not = an IRQ line. I checked current FreeBSD code. It looks to me Xen directly uses the vector= number IDT_EVTCHN (0x93) to achieve the same purpose. I am proposing both = Xen and Hyper-V share this same vector. Following is a little bit detail of= my proposal for the changes in the current kernel. 1. In machdep.c: #ifdef XENHVM setidt(IDT_EVTCHN, &IDTVEC(xen_intr_upcall), SDT_SYSIGT, SEL_UPL, 0= ); #else setidt(IDT_EVTCHN, &IDTVEC(hv_vmbus_intr), SDT_SYSIGT, SEL_UPL, 0); #endif 2. Apic_vector.S Add IDTVEC(hv_vmbus_intr) to call Hyper-V vmbus interrupt service routine. Any thoughts, objections and feedbacks are all welcome. Thanks, Wei Hu Open Source Technology Center Microsoft China From owner-freebsd-virtualization@FreeBSD.ORG Wed Aug 20 10:13:27 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 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4591A220; Wed, 20 Aug 2014 10:13:27 +0000 (UTC) Received: from mail-la0-x22f.google.com (mail-la0-x22f.google.com [IPv6:2a00:1450:4010:c03::22f]) (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 9285639B6; Wed, 20 Aug 2014 10:13:26 +0000 (UTC) Received: by mail-la0-f47.google.com with SMTP id mc6so7112062lab.34 for ; Wed, 20 Aug 2014 03:13:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=gmVKAdc+qztkfczdCxi7ktYo/5m9D6rzWR/zOiUDCH8=; b=n/4CPBHpTfkhpFNvIBdHTh2hX1kimtak+IbZyK0DL5QqhweRrl+i9YDdfKI+NbaRBJ NABzX/RHUUCJn2fegfaXseWidQD8/oqtl5c9aBpTupMh1HjrqjojUg/3hT/oS15jw2oS QlcgXwcgIVvv6q2Uah92kTrnRvDtqwm1l8dT4v5CF7oyCiYPgDalB06JlHtasV5P4uhZ nZoTt2gCSVmwgZNsUo6J5S8Puc5C4c854F7NjIH+fTUlTRe44LeZURUyiY1F0J9q8kxy Q7FMj7/bGmWYDc2rpFvonl05LnUOTZ7udKFdJ53hBi4tkkXmW8FJJfsd+sr5+ZTiW1ZO NB9Q== X-Received: by 10.112.156.10 with SMTP id wa10mr30653709lbb.68.1408529604366; Wed, 20 Aug 2014 03:13:24 -0700 (PDT) Received: from kloomba ([77.94.197.103]) by mx.google.com with ESMTPSA id w9sm1633326lae.19.2014.08.20.03.13.23 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 20 Aug 2014 03:13:23 -0700 (PDT) Sender: Roman Bogorodskiy Date: Wed, 20 Aug 2014 14:10:43 +0400 From: Roman Bogorodskiy To: Allan Jude Subject: Re: libvirt and rebooting of a bhyve VM Message-ID: <20140820101041.GA1368@kloomba> References: <20140819154035.GA62903@kloomba> <53F37A6F.90405@freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="fUYQa+Pmc3FrFX/N" Content-Disposition: inline In-Reply-To: <53F37A6F.90405@freebsd.org> User-Agent: Mutt/1.5.23 (2014-03-12) 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: Wed, 20 Aug 2014 10:13:27 -0000 --fUYQa+Pmc3FrFX/N Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Allan Jude wrote: > On 2014-08-19 11:50, John Nielsen wrote: > > On Aug 19, 2014, at 9:40 AM, Roman Bogorodskiy wrot= e: > >=20 > >> Craig Rodrigues wrote: > >> > >>> Roman, > >>> > >>> I am using libvirt and bhyve according to this XML: > >>> http://libvirt.org/drvbhyve.html > >>> and it works great. > >>> I gave a presentation at BAFUG on this: > >>> http://www.slideshare.net/CraigRodrigues1/libvirt-bhyve > >>> > >>> I have one question. If I reboot the bhyve VM started with libvirt > >>> with "shutdown -r now", > >>> the VM shuts down, but it does not restart. > >>> > >>> How can I get the machine to reboot with "shutdown -r now" when > >>> started with libvirt? > >> > >> Hi Craig, > >> > >> Unfortunately, I'm not sure how to get the reboot working. Moreover, I > >> get the same behaviour when starting bhyve manually -- when I do a > >> reboot, bhyve(8) exits as soon as the system is ready to restart. > >> > >> So looks like that's a default bhyve behaviour or I'm missing somethin= g? > >=20 > > Wasn't changing this the intention of r267216 (MFCed as r270071)? > >=20 > > Roman, was your 10-STABLE built after that revision? > >=20 > > JN > >=20 > > _______________________________________________ > > freebsd-virtualization@freebsd.org mailing list > > http://lists.freebsd.org/mailman/listinfo/freebsd-virtualization > > To unsubscribe, send any mail to "freebsd-virtualization-unsubscribe@fr= eebsd.org" > >=20 >=20 > Yes, this revision adds the ability to 'reboot'. This does not exit > bhyve at all, so there is no exit level >=20 > You can 'reboot' a bhyve externally using: > bhyvectl --force-reset --vm=3Dxxx >=20 > or force a poweroff with: bhyvectl --force-reset --vm=3Dxxx >=20 > SIGTERM simulates an ACPI shutdown >=20 >=20 > the bhyvectl --destroy is to clean up, the instance remains even after a > clean shutdown. In the past, it had to be destroyed and recreated to > start the VM again, although now with reboot support, that may not be > required. I have updated to 10-STABLE that includes commit r270071. I can see bhyveload has --force-reset flag. However, when I boot a VM and do 'reboot' there, bhyve(8) exits with exit code 0.=20 The same happens when I do bhyvectl --force-reset.=20 Any ideas how to debug why bhyve(8) exits in this case? Roman Bogorodskiy --fUYQa+Pmc3FrFX/N Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.13 (FreeBSD) iQEcBAEBAgAGBQJT9HQhAAoJEMltX/4IwiJqV0YIAJsneoR7KHdsptPkdMd65jLi ns2L5YA8gZ0VQrogA2oACCfut4QnqHF4wA/eUqz00AKH/3DIRXrexyQSvK1N3xNU ciJLixbm6E9OpaLP6JP4WG4Etuu59Zxcz/ehSmGYf2Qv9NbIZqoyC/uJ3f7ZcRb0 GAbpdQ49bMF6otfNKC2PMMbvVGyL9kj2VfbQzWkwj9XCllFtmyPyJUgnexRYWPy0 X6ho/ifF9GBOal60Kr1rEgeb3AktatarZ0ZGkafA83VN+h/BJykfmTcVQWh8amzc 6qUe+vDlhVV5clhYPJLlDwkxsvW/3AhtQ4GVpfiC+cJL1qng/gogXAjYMVFtL1U= =9/nr -----END PGP SIGNATURE----- --fUYQa+Pmc3FrFX/N-- From owner-freebsd-virtualization@FreeBSD.ORG Wed Aug 20 13:32:04 2014 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 ESMTPS id EAA85EF4; Wed, 20 Aug 2014 13:32:04 +0000 (UTC) Received: from SMTP.CITRIX.COM (smtp.citrix.com [66.165.176.89]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (Client CN "mail.citrix.com", Issuer "Cybertrust Public SureServer SV CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C48223F93; Wed, 20 Aug 2014 13:32:03 +0000 (UTC) X-IronPort-AV: E=Sophos;i="5.01,902,1400025600"; d="scan'208";a="163375480" Received: from [IPv6:::1] (10.80.16.47) by smtprelay.citrix.com (10.13.107.78) with Microsoft SMTP Server id 14.3.181.6; Wed, 20 Aug 2014 09:31:54 -0400 Message-ID: <53F4A34A.4010807@citrix.com> Date: Wed, 20 Aug 2014 15:31:54 +0200 From: =?ISO-8859-1?Q?Roger_Pau_Monn=E9?= User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 MIME-Version: 1.0 To: Wei Hu , "freebsd-drivers@freebsd.org" , "freebsd-xen@freebsd.org" Subject: Re: Directly reserve an interrupt IDT entry for Hyper-V References: <3defccd56bc0407c88bdda139b2462ac@BY1PR0301MB0902.namprd03.prod.outlook.com> In-Reply-To: <3defccd56bc0407c88bdda139b2462ac@BY1PR0301MB0902.namprd03.prod.outlook.com> Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7bit X-DLP: MIA2 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: Wed, 20 Aug 2014 13:32:05 -0000 On 20/08/14 11:19, Wei Hu wrote: > Hello, > > Sending to Xen, drivers and virtualization mailing lists since this might be of interest to the folks on these aliases. > > I am working for Microsoft to improve the performance of FreeBSD running on Hyper-V. Right now I am adding a feature in the vmbus driver which could handle the host-guest channel communications on all vCPUs simultaneously. In order to achieve this, the hypervisor will send same interrupt concurrently on all the vCPUs. The traditional way on FreeBSD to set up interrupt handling for devicse, such as calling bus_alloc_resource() to reserve an IRQ line, and then calling bus_setup_intr() to create a vector, doesn't seem to work in this case. It seems if the interrupt is routed via legacy IRQ, it can only be active on one vCPU at a time. In order to allow the same interrupt to be handled on all vCPUs concurrently, all I need is an IDT entry, not an IRQ line. > > I checked current FreeBSD code. It looks to me Xen directly uses the vector number IDT_EVTCHN (0x93) to achieve the same purpose. I am proposing both Xen and Hyper-V share this same vector. Following is a little bit detail of my proposal for the changes in the current kernel. > > > 1. In machdep.c: > > #ifdef XENHVM > > setidt(IDT_EVTCHN, &IDTVEC(xen_intr_upcall), SDT_SYSIGT, SEL_UPL, 0); > > #else > > setidt(IDT_EVTCHN, &IDTVEC(hv_vmbus_intr), SDT_SYSIGT, SEL_UPL, 0); > > #endif > > 2. Apic_vector.S > > Add IDTVEC(hv_vmbus_intr) to call Hyper-V vmbus interrupt service routine. > > Any thoughts, objections and feedbacks are all welcome. Hello, I don't think using the same IDT vector is the right approach, I would just pick a different IDT vector and use that for Hyper-V. Using the same IDT vector (like your suggestion above) would prevent shipping a kernel with with both Hyper-V and Xen support (like it's done now in GENERIC). Roger. From owner-freebsd-virtualization@FreeBSD.ORG Wed Aug 20 16:00:43 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 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C64FE724; Wed, 20 Aug 2014 16:00:43 +0000 (UTC) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9AAAD3082; Wed, 20 Aug 2014 16:00:43 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 7EEC5B9CE; Wed, 20 Aug 2014 12:00:42 -0400 (EDT) From: John Baldwin To: freebsd-drivers@freebsd.org Subject: Re: Directly reserve an interrupt IDT entry for Hyper-V Date: Wed, 20 Aug 2014 11:31:29 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.4-CBSD-20140415; KDE/4.5.5; amd64; ; ) References: <3defccd56bc0407c88bdda139b2462ac@BY1PR0301MB0902.namprd03.prod.outlook.com> <53F4A34A.4010807@citrix.com> In-Reply-To: <53F4A34A.4010807@citrix.com> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Message-Id: <201408201131.29399.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Wed, 20 Aug 2014 12:00:42 -0400 (EDT) Cc: "freebsd-xen@freebsd.org" , "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: Wed, 20 Aug 2014 16:00:43 -0000 On Wednesday, August 20, 2014 9:31:54 am Roger Pau Monn=E9 wrote: > On 20/08/14 11:19, Wei Hu wrote: > > Hello, > >=20 > > Sending to Xen, drivers and virtualization mailing lists since this mig= ht=20 be of interest to the folks on these aliases. > >=20 > > I am working for Microsoft to improve the performance of FreeBSD runnin= g=20 on Hyper-V. Right now I am adding a feature in the vmbus driver which could= =20 handle the host-guest channel communications on all vCPUs simultaneously. I= n=20 order to achieve this, the hypervisor will send same interrupt concurrently= on=20 all the vCPUs. The traditional way on FreeBSD to set up interrupt handling = for=20 devicse, such as calling bus_alloc_resource() to reserve an IRQ line, and t= hen=20 calling bus_setup_intr() to create a vector, doesn't seem to work in this=20 case. It seems if the interrupt is routed via legacy IRQ, it can only be=20 active on one vCPU at a time. In order to allow the same interrupt to be=20 handled on all vCPUs concurrently, all I need is an IDT entry, not an IRQ=20 line. > >=20 > > I checked current FreeBSD code. It looks to me Xen directly uses the=20 vector number IDT_EVTCHN (0x93) to achieve the same purpose. I am proposing= =20 both Xen and Hyper-V share this same vector. Following is a little bit deta= il=20 of my proposal for the changes in the current kernel. > >=20 > >=20 > > 1. In machdep.c: > >=20 > > #ifdef XENHVM > >=20 > > setidt(IDT_EVTCHN, &IDTVEC(xen_intr_upcall), SDT_SYSIGT, SEL_UP= L,=20 0); > >=20 > > #else > >=20 > > setidt(IDT_EVTCHN, &IDTVEC(hv_vmbus_intr), SDT_SYSIGT, SEL_UPL,= =20 0); > >=20 > > #endif > >=20 > > 2. Apic_vector.S > >=20 > > Add IDTVEC(hv_vmbus_intr) to call Hyper-V vmbus interrupt service routi= ne. > >=20 > > Any thoughts, objections and feedbacks are all welcome. >=20 > Hello, >=20 > I don't think using the same IDT vector is the right approach, I would > just pick a different IDT vector and use that for Hyper-V. Using the > same IDT vector (like your suggestion above) would prevent shipping a > kernel with with both Hyper-V and Xen support (like it's done now in > GENERIC). >=20 > Roger. Hmm, can't you make this a runtime check to only call setidt() if you detec= t=20 you are under the appropriate hypervisor? Also, bhyve currently has a hackish way of requesting a free IDT slot. =20 Perhaps it would be best if I added little API to reserve an IDT slot assum= ing=20 that callers could accept a dynamic IDT vector rather than a static one. =2D-=20 John Baldwin From owner-freebsd-virtualization@FreeBSD.ORG Wed Aug 20 16:00:42 2014 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 ESMTPS id 8F93F721; Wed, 20 Aug 2014 16:00:42 +0000 (UTC) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 635E93081; Wed, 20 Aug 2014 16:00:42 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 4B6F9B9CD; Wed, 20 Aug 2014 12:00:41 -0400 (EDT) From: John Baldwin To: Craig Rodrigues Subject: Re: libvirt and rebooting of a bhyve VM Date: Wed, 20 Aug 2014 11:15:50 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.4-CBSD-20140415; KDE/4.5.5; amd64; ; ) References: <201408191332.48730.jhb@freebsd.org> In-Reply-To: MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201408201115.50392.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Wed, 20 Aug 2014 12:00:41 -0400 (EDT) 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: Wed, 20 Aug 2014 16:00:42 -0000 On Tuesday, August 19, 2014 2:33:19 pm Craig Rodrigues wrote: > On Tue, Aug 19, 2014 at 10:32 AM, John Baldwin wrote: > > The exit code is different. An ACPI shutdown uses an exit code of 1 whereas a > > reboot uses an exit code of 0 IIRC. > > > Hi, > > I have a CURRENT system, and ran some tests doing a "shutdown -r" and > "shutdown -p" verified that you are right, > with respect to the exit codes. > > Looking at src/usr.sbin/bhyve/bhyverun.c, I see that > > fbsdrun_start_thread() -> vm_loop() > > Inside vm_loop(), there is this line: > > rc = (*handler[exitcode])(ctx, &vmexit[vcpu], &vcpu); > > That line ends up calling vmexit_suspend(). > > In vmexit_suspend() there is this: > > switch (how) { > case VM_SUSPEND_RESET: > exit(0); > case VM_SUSPEND_POWEROFF: > exit(1); > case VM_SUSPEND_HALT: > exit(2); > case VM_SUSPEND_TRIPLEFAULT: > exit(3); > default: > fprintf(stderr, "vmexit_suspend: invalid reason %d\n", how); > exit(100); > } > > > I think that: > > (1) vmrun.sh should be changed a little bit to accomodate this new logic > (2) the bhyve man page should document these return codes. vmrun.sh already handles this. It breaks out of the loop for any non-zero exit code and only continues the loop for exit code 0. It probably would be good to document the return codes in the man page, but eventually they will all go away. The long term plan is to make bhyve operate more like other hypervisors in which case a single process invocation will mimic a power-on to power-off cycle of a machine and you wouldn't need vmrun.sh at all (you would just run bhyve with appropriate args / config file). In that case, the return codes will change since it won't exit for reboots anymore. -- John Baldwin From owner-freebsd-virtualization@FreeBSD.ORG Wed Aug 20 16:33:11 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 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 818D6896; Wed, 20 Aug 2014 16:33:11 +0000 (UTC) Received: from SMTP02.CITRIX.COM (smtp02.citrix.com [66.165.176.63]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (Client CN "mail.citrix.com", Issuer "Cybertrust Public SureServer SV CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 2881C355F; Wed, 20 Aug 2014 16:33:09 +0000 (UTC) X-IronPort-AV: E=Sophos;i="5.01,903,1400025600"; d="scan'208";a="164166878" Received: from [IPv6:::1] (10.80.16.47) by smtprelay.citrix.com (10.13.107.79) with Microsoft SMTP Server id 14.3.181.6; Wed, 20 Aug 2014 12:33:00 -0400 Message-ID: <53F4CDBA.8040500@citrix.com> Date: Wed, 20 Aug 2014 18:32:58 +0200 From: =?ISO-8859-1?Q?Roger_Pau_Monn=E9?= User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 MIME-Version: 1.0 To: John Baldwin , Subject: Re: Directly reserve an interrupt IDT entry for Hyper-V References: <3defccd56bc0407c88bdda139b2462ac@BY1PR0301MB0902.namprd03.prod.outlook.com> <53F4A34A.4010807@citrix.com> <201408201131.29399.jhb@freebsd.org> In-Reply-To: <201408201131.29399.jhb@freebsd.org> Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8bit X-DLP: MIA1 Cc: "freebsd-xen@freebsd.org" , "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: Wed, 20 Aug 2014 16:33:11 -0000 On 20/08/14 17:31, John Baldwin wrote: > On Wednesday, August 20, 2014 9:31:54 am Roger Pau Monné wrote: >> Hello, >> >> I don't think using the same IDT vector is the right approach, I would >> just pick a different IDT vector and use that for Hyper-V. Using the >> same IDT vector (like your suggestion above) would prevent shipping a >> kernel with with both Hyper-V and Xen support (like it's done now in >> GENERIC). >> >> Roger. > > Hmm, can't you make this a runtime check to only call setidt() if you detect > you are under the appropriate hypervisor? > > Also, bhyve currently has a hackish way of requesting a free IDT slot. > Perhaps it would be best if I added little API to reserve an IDT slot assuming > that callers could accept a dynamic IDT vector rather than a static one. That would work for Xen. The IDT vector doesn't need to be fixed since it's registered with Xen when the system boots. Roger. From owner-freebsd-virtualization@FreeBSD.ORG Wed Aug 20 16:34:27 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 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A9232965 for ; Wed, 20 Aug 2014 16:34:27 +0000 (UTC) Received: from hydra.pix.net (hydra.pix.net [IPv6:2001:470:e254::4]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7E0123572 for ; Wed, 20 Aug 2014 16:34:27 +0000 (UTC) Received: from torb.pix.net (torb.pix.net [IPv6:2001:470:e254:10:12dd:b1ff:febf:eca9]) (authenticated bits=0) by hydra.pix.net (8.14.8/8.14.8) with ESMTP id s7KGYPKK040670; Wed, 20 Aug 2014 12:34:25 -0400 (EDT) (envelope-from lidl@pix.net) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.98.1 at mail.pix.net Message-ID: <53F4CE11.4070403@pix.net> Date: Wed, 20 Aug 2014 12:34:25 -0400 From: Kurt Lidl User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 MIME-Version: 1.0 To: freebsd-virtualization@freebsd.org Subject: Re: libvirt and rebooting of a bhyve VM 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.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: Wed, 20 Aug 2014 16:34:27 -0000 On Tue, Aug 19, 2014, Craig Rodriques wrote: > On Tue, Aug 19, 2014 at 12:18 PM, Allan Jude wrote: >> >> The name of the vm is in the title of the bhyve process, but yes, it > > Hmm, OK, that would require me to grep the processes and send SIGTERM > to the right pid. > That's not ideal, especially if I start lots of VM's, but it is workable. I would think that hacking in support to the bhyve program to use pidfile_write() in libutil, with something like: /var/run/bhyve.vmname.pid as the default pathname for the pidfile would make this a lot easier to manage from a script. -Kurt From owner-freebsd-virtualization@FreeBSD.ORG Wed Aug 20 18:09:27 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 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6FF9652D; Wed, 20 Aug 2014 18:09:27 +0000 (UTC) Received: from mail-qc0-x233.google.com (mail-qc0-x233.google.com [IPv6:2607:f8b0:400d:c01::233]) (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 F25C232CD; Wed, 20 Aug 2014 18:09:26 +0000 (UTC) Received: by mail-qc0-f179.google.com with SMTP id m20so8043244qcx.38 for ; Wed, 20 Aug 2014 11:09:26 -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:content-transfer-encoding; bh=rpfhyTrWXSaDNoQ0vRyWpYIV3ZMpB7tCNjjy9foBTGQ=; b=LL64HgwQQUN3SJPjch3PF2jk1uVZebx8Lc1EIu7j8pW0uqfYb1WVYhAPyS6oicHSR4 TcaMszQOB/7D0e+ud5DrfJ/JuRgaAn0YZzPKJYDmQJ2TXaDhRBFZsc2J7ZnXZ/xuQ4JC VCzV2DwjmJ/t3eKk+6tPi59e6rPS5juuqbD/m/1m9a6ooUrkpzYeAwmozLUnXS+eeWdL BjdKpAG1RHWXRXyctGYtQXWwBUW6FvsrRX2RSn8K/AsE2D4tq/Q1o78i9OCLbJNh4kej FEHOKZLXDywNjbdeKaQYeX6kZ3fXfLPLOqjFvljP4SzQxGQNSWpVfi0OL1cE5oEuWgVZ Yyyw== MIME-Version: 1.0 X-Received: by 10.140.83.242 with SMTP id j105mr69306093qgd.38.1408558164957; Wed, 20 Aug 2014 11:09:24 -0700 (PDT) Received: by 10.140.84.80 with HTTP; Wed, 20 Aug 2014 11:09:24 -0700 (PDT) In-Reply-To: <201408201131.29399.jhb@freebsd.org> References: <3defccd56bc0407c88bdda139b2462ac@BY1PR0301MB0902.namprd03.prod.outlook.com> <53F4A34A.4010807@citrix.com> <201408201131.29399.jhb@freebsd.org> Date: Wed, 20 Aug 2014 11:09:24 -0700 Message-ID: Subject: Re: Directly reserve an interrupt IDT entry for Hyper-V From: Neel Natu To: John Baldwin Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: "freebsd-xen@freebsd.org" , freebsd-drivers@freebsd.org, "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: Wed, 20 Aug 2014 18:09:27 -0000 Hi John, On Wed, Aug 20, 2014 at 8:31 AM, John Baldwin wrote: > On Wednesday, August 20, 2014 9:31:54 am Roger Pau Monn=C3=A9 wrote: >> On 20/08/14 11:19, Wei Hu wrote: >> > Hello, >> > >> > Sending to Xen, drivers and virtualization mailing lists since this mi= ght > be of interest to the folks on these aliases. >> > >> > I am working for Microsoft to improve the performance of FreeBSD runni= ng > on Hyper-V. Right now I am adding a feature in the vmbus driver which cou= ld > handle the host-guest channel communications on all vCPUs simultaneously.= In > order to achieve this, the hypervisor will send same interrupt concurrent= ly on > all the vCPUs. The traditional way on FreeBSD to set up interrupt handlin= g for > devicse, such as calling bus_alloc_resource() to reserve an IRQ line, and= then > calling bus_setup_intr() to create a vector, doesn't seem to work in this > case. It seems if the interrupt is routed via legacy IRQ, it can only be > active on one vCPU at a time. In order to allow the same interrupt to be > handled on all vCPUs concurrently, all I need is an IDT entry, not an IRQ > line. >> > >> > I checked current FreeBSD code. It looks to me Xen directly uses the > vector number IDT_EVTCHN (0x93) to achieve the same purpose. I am proposi= ng > both Xen and Hyper-V share this same vector. Following is a little bit de= tail > of my proposal for the changes in the current kernel. >> > >> > >> > 1. In machdep.c: >> > >> > #ifdef XENHVM >> > >> > setidt(IDT_EVTCHN, &IDTVEC(xen_intr_upcall), SDT_SYSIGT, SEL_U= PL, > 0); >> > >> > #else >> > >> > setidt(IDT_EVTCHN, &IDTVEC(hv_vmbus_intr), SDT_SYSIGT, SEL_UPL= , > 0); >> > >> > #endif >> > >> > 2. Apic_vector.S >> > >> > Add IDTVEC(hv_vmbus_intr) to call Hyper-V vmbus interrupt service rout= ine. >> > >> > Any thoughts, objections and feedbacks are all welcome. >> >> Hello, >> >> I don't think using the same IDT vector is the right approach, I would >> just pick a different IDT vector and use that for Hyper-V. Using the >> same IDT vector (like your suggestion above) would prevent shipping a >> kernel with with both Hyper-V and Xen support (like it's done now in >> GENERIC). >> >> Roger. > > Hmm, can't you make this a runtime check to only call setidt() if you det= ect > you are under the appropriate hypervisor? > > Also, bhyve currently has a hackish way of requesting a free IDT slot. > Perhaps it would be best if I added little API to reserve an IDT slot ass= uming > that callers could accept a dynamic IDT vector rather than a static one. > Yup, it'll be good to get rid of vmm_ipi.c. best Neel > -- > John Baldwin > _______________________________________________ > freebsd-virtualization@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-virtualization > To unsubscribe, send any mail to "freebsd-virtualization-unsubscribe@free= bsd.org" From owner-freebsd-virtualization@FreeBSD.ORG Wed Aug 20 18:51:19 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 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A0DA3C6E; Wed, 20 Aug 2014 18:51:19 +0000 (UTC) Received: from mail-la0-x22e.google.com (mail-la0-x22e.google.com [IPv6:2a00:1450:4010:c03::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 C0C9B3906; Wed, 20 Aug 2014 18:51:18 +0000 (UTC) Received: by mail-la0-f46.google.com with SMTP id b8so7663947lan.19 for ; Wed, 20 Aug 2014 11:51:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=RNeoimFyWpErDsyz8234ZP3cYuO/FPTuC4SHoxON4GE=; b=Q9ybvduJl9SrDPkC/oiwsiJHDpH4ma2f3vbmOXLarq0rN09oVFs1jucEsdLcMswbqL 8w3TyrLjJvjE6yKYRrob0JqcbrCDDEq9g1vh83bSuPUGUUs+Cmduo7C5Cth4vViJi+Wg 3gv14r969dkRgLqifutUy98n7yOibEl8sNfPul6NJR4lNfK0/i0bEDPNT2yBJnPZQ7+R V8RfsatWm0/jdYntRNUCUgmPBI+osG7lfdobGUnjUBceJMZp2yfsUHflcFp/bVIFcLkf KC4cZ71ltLiT2tE+sL+hACrUNADIVEV4SsanPjbnFmEtt/2ta3lLF0g3iQhEakMPIUpc qlmw== MIME-Version: 1.0 X-Received: by 10.112.169.35 with SMTP id ab3mr41534674lbc.41.1408560676695; Wed, 20 Aug 2014 11:51:16 -0700 (PDT) Sender: crodr001@gmail.com Received: by 10.112.197.107 with HTTP; Wed, 20 Aug 2014 11:51:16 -0700 (PDT) In-Reply-To: <201408201115.50392.jhb@freebsd.org> References: <201408191332.48730.jhb@freebsd.org> <201408201115.50392.jhb@freebsd.org> Date: Wed, 20 Aug 2014 11:51:16 -0700 X-Google-Sender-Auth: FUnKJ5L2bieGvBna7Xl6m27YP_c Message-ID: Subject: Re: libvirt and rebooting of a bhyve VM From: Craig Rodrigues To: John Baldwin Content-Type: multipart/mixed; boundary=001a11c2696ac78693050114164b 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: Wed, 20 Aug 2014 18:51:19 -0000 --001a11c2696ac78693050114164b Content-Type: text/plain; charset=ISO-8859-1 On Wed, Aug 20, 2014 at 8:15 AM, John Baldwin wrote: > It probably would be good to document the return codes in the man page, but > eventually they will all go away. The long term plan is to make bhyve operate > more like other hypervisors in which case a single process invocation will > mimic a power-on to power-off cycle of a machine and you wouldn't need > vmrun.sh at all (you would just run bhyve with appropriate args / config > file). In that case, the return codes will change since it won't exit for > reboots anymore. Hi, I wasn't aware of the longer term direction of bhyve. If the return codes may change in the future, I don't know if it is a good idea to document them in the man page. However, documenting the return codes in comments in the vmrun.sh script might be OK, since it is just an example that can be changed easily. What do you think of these changes to vmrun.sh: (1) Move bhyvectl --destroy outside of the while loop. It doesn't need to run if the VM has been reset. (2) Write some comments about return code of bhyve process. -- Craig --001a11c2696ac78693050114164b Content-Type: text/plain; charset=US-ASCII; name="vmrun.sh.diff.txt" Content-Disposition: attachment; filename="vmrun.sh.diff.txt" Content-Transfer-Encoding: base64 X-Attachment-Id: f_hz30jy340 LS0tIHNoYXJlL2V4YW1wbGVzL2JoeXZlL3ZtcnVuLnNoLm9yaWcJMjAxNC0wOC0yMCAxMTozODow OS43ODg3MTQ5MDUgLTA3MDAKKysrIHNoYXJlL2V4YW1wbGVzL2JoeXZlL3ZtcnVuLnNoCTIwMTQt MDgtMjAgMTE6NDM6MTQuMTU4NzA2ODIxIC0wNzAwCkBAIC0xNzMsOSArMTczLDkgQEAKIAogdmly dGlvX2Rpc2tkZXY9IiRkaXNrX2RldjAiCiAKLXdoaWxlIFsgMSBdOyBkbwotCSR7QkhZVkVDVEx9 IC0tdm09JHt2bW5hbWV9IC0tZGVzdHJveSA+IC9kZXYvbnVsbCAyPiYxCiske0JIWVZFQ1RMfSAt LXZtPSR7dm1uYW1lfSAtLWRlc3Ryb3kgPiAvZGV2L251bGwgMj4mMQogCit3aGlsZSBbIDEgXTsg ZG8KIAlmaWxlICR7dmlydGlvX2Rpc2tkZXZ9IHwgZ3JlcCAiYm9vdCBzZWN0b3IiID4gL2Rldi9u dWxsCiAJcmM9JD8KIAlpZiBbICRyYyAtbmUgMCBdOyB0aGVuCkBAIC0yMzcsNiArMjM3LDE0IEBA CiAJCS1sIGNvbTEsJHtjb25zb2xlfQkJCQkJXAogCQkke2luc3RhbGxlcl9vcHR9CQkJCQlcCiAJ CSR7dm1uYW1lfQorCSMKKwkjIGJoeXZlIHJldHVybnMgdGhlIGZvbGxvd2luZyBzdGF0dXMgY29k ZXM6CisJIyAgMCAtIFZNIGhhcyBiZWVuIHJlc2V0CisJIyAgMSAtIFZNIGhhcyBiZWVuIHBvd2Vy ZWQgb2ZmCisJIyAgMiAtIFZNIGhhcyBiZWVuIGhhbHRlZAorCSMgIDMgLSBWTSBnZW5lcmF0ZWQg YSB0cmlwbGUgZmF1bHQKKwkjICBhbGwgb3RoZXIgbm9uLXplcm8gc3RhdHVzIGNvZGVzIGFyZSBl cnJvcnMKKwkjCiAJaWYgWyAkPyAtbmUgMCBdOyB0aGVuCiAJCWJyZWFrCiAJZmkK --001a11c2696ac78693050114164b-- From owner-freebsd-virtualization@FreeBSD.ORG Wed Aug 20 19:10:38 2014 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 ESMTPS id 885DA2C6 for ; Wed, 20 Aug 2014 19:10:38 +0000 (UTC) Received: from mail-lb0-x229.google.com (mail-lb0-x229.google.com [IPv6:2a00:1450:4010:c04::229]) (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 0B8F93AC3 for ; Wed, 20 Aug 2014 19:10:37 +0000 (UTC) Received: by mail-lb0-f169.google.com with SMTP id s7so7305989lbd.28 for ; Wed, 20 Aug 2014 12:10:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=w/TDlENb1gJydeL1YvJeTEXFYUEY+J2JbH//2AmpK7s=; b=kIfAS3RjMgLDltHg8XiL8/MIGVp7AZ5tTigLBGKN8xxFdXe8EXxaQzfEiPc3N39oix NYYSVXtyYkZfqmrEMyO0KOkcK13tIsAzGQQm1o8C5TNPK47Wj0ScuxAUiSdB01c551nx TKgP8L80yNYnhKoQs5kOPEFQFxposthDt6K5STF8GzJFKFWwnX0ap+5FgXWz65eVQMtV DJd26u8G5p/eg60WekHoKwgB+MAgFkSuuwp+FT3GsAfX3hPHRx9qZczuoT+EJqqTI8R8 00iyYRjtFMaWJa0+yOzQ7eI2s6IQTrmFZMYHe//eVIqBM8iBY7/lZqkBRVl9e8qe0VU1 fOsQ== X-Received: by 10.152.9.100 with SMTP id y4mr44540084laa.26.1408561835921; Wed, 20 Aug 2014 12:10:35 -0700 (PDT) Received: from kloomba ([95.104.142.245]) by mx.google.com with ESMTPSA id y1sm14919791laj.5.2014.08.20.12.10.34 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 20 Aug 2014 12:10:35 -0700 (PDT) Sender: Roman Bogorodskiy Date: Wed, 20 Aug 2014 23:09:18 +0400 From: Roman Bogorodskiy To: Kurt Lidl Subject: Re: libvirt and rebooting of a bhyve VM Message-ID: <20140820190915.GA99929@kloomba> References: <53F4CE11.4070403@pix.net> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="LZvS9be/3tNcYl/X" Content-Disposition: inline In-Reply-To: <53F4CE11.4070403@pix.net> User-Agent: Mutt/1.5.23 (2014-03-12) 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: Wed, 20 Aug 2014 19:10:38 -0000 --LZvS9be/3tNcYl/X Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Kurt Lidl wrote: > On Tue, Aug 19, 2014, Craig Rodriques wrote: > > On Tue, Aug 19, 2014 at 12:18 PM, Allan Jude = wrote: > >> > >> The name of the vm is in the title of the bhyve process, but yes, it > > > > Hmm, OK, that would require me to grep the processes and send SIGTERM > > to the right pid. > > That's not ideal, especially if I start lots of VM's, but it is workabl= e. >=20 > I would think that hacking in support to the bhyve program to use > pidfile_write() in libutil, with something like: > /var/run/bhyve.vmname.pid > as the default pathname for the pidfile would make this a lot > easier to manage from a script. IMHO, as for the pidfile, it's the thing that could be easily done in the script itself. What would be really good from my point of view is to have a control socket (Unix socket) and support for some sort of a protocol encoded in a machine readable format. So it could be used to request VM information, perform actions on it, doing a dynamic configuration (e.g. plugging devices etc). Also, it'd be easier to monitor a socket presence than a pid. Of course, all this could be done by extending bhyvectl as well. This way seems less convenient from me because from the scripting point of view command line application features are much harder to probe than doing the same via a defined protocol. Roman Bogorodskiy --LZvS9be/3tNcYl/X Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.13 (FreeBSD) iQEcBAEBAgAGBQJT9PJbAAoJEMltX/4IwiJqPsoH/RMqlKxsBIGnHg+AAopsrao+ uLxy6e3LvyB5sXCwAYnVxQDQZTjgYHu73EncnI8quWlT1JtYDwVBIqvSvaCyXZiB lrFo6GIOkfEOsAQxSOpU1/2mO3VnRKt4EXly9I3i4oQQ2ymR9mCKCHO5Q/WnCHeA doU59z7poGp4EExW7OhCGx1My2CK6tmVclUG6ZxE+Bbjv0/7B9jfvcNfJdFQdWtm iiSPIeF+V0s4w2wxn0M/KtZjk3diDWLdOrciDXYXtmtUjJG+Krvu7mVqrPeOBRTc 7eh7FAcZ2oWgnvEm4c2FrqQLfJLFR2BRNspm7NOuHYz48xfNIsqAwOkMIUd9YRE= =gyJm -----END PGP SIGNATURE----- --LZvS9be/3tNcYl/X-- From owner-freebsd-virtualization@FreeBSD.ORG Thu Aug 21 03:24:53 2014 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 ESMTPS id F17947A8; Thu, 21 Aug 2014 03:24:52 +0000 (UTC) Received: from na01-bn1-obe.outbound.protection.outlook.com (mail-bn1blp0189.outbound.protection.outlook.com [207.46.163.189]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client CN "mail.protection.outlook.com", Issuer "MSIT Machine Auth CA 2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 2C1E23AF5; Thu, 21 Aug 2014 03:24:50 +0000 (UTC) Received: from BY1PR0301MB0902.namprd03.prod.outlook.com (25.160.195.141) by BY1PR0301MB0902.namprd03.prod.outlook.com (25.160.195.141) with Microsoft SMTP Server (TLS) id 15.0.1005.10; Thu, 21 Aug 2014 03:24:48 +0000 Received: from BY1PR0301MB0902.namprd03.prod.outlook.com ([25.160.195.141]) by BY1PR0301MB0902.namprd03.prod.outlook.com ([25.160.195.141]) with mapi id 15.00.1005.008; Thu, 21 Aug 2014 03:24:48 +0000 From: Wei Hu To: =?iso-8859-1?Q?Roger_Pau_Monn=E9?= , John Baldwin , "freebsd-drivers@freebsd.org" Subject: RE: Directly reserve an interrupt IDT entry for Hyper-V Thread-Topic: Directly reserve an interrupt IDT entry for Hyper-V Thread-Index: Ac+8UT9e97G9LT7sSf25pxsUhlOuiAAKdvMAAAQtKYAAAiW0AAAWpWPQ Date: Thu, 21 Aug 2014 03:24:48 +0000 Message-ID: <07ddd62e6cc84509aa76aa299c8dbd3c@BY1PR0301MB0902.namprd03.prod.outlook.com> References: <3defccd56bc0407c88bdda139b2462ac@BY1PR0301MB0902.namprd03.prod.outlook.com> <53F4A34A.4010807@citrix.com> <201408201131.29399.jhb@freebsd.org> <53F4CDBA.8040500@citrix.com> In-Reply-To: <53F4CDBA.8040500@citrix.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [167.220.232.169] x-microsoft-antispam: BCL:0;PCL:0;RULEID:;UriScan:; x-forefront-prvs: 0310C78181 x-forefront-antispam-report: SFV:NSPM; SFS:(6009001)(479174003)(199003)(13464003)(377454003)(189002)(51704005)(24454002)(74502001)(101416001)(93886004)(76482001)(74316001)(87936001)(33646002)(31966008)(99286002)(83322001)(46102001)(85306004)(50986999)(86612001)(81542001)(74662001)(99396002)(19580395003)(54356999)(95666004)(105586002)(4396001)(77096002)(76176999)(19580405001)(77982001)(21056001)(83072002)(80022001)(66066001)(106356001)(20776003)(107046002)(64706001)(92566001)(81342001)(86362001)(76576001)(108616004)(2656002)(85852003)(24736002); DIR:OUT; SFP:; SCL:1; SRVR:BY1PR0301MB0902; H:BY1PR0301MB0902.namprd03.prod.outlook.com; FPR:; MLV:sfv; PTR:InfoNoRecords; A:1; MX:1; LANG:en; Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: microsoft.onmicrosoft.com Cc: "freebsd-xen@freebsd.org" , "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: Thu, 21 Aug 2014 03:24:53 -0000 Hi Roger and John, I will request a free IDT slot instead of sharing the same vector with Xen.= It would be great to have an API to do this. Before the API is available, = I will probably use the same way as in vmm_ipi.c to find a free slot. Thanks so much for your help, Wei =20 -----Original Message----- From: Roger Pau Monn=E9 [mailto:roger.pau@citrix.com]=20 Sent: Thursday, August 21, 2014 12:33 AM To: John Baldwin; freebsd-drivers@freebsd.org Cc: Wei Hu; freebsd-xen@freebsd.org; freebsd-virtualization@freebsd.org Subject: Re: Directly reserve an interrupt IDT entry for Hyper-V On 20/08/14 17:31, John Baldwin wrote: > On Wednesday, August 20, 2014 9:31:54 am Roger Pau Monn=E9 wrote: >> Hello, >> >> I don't think using the same IDT vector is the right approach, I=20 >> would just pick a different IDT vector and use that for Hyper-V.=20 >> Using the same IDT vector (like your suggestion above) would prevent=20 >> shipping a kernel with with both Hyper-V and Xen support (like it's=20 >> done now in GENERIC). >> >> Roger. >=20 > Hmm, can't you make this a runtime check to only call setidt() if you=20 > detect you are under the appropriate hypervisor? >=20 > Also, bhyve currently has a hackish way of requesting a free IDT slot. =20 > Perhaps it would be best if I added little API to reserve an IDT slot=20 > assuming that callers could accept a dynamic IDT vector rather than a sta= tic one. That would work for Xen. The IDT vector doesn't need to be fixed since it's= registered with Xen when the system boots. Roger. From owner-freebsd-virtualization@FreeBSD.ORG Thu Aug 21 11:32:51 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 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 25F07A34 for ; Thu, 21 Aug 2014 11:32:51 +0000 (UTC) Received: from www94.your-server.de (www94.your-server.de [213.133.104.94]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9039739F9 for ; Thu, 21 Aug 2014 11:32:49 +0000 (UTC) Received: from [188.104.2.112] (helo=[192.168.0.102]) by www94.your-server.de with esmtpsa (TLSv1:DHE-RSA-AES256-SHA:256) (Exim 4.80.1) (envelope-from ) id 1XKQH0-0004kr-67 for freebsd-virtualization@freebsd.org; Thu, 21 Aug 2014 13:11:18 +0200 Subject: -stable / bhyve / vmrc / centos65: no network card From: Mathias Picker To: freebsd-virtualization@freebsd.org Content-Type: text/plain; charset="UTF-8" Organization: virtual earth GmbH Date: Thu, 21 Aug 2014 13:11:14 +0200 Message-ID: <1408619474.2442.116.camel@marcopolo.fritz.box> Mime-Version: 1.0 X-Mailer: Evolution 2.32.1 FreeBSD GNOME Team Port Content-Transfer-Encoding: 8bit X-Authenticated-Sender: Mathias.Picker@virtual-earth.de X-Virus-Scanned: Clear (ClamAV 0.98.4/19297/Thu Aug 21 03:04:55 2014) 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: Thu, 21 Aug 2014 11:32:51 -0000 Hi all, I'm a total beginner with bhyve, so I thought I'd start with the vmrc script. I installed a centos65amd64iso image, and after some struggling with grub everything works nicely - but I have no network card. I tried to go through the documentation, and for me, everything looks ok. Since I'm new in this, that is probably wrong ;) So, here is the relevant config info: twin# uname -a FreeBSD twin 10.0-STABLE FreeBSD 10.0-STABLE #2 r270167: Tue Aug 19 15:46:15 CEST 2014 root@twin:/usr/obj/usr/src/sys/GENERIC amd64 twin# ifconfig igb0: flags=8943 metric 0 mtu 1500 options=400b8 ether 0c:c4:7a:05:81:be inet 1yy netmask 0xffffffc0 broadcast 1yy inet6 fe80::ec4:7aff:fe05:81be%igb0 prefixlen 64 scopeid 0x1 inet 1xx netmask 0xfffffff8 broadcast 1 inet 1xx netmask 0xffffffff broadcast 1 inet 1xx netmask 0xffffffff broadcast 1 inet 1xx netmask 0xffffffff broadcast 1 inet 1xx netmask 0xffffffff broadcast 1 inet 1xx netmask 0xffffffff broadcast 1 inet 1xx netmask 0xffffffff broadcast 1 nd6 options=29 media: Ethernet autoselect (1000baseT ) status: active lo0: flags=8049 metric 0 mtu 16384 options=600003 inet6 ::1 prefixlen 128 inet6 fe80::1%lo0 prefixlen 64 scopeid 0x2 inet 127.0.0.1 netmask 0xff000000 nd6 options=21 bridge0: flags=8843 metric 0 mtu 1500 ether 02:3d:80:23:57:00 nd6 options=1 id 00:00:00:00:00:00 priority 32768 hellotime 2 fwddelay 15 maxage 20 holdcnt 6 proto rstp maxaddr 2000 timeout 1200 root id 00:00:00:00:00:00 priority 32768 ifcost 0 port 0 member: tap8000 flags=143 ifmaxaddr 0 port 5 priority 128 path cost 2000000 member: igb0 flags=143 ifmaxaddr 0 port 1 priority 128 path cost 20000 tap0: flags=8802 metric 0 mtu 1500 options=80000 ether 00:bd:15:8e:4a:00 nd6 options=21 media: Ethernet autoselect status: no carrier tap8000: flags=8943 metric 0 mtu 1500 options=80000 ether 00:bd:76:11:59:40 nd6 options=29 media: Ethernet autoselect status: active Opened by PID 30817 bhyve is started like this: /usr/sbin/bhyve -c 1 -m 2048 -A -H -W -s 0,hostbridge -s 2,ahci-hd,/usr/local/vmrc/vm//zimbra-centos-six.five0/zimbra-c entos-six.five0.img -s 3:0,virtio-net,tap8000 -s 5,lpc -l com1,stdio zimbra-centos-six.five0 So, from what I understand, the tap device is created, bridged, and put correctly in the bhyve incantation. So: why do I not have a network card in centos: [root@localhost ~]# ifconfig lo Link encap:Lokale Schleife inet Adresse:127.0.0.1 Maske:255.0.0.0 inet6 Adresse: ::1/128 Gül tigkeitsbereich:Maschine UP LOOPBACK RUNNING MTU:16436 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 Kollisionen:0 Sendewarteschlangenl��nge:0 RX bytes:0 (0.0 b) TX bytes:0 (0.0 b) [root@localhost ~]# Any help, pointers, ideas very welcome! Thanks, Mathias P.S.: centos dmesg: Initializing cgroup subsys cpuset Initializing cgroup subsys cpu Linux version 2.6.32-431.el6.x86_64 (mockbuild@c6b8.bsys.dev.centos.org) (gcc version 4.4.7 20120313 (Red Hat 4.4.7-4) (GCC) ) #1 SMP Fri Nov 22 03:15:09 UTC 2013 Command line: console=ttyS0 BOOT_IMAGE=(hd0,msdos1)/vmlinuz-2.6.32-431.el6.x86_64 ro root=/dev/mapper/VolGroup-lv_root KERNEL supported cpus: Intel GenuineIntel AMD AuthenticAMD Centaur CentaurHauls BIOS-provided physical RAM map: BIOS-e820: 0000000000000000 - 000000000009ffff (usable) BIOS-e820: 0000000000100000 - 0000000080000000 (usable) DMI 2.4 present. SMBIOS version 2.4 @ 0xF1000 DMI: BHYVE, BIOS 1.00 03/14/2014 e820 update range: 0000000000000000 - 0000000000001000 (usable) ==> (reserved) e820 remove range: 00000000000a0000 - 0000000000100000 (usable) last_pfn = 0x80000 max_arch_pfn = 0x400000000 initial memory mapped : 0 - 20000000 Using GB pages for direct mapping init_memory_mapping: 0000000000000000-0000000080000000 0000000000 - 0080000000 page 1G kernel direct mapping tables up to 80000000 @ 8000-9000 RAMDISK: 031f8000 - 040779b0 ACPI: RSDP 00000000000f2400 00024 (v02 BHYVE ) ACPI: XSDT 00000000000f2480 00044 (v01 BHYVE BVXSDT 00000001 INTL 20130823) ACPI: APIC 00000000000f2500 0005A (v01 BHYVE BVMADT 00000001 INTL 20130823) ACPI: FACP 00000000000f2600 0010C (v05 BHYVE BVFACP 00000001 INTL 20130823) ACPI Warning: FADT (revision 5) is longer than ACPI 2.0 version, truncating length 0x10C to 0xF4 (20090903/tbfadt-288) ACPI: DSDT 00000000000f2800 008DE (v02 BHYVE BVDSDT 00000001 INTL 20130823) ACPI: FACS 00000000000f27c0 00040 ACPI: HPET 00000000000f2740 00038 (v01 BHYVE BVHPET 00000001 INTL 20130823) ACPI: MCFG 00000000000f2780 0003C (v01 BHYVE BVMCFG 00000001 INTL 20130823) ACPI: Local APIC address 0xfee00000 system APIC only can use physical flat Setting APIC routing to physical flat. No NUMA configuration found Faking a node at 0000000000000000-0000000080000000 Bootmem setup node 0 0000000000000000-0000000080000000 NODE_DATA [0000000000008000 - 000000000003bfff] bootmap [000000000003c000 - 000000000004bfff] pages 10 (6 early reservations) ==> bootmem [0000000000 - 0080000000] #0 [0000000000 - 0000001000] BIOS data page ==> [0000000000 - 0000001000] #1 [0000006000 - 0000008000] TRAMPOLINE ==> [0000006000 - 0000008000] #2 [0001000000 - 000201faa4] TEXT DATA BSS ==> [0001000000 - 000201faa4] #3 [00031f8000 - 00040779b0] RAMDISK ==> [00031f8000 - 00040779b0] #4 [000009f000 - 0000100000] BIOS reserved ==> [000009f000 - 0000100000] #5 [0002020000 - 000202007d] BRK ==> [0002020000 - 000202007d] found SMP MP-table at [ffff8800000f0000] f0000 [ffffea0000000000-ffffea00009fffff] PMD -> [ffff880002600000-ffff880002ffffff] on node 0 [ffffea0000a00000-ffffea0001bfffff] PMD -> [ffff880004200000-ffff8800053fffff] on node 0 Zone PFN ranges: DMA 0x00000001 -> 0x00001000 DMA zone: 100 pages reserved DMA zone: 3842 pages, LIFO batch:0 DMA32 zone: 7112 pages used for memmap DMA32 zone: 513080 pages, LIFO batch:31 ACPI: PM-Timer IO Port: 0x408 ACPI: Local APIC address 0xfee00000 system APIC only can use physical flat Setting APIC routing to physical flat. ACPI: LAPIC (acpi_id[0x00] lapic_id[0x00] enabled) ACPI: LAPIC_NMI (acpi_id[0xff] high edge lint[0x1]) ACPI: IOAPIC (id[0x00] address[0xfec00000] gsi_base[0]) IOAPIC[0]: apic_id 0, version 17, address 0xfec00000, GSI 0-23 ACPI: INT_SRC_OVR (bus 0 bus_irq 0 global_irq 2 high edge) ACPI: INT_SRC_OVR (bus 0 bus_irq 9 global_irq 9 low level) ACPI: IRQ0 used by override. ACPI: IRQ2 used by override. ACPI: IRQ9 used by override. Using ACPI (MADT) for SMP configuration information ACPI: HPET id: 0x80868701 base: 0xfed00000 SMP: Allowing 1 CPUs, 0 hotplug CPUs nr_irqs_gsi: 24 PM: Registered nosave memory: 000000000009f000 - 0000000000100000 Allocating PCI resources starting at 80000000 (gap: 80000000:80000000) Booting paravirtualized kernel on bare hardware NR_CPUS:4096 nr_cpumask_bits:1 nr_cpu_ids:1 nr_node_ids:1 PERCPU: Embedded 31 pages/cpu @ffff880002200000 s94872 r8192 d23912 u2097152 pcpu-alloc: s94872 r8192 d23912 u2097152 alloc=1*2097152 pcpu-alloc: [0] 0 Built 1 zonelists in Node order, mobility grouping on. Total pages: 516922 Policy zone: DMA32 Kernel command line: console=ttyS0 BOOT_IMAGE=(hd0,msdos1)/vmlinuz-2.6.32-431.el6.x86_64 ro root=/dev/mapper/VolGroup-lv_root PID hash table entries: 4096 (order: 3, 32768 bytes) xsave/xrstor: enabled xstate_bv 0x7, cntxt size 0x340 Checking aperture... No AGP bridge found Memory: 2036104k/2097152k available (5325k kernel code, 392k absent, 60656k reserved, 7013k data, 1276k init) Hierarchical RCU implementation. NR_IRQS:33024 nr_irqs:256 Console: colour dummy device 80x25 console [ttyS0] enabled allocated 8388608 bytes of page_cgroup please try 'cgroup_disable=memory' option if you don't want memory cgroups hpet clockevent registered Fast TSC calibration using PIT Detected 3499.273 MHz processor. Calibrating delay loop (skipped), value calculated using timer frequency.. 6998.54 BogoMIPS (lpj=3499273) pid_max: default: 32768 minimum: 301 Security Framework initialized SELinux: Initializing. SELinux: Starting in permissive mode Dentry cache hash table entries: 262144 (order: 9, 2097152 bytes) Inode-cache hash table entries: 131072 (order: 8, 1048576 bytes) Mount-cache hash table entries: 256 Initializing cgroup subsys ns Initializing cgroup subsys cpuacct Initializing cgroup subsys memory Initializing cgroup subsys devices Initializing cgroup subsys freezer Initializing cgroup subsys net_cls Initializing cgroup subsys blkio Initializing cgroup subsys perf_event Initializing cgroup subsys net_prio alternatives: switching to unfair spinlock SMP alternatives: switching to UP code Freeing SMP alternatives: 36k freed ACPI: Core revision 20090903 ftrace: converting mcount calls to 0f 1f 44 00 00 ftrace: allocating 21769 entries in 86 pages APIC routing finalized to physical flat. ..TIMER: vector=0x30 apic1=0 pin1=2 apic2=-1 pin2=-1 CPU0: Intel(R) Xeon(R) CPU E5-1650 v2 @ 3.50GHz stepping 04 Performance Events: unsupported p6 CPU model 62 no PMU driver, software events only. NMI watchdog disabled (cpu0): hardware events not enabled Brought up 1 CPUs Total of 1 processors activated (6998.54 BogoMIPS). sizeof(vma)=200 bytes sizeof(page)=56 bytes sizeof(inode)=592 bytes sizeof(dentry)=192 bytes sizeof(ext3inode)=800 bytes sizeof(buffer_head)=104 bytes sizeof(skbuff)=232 bytes sizeof(task_struct)=2648 bytes devtmpfs: initialized regulator: core version 0.5 NET: Registered protocol family 16 ACPI FADT declares the system doesn't support PCIe ASPM, so disable it ACPI: bus type pci registered PCI: MCFG configuration 0: base e0000000 segment 0 buses 0 - 255 PCI: Not using MMCONFIG. PCI: Using configuration type 1 for base access bio: create slab at 0 ACPI: EC: Look up EC in DSDT ACPI: Interpreter enabled ACPI: (supports S0 S5) ACPI: Using IOAPIC for interrupt routing PCI: MCFG configuration 0: base e0000000 segment 0 buses 0 - 255 PCI: MCFG area at e0000000 reserved in ACPI motherboard resources PCI: Using MMCONFIG at e0000000 - efffffff ACPI: No dock devices found. PCI: Using host bridge windows from ACPI; if necessary, use "pci=nocrs" and report a bug ACPI: PCI Root Bridge [PC00] (domain 0000 [bus 00]) pci_root PNP0A03:00: host bridge window [io 0x0000-0x0cf7] pci_root PNP0A03:00: host bridge window [io 0x0d00-0x1fff] pci_root PNP0A03:00: host bridge window [io 0x2000-0x203f] pci_root PNP0A03:00: host bridge window [mem 0xc0000000-0xc01fffff] pci_root PNP0A03:00: host bridge window [mem 0xd000000000-0xd0000fffff] PCI host bridge to bus 0000:00 pci_bus 0000:00: root bus resource [io 0x0000-0x0cf7] pci_bus 0000:00: root bus resource [io 0x0d00-0x1fff] pci_bus 0000:00: root bus resource [io 0x2000-0x203f] pci_bus 0000:00: root bus resource [mem 0xc0000000-0xc01fffff] pci_bus 0000:00: root bus resource [mem 0xd000000000-0xd0000fffff] pci 0000:00:00.0: ignoring class 600 (doesn't match header type 01) pci 0000:00:02.0: reg 24: [mem 0xc0000000-0xc00003ff] pci 0000:00:02.0: reg 30: [mem 0x00000000-0x000007ff pref] pci 0000:00:03.0: reg 10: [io 0x2000-0x201f] pci 0000:00:03.0: reg 30: [mem 0x00000000-0x000007ff pref] pci 0000:00:05.0: reg 30: [mem 0x00000000-0x000007ff pref] pci 0000:00:00.0: PCI bridge to [bus 01-ff] pci 0000:00:00.0: bridge window [io 0x0000-0x0000] (disabled) pci 0000:00:00.0: bridge window [mem 0x00000000-0x000fffff] (disabled) pci 0000:00:00.0: bridge window [mem 0x00000000-0x000fffff pref] (disabled) ACPI: PCI Interrupt Routing Table [\_SB_.PC00._PRT] pci0000:00: Requesting ACPI _OSC control (0x1d) ACPI: PCI Interrupt Link [LNKH] (IRQs 3 4 5 6 7 9 10 11 12 14 15) *0, disabled. vgaarb: loaded SCSI subsystem initialized libata version 3.00 loaded. usbcore: registered new interface driver usbfs usbcore: registered new interface driver hub usbcore: registered new device driver usb PCI: Using ACPI for IRQ routing PCI: old code would have set cacheline size to 32 bytes, but clflush_size = 64 PCI: pci_cache_line_size set to 64 bytes lo: Dropping TSO features since no CSUM feature. NetLabel: Initializing NetLabel: domain hash size = 128 NetLabel: protocols = UNLABELED CIPSOv4 NetLabel: unlabeled traffic allowed by default alloc irq_desc for 24 on node 0 alloc kstat_irqs on node 0 HPET: 8 timers in total, 1 timers will be used for per-cpu timer hpet0: at MMIO 0xfed00000, IRQs 2, 8, 24, 0, 0, 0, 0, 0 hpet0: 8 comparators, 32-bit 10.000000 MHz counter hpet: hpet2 irq 24 for MSI Switching to clocksource hpet pnp: PnP ACPI init ACPI: bus type pnp registered pnp 00:00: [io 0x0cf8-0x0cff] pnp 00:00: Plug and Play ACPI device, IDs PNP0a03 (active) pnp 00:01: [io 0x0060] pnp 00:01: [io 0x0064] pnp 00:01: [io 0x0220-0x0223] pnp 00:01: [io 0x0224-0x0227] pnp 00:01: [mem 0xe0000000-0xefffffff] pnp 00:01: [io 0x04d0-0x04d1] pnp 00:01: [io 0x0061] pnp 00:01: [io 0x0400-0x0407] pnp 00:01: [io 0x00b2] pnp 00:01: [io 0x0084] pnp 00:01: [io 0x0072-0x0077] pnp 00:01: Plug and Play ACPI device, IDs PNP0c02 (active) pnp 00:02: [io 0x03f8-0x03ff] pnp 00:02: [irq 4] pnp 00:02: Plug and Play ACPI device, IDs PNP0501 (active) pnp 00:03: [io 0x02f8-0x02ff] pnp 00:03: [irq 3] pnp 00:03: Plug and Play ACPI device, IDs PNP0501 (active) pnp 00:04: [io 0x0070-0x0071] pnp 00:04: [irq 8] pnp 00:04: Plug and Play ACPI device, IDs PNP0b00 (active) pnp 00:05: [mem 0xfed00000-0xfed003ff] pnp 00:05: Plug and Play ACPI device, IDs PNP0103 (active) pnp: PnP ACPI: found 6 devices ACPI: ACPI bus type pnp unregistered system 00:01: [io 0x0220-0x0223] has been reserved system 00:01: [io 0x0224-0x0227] has been reserved system 00:01: [io 0x04d0-0x04d1] has been reserved system 00:01: [io 0x0400-0x0407] has been reserved system 00:01: [mem 0xe0000000-0xefffffff] has been reserved PCI: max bus depth: 1 pci_try_num: 2 pci 0000:00:02.0: BAR 6: assigned [mem 0xc0000800-0xc0000fff pref] pci 0000:00:03.0: BAR 6: assigned [mem 0xc0001000-0xc00017ff pref] pci 0000:00:05.0: BAR 6: assigned [mem 0xc0001800-0xc0001fff pref] pci 0000:00:00.0: not setting up bridge for bus 0000:01 pci 0000:00:00.0: setting latency timer to 64 pci_bus 0000:00: resource 4 [io 0x0000-0x0cf7] pci_bus 0000:00: resource 5 [io 0x0d00-0x1fff] pci_bus 0000:00: resource 6 [io 0x2000-0x203f] pci_bus 0000:00: resource 7 [mem 0xc0000000-0xc01fffff] pci_bus 0000:00: resource 8 [mem 0xd000000000-0xd0000fffff] NET: Registered protocol family 2 IP route cache hash table entries: 65536 (order: 7, 524288 bytes) TCP established hash table entries: 262144 (order: 10, 4194304 bytes) TCP bind hash table entries: 65536 (order: 8, 1048576 bytes) TCP: Hash tables configured (established 262144 bind 65536) TCP reno registered NET: Registered protocol family 1 pci 0000:00:05.0: Activating ISA DMA hang workarounds Trying to unpack rootfs image as initramfs... Freeing initrd memory: 14846k freed audit: initializing netlink socket (disabled) type=2000 audit(1408874607.353:1): initialized HugeTLB registered 2 MB page size, pre-allocated 0 pages VFS: Disk quotas dquot_6.5.2 Dquot-cache hash table entries: 512 (order 0, 4096 bytes) msgmni has been set to 4005 SELinux: Registering netfilter hooks alg: No test for stdrng (krng) ksign: Installing public key data Loading keyring - Added public key 8A44323FB303E068 - User ID: CentOS (Kernel Module GPG key) Block layer SCSI generic (bsg) driver version 0.4 loaded (major 251) io scheduler noop registered io scheduler anticipatory registered io scheduler deadline registered io scheduler cfq registered (default) pci_hotplug: PCI Hot Plug PCI Core version: 0.5 pciehp: PCI Express Hot Plug Controller Driver version: 0.4 acpiphp: ACPI Hot Plug PCI Controller Driver version: 0.5 ipmi message handler version 39.2 IPMI System Interface driver. ipmi_si: Adding default-specified kcs state machine ipmi_si: Trying default-specified kcs state machine at i/o address 0xca2, slave address 0x0, irq 0 ipmi_si: Interface detection failed ipmi_si: Adding default-specified smic state machine ipmi_si: Trying default-specified smic state machine at i/o address 0xca9, slave address 0x0, irq 0 ipmi_si: Interface detection failed ipmi_si: Adding default-specified bt state machine ipmi_si: Trying default-specified bt state machine at i/o address 0xe4, slave address 0x0, irq 0 ipmi_si: Interface detection failed ipmi_si: Unable to find any System Interface(s) input: Power Button as /devices/LNXSYSTM:00/LNXPWRBN:00/input/input0 ACPI: Power Button [PWRF] ACPI: acpi_idle registered with cpuidle ACPI Exception: AE_NOT_FOUND, No or invalid critical threshold (20090903/thermal-386) GHES: HEST is not enabled! Non-volatile memory driver v1.3 Linux agpgart interface v0.103 crash memory driver: version 1.1 Serial: 8250/16550 driver, 4 ports, IRQ sharing enabled serial8250: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A serial8250: ttyS1 at I/O 0x2f8 (irq = 3) is a 16550A 00:02: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A 00:03: ttyS1 at I/O 0x2f8 (irq = 3) is a 16550A brd: module loaded loop: module loaded input: Macintosh mouse button emulation as /devices/virtual/input/input1 i8042: probe of i8042 failed with error -5 mice: PS/2 mouse device common for all mice ACPI Error: Could not enable RealTimeClock event (20090903/evxfevnt-193) ACPI Warning: Could not enable fixed event 4 (20090903/evxface-146) rtc_cmos 00:04: rtc core: registered rtc_cmos as rtc0 cpuidle: using governor ladder cpuidle: using governor menu EFI Variables Facility v0.08 2004-May-17 usbcore: registered new interface driver hiddev usbcore: registered new interface driver usbhid usbhid: v2.6:USB HID core driver GRE over IPv4 demultiplexor driver TCP cubic registered Initializing XFRM netlink socket NET: Registered protocol family 17 registered taskstats version 1 drivers/rtc/hctosys.c: unable to open rtc device (rtc0) Initalizing network drop monitor service Freeing unused kernel memory: 1276k freed Write protecting the kernel read-only data: 10240k Freeing unused kernel memory: 800k freed Freeing unused kernel memory: 1588k freed dracut: dracut-004-335.el6 device-mapper: uevent: version 1.0.3 device-mapper: ioctl: 4.24.6-ioctl (2013-01-15) initialised: dm-devel@redhat.com udev: starting version 147 dracut: Starting plymouth daemon ahci 0000:00:02.0: version 3.0 alloc irq_desc for 16 on node -1 alloc kstat_irqs on node -1 ahci 0000:00:02.0: PCI INT A -> GSI 16 (level, low) -> IRQ 16 alloc irq_desc for 25 on node -1 alloc kstat_irqs on node -1 ahci 0000:00:02.0: irq 25 for MSI/MSI-X ahci: SSS flag set, parallel bus scan disabled ahci 0000:00:02.0: AHCI 0001.0300 32 slots 6 ports 6 Gbps 0x1 impl SATA mode ahci 0000:00:02.0: flags: 64bit ncq sntf ilck stag pm led clo pio slum part sxs apst ahci 0000:00:02.0: setting latency timer to 64 scsi0 : ahci scsi1 : ahci scsi2 : ahci scsi3 : ahci scsi4 : ahci scsi5 : ahci ata1: SATA max UDMA/133 abar m1024@0xc0000000 port 0xc0000100 irq 25 ata2: DUMMY ata3: DUMMY ata4: DUMMY ata5: DUMMY ata6: DUMMY ata1: SATA link up 3.0 Gbps (SStatus 123 SControl 300) ata1.00: ATA-8: BHYVE SATA DISK, 001, max UDMA/133 ata1.00: 207618048 sectors, multi 128: LBA48 NCQ (depth 31/32) ata1.00: applying bridge limits ata1.00: configured for UDMA/100 scsi 0:0:0:0: Direct-Access ATA BHYVE SATA DISK 001 PQ: 0 ANSI: 5 alloc irq_desc for 17 on node -1 alloc kstat_irqs on node -1 virtio-pci 0000:00:03.0: PCI INT A -> GSI 17 (level, low) -> IRQ 17 sd 0:0:0:0: [sda] 207618048 512-byte logical blocks: (106 GB/99.0 GiB) sd 0:0:0:0: [sda] Write Protect is off sd 0:0:0:0: [sda] Mode Sense: 00 3a 00 00 sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA sda: sda1 sda2 sd 0:0:0:0: [sda] Attached SCSI disk dracut: Scanning devices sda2 for LVM volume groups dracut: Reading all physical volumes. This may take a while... dracut: Found volume group "VolGroup" using metadata type lvm2 dracut: 3 logical volume(s) in volume group "VolGroup" now active EXT4-fs (dm-0): mounted filesystem with ordered data mode. Opts: dracut: Mounted root filesystem /dev/mapper/VolGroup-lv_root dracut: Loading SELinux policy type=1404 audit(1408874609.041:2): enforcing=1 old_enforcing=0 auid=4294967295 ses=4294967295 SELinux: 2048 avtab hash slots, 277800 rules. SELinux: 2048 avtab hash slots, 277800 rules. SELinux: 9 users, 12 roles, 3917 types, 217 bools, 1 sens, 1024 cats SELinux: 81 classes, 277800 rules SELinux: Completing initialization. SELinux: Setting up existing superblocks. SELinux: initialized (dev dm-0, type ext4), uses xattr SELinux: initialized (dev tmpfs, type tmpfs), uses transition SIDs SELinux: initialized (dev selinuxfs, type selinuxfs), uses genfs_contexts SELinux: initialized (dev mqueue, type mqueue), uses transition SIDs SELinux: initialized (dev hugetlbfs, type hugetlbfs), uses transition SIDs SELinux: initialized (dev devpts, type devpts), uses transition SIDs SELinux: initialized (dev inotifyfs, type inotifyfs), uses genfs_contexts SELinux: initialized (dev anon_inodefs, type anon_inodefs), uses genfs_contexts SELinux: initialized (dev pipefs, type pipefs), uses task SIDs SELinux: initialized (dev debugfs, type debugfs), uses genfs_contexts SELinux: initialized (dev sockfs, type sockfs), uses task SIDs SELinux: initialized (dev devtmpfs, type devtmpfs), uses transition SIDs SELinux: initialized (dev tmpfs, type tmpfs), uses transition SIDs SELinux: initialized (dev proc, type proc), uses genfs_contexts SELinux: initialized (dev bdev, type bdev), uses genfs_contexts SELinux: initialized (dev rootfs, type rootfs), uses genfs_contexts SELinux: initialized (dev sysfs, type sysfs), uses genfs_contexts type=1403 audit(1408874609.314:3): policy loaded auid=4294967295 ses=4294967295 dracut: dracut: Switching root SELinux: initialized (dev usbfs, type usbfs), uses genfs_contexts udev: starting version 147 sd 0:0:0:0: Attached scsi generic sg0 type 0 EXT4-fs (sda1): mounted filesystem with ordered data mode. Opts: SELinux: initialized (dev sda1, type ext4), uses xattr EXT4-fs (dm-1): mounted filesystem with ordered data mode. Opts: SELinux: initialized (dev dm-1, type ext4), uses xattr Adding 4128760k swap on /dev/mapper/VolGroup-lv_swap. Priority:-1 extents:1 across:4128760k SELinux: initialized (dev binfmt_misc, type binfmt_misc), uses genfs_contexts NET: Registered protocol family 10 lo: Disabled Privacy Extensions ip6_tables: (C) 2000-2006 Netfilter Core Team nf_conntrack version 0.5.0 (16384 buckets, 65536 max) ip_tables: (C) 2000-2006 Netfilter Core Team From owner-freebsd-virtualization@FreeBSD.ORG Thu Aug 21 14:20:12 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 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D55BF881 for ; Thu, 21 Aug 2014 14:20:12 +0000 (UTC) Received: from mail-wi0-x22d.google.com (mail-wi0-x22d.google.com [IPv6:2a00:1450:400c:c05::22d]) (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 6F85D3BB6 for ; Thu, 21 Aug 2014 14:20:12 +0000 (UTC) Received: by mail-wi0-f173.google.com with SMTP id f8so8791008wiw.0 for ; Thu, 21 Aug 2014 07:20:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:from:date:message-id:subject:to:content-type; bh=yNJj3vDzfEUxoMTnmTSf7q7EkeaNd87bY/CEteFsXMo=; b=exRAZ8JnlHOtqGcL5aiBcbR4GefNFRTX3/CZuw3ApVQg8DEhIjRIeRMniBOJWkpiVo FM2iN2reSJF/j9PnSXmzO5iJdAqjY8bVbqi3JE7kGmLMjBPuAXT7Fk7QpqZTc2OYSUrK vzmsp/VS+zO/R0lEy0+wMndXcxx0EssVS/JjxY7UrzArXOr0xHimKR/Wibv9OXOVC8HQ YI8HQp6VFUnXfivjRMkwMPZpjQV57EMOxsT6rxRhakp3n4gTSRh4exRdjOpcZRIntDbK DzbY8YPwlCV0+bjZbFy6kVwa46+EJEiv75V38IGohdEHNxJcCT+YjVgYPGAdIXjBGT15 5umg== X-Received: by 10.180.182.67 with SMTP id ec3mr4842074wic.21.1408630810799; Thu, 21 Aug 2014 07:20:10 -0700 (PDT) MIME-Version: 1.0 Sender: cochard@gmail.com Received: by 10.194.90.2 with HTTP; Thu, 21 Aug 2014 07:19:50 -0700 (PDT) From: =?ISO-8859-1?Q?Olivier_Cochard=2DLabb=E9?= Date: Thu, 21 Aug 2014 16:19:50 +0200 X-Google-Sender-Auth: Y5su_4oNMvNfP8AQacBsZN5u0Ig Message-ID: Subject: bhyve's VM loose network connectivity after a reboot To: "freebsd-virtualization@freebsd.org" Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.18-1 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: Thu, 21 Aug 2014 14:20:12 -0000 Hi, I'm using bhyve from a 11.0-CURRENT (r270177) host and I meet a problem after a VM (guest using fbsd -current too) is rebooted: This VM loose network connectivity once rebooted. vtnet interface seems OK from the VM, like the tap interface on the host: tap status correctly display the new bhyve PID number in its "Opened by" section. But this VM didn't send packet anymore: a "tcpdump -i tap-interface" from the host didn't show any packet after a reboot. Is there something special to do in the "while [ 1 ]" loop of my script, other than simply restarting bhyve for fixing this issue ? Thanks, Olivier From owner-freebsd-virtualization@FreeBSD.ORG Thu Aug 21 15:26:34 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 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2535D7F8 for ; Thu, 21 Aug 2014 15:26:34 +0000 (UTC) Received: from alto.onthenet.com.au (alto.OntheNet.com.au [203.13.68.12]) by mx1.freebsd.org (Postfix) with ESMTP id D9E8E334A for ; Thu, 21 Aug 2014 15:26:33 +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 31FC4126BC; Fri, 22 Aug 2014 01:26:31 +1000 (EST) Received: from Peters-MacBook-Pro.local (c-69-181-164-196.hsd1.ca.comcast.net [69.181.164.196]) by dommail.onthenet.com.au (MOS 4.4.4-GA) with ESMTP id BXX37025 (AUTH peterg@ptree32.com.au); Fri, 22 Aug 2014 01:26:30 +1000 Message-ID: <53F60FA6.8080905@freebsd.org> Date: Thu, 21 Aug 2014 08:26:30 -0700 From: Peter Grehan User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 MIME-Version: 1.0 To: =?ISO-8859-1?Q?Olivier_Cochard-Labb=E9?= Subject: Re: bhyve's VM loose network connectivity after a reboot References: 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.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: Thu, 21 Aug 2014 15:26:34 -0000 Hi Olivier, > I'm using bhyve from a 11.0-CURRENT (r270177) host and I meet a problem > after a VM (guest using fbsd -current too) is rebooted: This VM loose > network connectivity once rebooted. > vtnet interface seems OK from the VM, like the tap interface on the host: > tap status correctly display the new bhyve PID number in its "Opened by" > section. > > But this VM didn't send packet anymore: a "tcpdump -i tap-interface" from > the host didn't show any packet after a reboot. > > Is there something special to do in the "while [ 1 ]" loop of my script, > other than simply restarting bhyve for fixing this issue ? Do you have the net.link.tap.up_on_open sysctl set to 1 ? (didn't see that in the BSDRP-lab-bhyve.sh script, if that's the one you're using) later, Peter. From owner-freebsd-virtualization@FreeBSD.ORG Thu Aug 21 15:40:16 2014 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 ESMTPS id 4E3D630E; Thu, 21 Aug 2014 15:40:16 +0000 (UTC) Received: from mail-wi0-x233.google.com (mail-wi0-x233.google.com [IPv6:2a00:1450:400c:c05::233]) (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 B5036345E; Thu, 21 Aug 2014 15:40:15 +0000 (UTC) Received: by mail-wi0-f179.google.com with SMTP id f8so8671333wiw.0 for ; Thu, 21 Aug 2014 08:40:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-type; bh=JXxKmBumo/m5x6/gULpgKdUuZylWEPypXijFxOvBUxY=; b=gk1HDJ3Y90vFWB31P23yqST2ESfKx9Oab+X7qbj5DJzw0PKZECKhvvday2JhMNDvyA x8o0YsnVDVGAbMZH6UrMl02ecg5UCEVjoRIUjZ8GUTurcEyYGhlOzOcNmPRRhgxmDjeW dVmoo8N9/WbNFhew0ko0zIhq48DfQJv1JnrRhDE4FlqKDw3JMsg16SP3OS6QXfvXxRqE k8X0VnoLrN3Ne/aEd8xCmbzWwzhxdcH1zDaZEpAyeat5jSOjabbLJQ2pMrlPHMF+Dk/h IVrXBVPK/hESHmyldfy2jJl99u8/MiTlk3Lgtiivrw8aB1LF3rmtVXGebM/NcODOlgm+ DCOA== X-Received: by 10.194.59.18 with SMTP id v18mr38789951wjq.64.1408635613751; Thu, 21 Aug 2014 08:40:13 -0700 (PDT) MIME-Version: 1.0 Sender: cochard@gmail.com Received: by 10.194.90.2 with HTTP; Thu, 21 Aug 2014 08:39:53 -0700 (PDT) In-Reply-To: <53F60FA6.8080905@freebsd.org> References: <53F60FA6.8080905@freebsd.org> From: =?ISO-8859-1?Q?Olivier_Cochard=2DLabb=E9?= Date: Thu, 21 Aug 2014 17:39:53 +0200 X-Google-Sender-Auth: rytr6WPlHQUEKz6Nt9HtTdPSvD4 Message-ID: Subject: Re: bhyve's VM loose network connectivity after a reboot To: Peter Grehan Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.18-1 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: Thu, 21 Aug 2014 15:40:16 -0000 On Thu, Aug 21, 2014 at 5:26 PM, Peter Grehan wrote: > Hi Olivier, > > Do you have the net.link.tap.up_on_open sysctl set to 1 ? (didn't see > that in the BSDRP-lab-bhyve.sh script, if that's the one you're using) > > > Yes I was using the BSDRP-lab-bhyve.sh script and correctly setting net.link.tap.up_on_open fix my problem: Thanks ! Olivier From owner-freebsd-virtualization@FreeBSD.ORG Thu Aug 21 15:49:04 2014 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 ESMTPS id D3F295B4 for ; Thu, 21 Aug 2014 15:49:04 +0000 (UTC) Received: from alto.onthenet.com.au (alto.OntheNet.com.au [203.13.68.12]) by mx1.freebsd.org (Postfix) with ESMTP id 9604B3535 for ; Thu, 21 Aug 2014 15:49:04 +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 05C08125C8; Fri, 22 Aug 2014 01:49:03 +1000 (EST) Received: from Peters-MacBook-Pro.local (c-69-181-164-196.hsd1.ca.comcast.net [69.181.164.196]) by dommail.onthenet.com.au (MOS 4.4.4-GA) with ESMTP id BXX37506 (AUTH peterg@ptree32.com.au); Fri, 22 Aug 2014 01:49:01 +1000 Message-ID: <53F614ED.6070203@freebsd.org> Date: Thu, 21 Aug 2014 08:49:01 -0700 From: Peter Grehan User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 MIME-Version: 1.0 To: Mathias Picker Subject: Re: -stable / bhyve / vmrc / centos65: no network card References: <1408619474.2442.116.camel@marcopolo.fritz.box> In-Reply-To: <1408619474.2442.116.camel@marcopolo.fritz.box> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit 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: Thu, 21 Aug 2014 15:49:04 -0000 Hi Mathias, > twin# ifconfig > igb0: flags=8943 metric > 0 mtu 1500 > > options=400b8 > ether 0c:c4:7a:05:81:be > inet 1yy netmask 0xffffffc0 broadcast 1yy > inet6 fe80::ec4:7aff:fe05:81be%igb0 prefixlen 64 scopeid 0x1 > inet 1xx netmask 0xfffffff8 broadcast 1 > inet 1xx netmask 0xffffffff broadcast 1 > inet 1xx netmask 0xffffffff broadcast 1 Looks like there might be an error with the IPv4 config of the igb0 interface - those addresses appear to be invalid. Though, that shouldn't really matter for a bridged config. > bridge0: flags=8843 metric 0 mtu > 1500 > ether 02:3d:80:23:57:00 > nd6 options=1 > id 00:00:00:00:00:00 priority 32768 hellotime 2 fwddelay 15 > maxage 20 holdcnt 6 proto rstp maxaddr 2000 timeout 1200 > root id 00:00:00:00:00:00 priority 32768 ifcost 0 port 0 > member: tap8000 flags=143 > ifmaxaddr 0 port 5 priority 128 path cost 2000000 > member: igb0 flags=143 > ifmaxaddr 0 port 1 priority 128 path cost 20000 That looks Ok. > tap0: flags=8802 metric 0 mtu 1500 > options=80000 > ether 00:bd:15:8e:4a:00 > nd6 options=21 > media: Ethernet autoselect > status: no carrier > tap8000: flags=8943 > metric 0 mtu 1500 > options=80000 > ether 00:bd:76:11:59:40 > nd6 options=29 > media: Ethernet autoselect > status: active > Opened by PID 30817 > > bhyve is started like this: > > /usr/sbin/bhyve -c 1 -m 2048 -A -H -W -s 0,hostbridge -s > 2,ahci-hd,/usr/local/vmrc/vm//zimbra-centos-six.five0/zimbra-c > entos-six.five0.img -s 3:0,virtio-net,tap8000 -s 5,lpc -l com1,stdio > zimbra-centos-six.five0 > > So, from what I understand, the tap device is created, bridged, and put > correctly in the bhyve incantation. > > So: why do I not have a network card in centos: Can you try a 'lspci -vv' at the Linux shell prompt ? That will show if the virtio-net PCI device was at least probed. When you did the initial install, was any networking configured ? later, Peter. From owner-freebsd-virtualization@FreeBSD.ORG Thu Aug 21 16:16:44 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 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1714EDC8; Thu, 21 Aug 2014 16:16:44 +0000 (UTC) Received: from www94.your-server.de (www94.your-server.de [213.133.104.94]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C8AE5389B; Thu, 21 Aug 2014 16:16:43 +0000 (UTC) Received: from [188.104.2.112] (helo=[192.168.0.102]) by www94.your-server.de with esmtpsa (TLSv1:DHE-RSA-AES256-SHA:256) (Exim 4.80.1) (envelope-from ) id 1XKV2V-0008KJ-RW; Thu, 21 Aug 2014 18:16:39 +0200 Subject: Re: -stable / bhyve / vmrc / centos65: no network card From: Mathias Picker To: Peter Grehan In-Reply-To: <53F614ED.6070203@freebsd.org> References: <1408619474.2442.116.camel@marcopolo.fritz.box> <53F614ED.6070203@freebsd.org> Content-Type: text/plain; charset="UTF-8" Organization: virtual earth GmbH Date: Thu, 21 Aug 2014 18:16:35 +0200 Message-ID: <1408637795.2442.140.camel@marcopolo.fritz.box> Mime-Version: 1.0 X-Mailer: Evolution 2.32.1 FreeBSD GNOME Team Port Content-Transfer-Encoding: 7bit X-Authenticated-Sender: Mathias.Picker@virtual-earth.de X-Virus-Scanned: Clear (ClamAV 0.98.4/19299/Thu Aug 21 15:53:31 2014) 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: Thu, 21 Aug 2014 16:16:44 -0000 On Do, 2014-08-21 at 08:49 -0700, Peter Grehan wrote: > Hi Mathias, > > twin# ifconfig > > igb0: flags=8943 metric > > 0 mtu 1500 > > > > options=400b8 > > ether 0c:c4:7a:05:81:be > > inet 1yy netmask 0xffffffc0 broadcast 1yy > > inet6 fe80::ec4:7aff:fe05:81be%igb0 prefixlen 64 scopeid 0x1 > > inet 1xx netmask 0xfffffff8 broadcast 1 > > inet 1xx netmask 0xffffffff broadcast 1 > > inet 1xx netmask 0xffffffff broadcast 1 > > Looks like there might be an error with the IPv4 config of the igb0 > interface - those addresses appear to be invalid. Though, that shouldn't > really matter for a bridged config. > I just edited them a bit... > > bridge0: flags=8843 metric 0 mtu > > 1500 > > ether 02:3d:80:23:57:00 > > nd6 options=1 > > id 00:00:00:00:00:00 priority 32768 hellotime 2 fwddelay 15 > > maxage 20 holdcnt 6 proto rstp maxaddr 2000 timeout 1200 > > root id 00:00:00:00:00:00 priority 32768 ifcost 0 port 0 > > member: tap8000 flags=143 > > ifmaxaddr 0 port 5 priority 128 path cost 2000000 > > member: igb0 flags=143 > > ifmaxaddr 0 port 1 priority 128 path cost 20000 > > That looks Ok. > > > tap0: flags=8802 metric 0 mtu 1500 > > options=80000 > > ether 00:bd:15:8e:4a:00 > > nd6 options=21 > > media: Ethernet autoselect > > status: no carrier > > tap8000: flags=8943 > > metric 0 mtu 1500 > > options=80000 > > ether 00:bd:76:11:59:40 > > nd6 options=29 > > media: Ethernet autoselect > > status: active > > Opened by PID 30817 > > > > bhyve is started like this: > > > > /usr/sbin/bhyve -c 1 -m 2048 -A -H -W -s 0,hostbridge -s > > 2,ahci-hd,/usr/local/vmrc/vm//zimbra-centos-six.five0/zimbra-c > > entos-six.five0.img -s 3:0,virtio-net,tap8000 -s 5,lpc -l com1,stdio > > zimbra-centos-six.five0 > > > > So, from what I understand, the tap device is created, bridged, and put > > correctly in the bhyve incantation. > > > > So: why do I not have a network card in centos: > > Can you try a 'lspci -vv' at the Linux shell prompt ? That will show > if the virtio-net PCI device was at least probed. No lspci in the base centos iso I'm afraid... Is there a way to access the local (FreeBSD) disk, so I can ship in pciutils? > > When you did the initial install, was any networking configured ? You mean the centos install? No, nothing. > > later, > > Peter. > From owner-freebsd-virtualization@FreeBSD.ORG Thu Aug 21 16:41:07 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 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3DA27347 for ; Thu, 21 Aug 2014 16:41:07 +0000 (UTC) Received: from mx1.scaleengine.net (beauharnois2.bhs1.scaleengine.net [142.4.218.15]) by mx1.freebsd.org (Postfix) with ESMTP id 159903AAE for ; Thu, 21 Aug 2014 16:41:06 +0000 (UTC) Received: from [192.168.1.2] (senat1-01.HML3.ScaleEngine.net [209.51.186.5]) (Authenticated sender: allanjude.freebsd@scaleengine.com) by mx1.scaleengine.net (Postfix) with ESMTPSA id DCCC53C8D4 for ; Thu, 21 Aug 2014 16:41:05 +0000 (UTC) Message-ID: <53F62141.1000701@freebsd.org> Date: Thu, 21 Aug 2014 12:41:37 -0400 From: Allan Jude User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 MIME-Version: 1.0 To: freebsd-virtualization@freebsd.org Subject: Re: -stable / bhyve / vmrc / centos65: no network card References: <1408619474.2442.116.camel@marcopolo.fritz.box> <53F614ED.6070203@freebsd.org> <1408637795.2442.140.camel@marcopolo.fritz.box> In-Reply-To: <1408637795.2442.140.camel@marcopolo.fritz.box> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="Mt7uBmakGape2s7ToLfMWhgdXeHkueaXd" 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: Thu, 21 Aug 2014 16:41:07 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --Mt7uBmakGape2s7ToLfMWhgdXeHkueaXd Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On 2014-08-21 12:16, Mathias Picker wrote: > On Do, 2014-08-21 at 08:49 -0700, Peter Grehan wrote: >> Hi Mathias, >>> twin# ifconfig >>> igb0: flags=3D8943 me= tric >>> 0 mtu 1500 >>> >>> options=3D400b8 >>> ether 0c:c4:7a:05:81:be >>> inet 1yy netmask 0xffffffc0 broadcast 1yy >>> inet6 fe80::ec4:7aff:fe05:81be%igb0 prefixlen 64 scopeid 0x1= >>> inet 1xx netmask 0xfffffff8 broadcast 1 >>> inet 1xx netmask 0xffffffff broadcast 1 >>> inet 1xx netmask 0xffffffff broadcast 1 >> >> Looks like there might be an error with the IPv4 config of the igb0 = >> interface - those addresses appear to be invalid. Though, that shouldn= 't=20 >> really matter for a bridged config. >> >=20 > I just edited them a bit... >=20 >>> bridge0: flags=3D8843 metric = 0 mtu >>> 1500 >>> ether 02:3d:80:23:57:00 >>> nd6 options=3D1 >>> id 00:00:00:00:00:00 priority 32768 hellotime 2 fwddelay 15 >>> maxage 20 holdcnt 6 proto rstp maxaddr 2000 timeout 1200 >>> root id 00:00:00:00:00:00 priority 32768 ifcost 0 port 0 >>> member: tap8000 flags=3D143 >>> ifmaxaddr 0 port 5 priority 128 path cost 2000000 >>> member: igb0 flags=3D143= >>> ifmaxaddr 0 port 1 priority 128 path cost 20000 >> >> That looks Ok. >> >>> tap0: flags=3D8802 metric 0 mtu 1500 >>> options=3D80000 >>> ether 00:bd:15:8e:4a:00 >>> nd6 options=3D21 >>> media: Ethernet autoselect >>> status: no carrier >>> tap8000: flags=3D8943= >>> metric 0 mtu 1500 >>> options=3D80000 >>> ether 00:bd:76:11:59:40 >>> nd6 options=3D29 >>> media: Ethernet autoselect >>> status: active >>> Opened by PID 30817 >>> >>> bhyve is started like this: >>> >>> /usr/sbin/bhyve -c 1 -m 2048 -A -H -W -s 0,hostbridge -s >>> 2,ahci-hd,/usr/local/vmrc/vm//zimbra-centos-six.five0/zimbra-c >>> entos-six.five0.img -s 3:0,virtio-net,tap8000 -s 5,lpc -l com1,stdio >>> zimbra-centos-six.five0 >>> >>> So, from what I understand, the tap device is created, bridged, and p= ut >>> correctly in the bhyve incantation. >>> >>> So: why do I not have a network card in centos: >> >> Can you try a 'lspci -vv' at the Linux shell prompt ? That will show= =20 >> if the virtio-net PCI device was at least probed. >=20 > No lspci in the base centos iso I'm afraid... Is there a way to access > the local (FreeBSD) disk, so I can ship in pciutils? >=20 >=20 >> >> When you did the initial install, was any networking configured ? >=20 > You mean the centos install? No, nothing. >> >> later, >> >> Peter. >> >=20 >=20 > _______________________________________________ > freebsd-virtualization@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-virtualization > To unsubscribe, send any mail to "freebsd-virtualization-unsubscribe@fr= eebsd.org" >=20 Try 'ifconfig -a' in the VM If an interface is not 'up', it might not be listed in 'ifconfig' --=20 Allan Jude --Mt7uBmakGape2s7ToLfMWhgdXeHkueaXd Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (MingW32) iQIcBAEBAgAGBQJT9iFDAAoJEJrBFpNRJZKfVtYP/i/N1lXDcL3b8EkHVHqIEG9n Qv+3u/XT72Gh4k2BruEs81P5L4zdzmO31XegLnB51Gl32tp5C2m7a14P8x1H8wOU JdJNRSx8DFmFsMCllQZkA2uAdFIm2dFsBEWyQT6EUpR+7ra8UNM8/fhvz/ARIHUR UqUk5XnuBfnHnqUDtRxAl10Y0CYe8OtsbzUFC66xBPSfbr0Tt6snaKT69iS33u74 Lad3hnkFJVBAWjbIJDFVwITdRMiMcqmmjGY19NPw/xCjVc14s0IlWe86e4gbWlzl /79RlSsVV83P2cvDQYbWRML+/OV73GEdP79naUFPgvz3kULk7+c+alSSkZYLCjAE 5Xv/jwuQFBQ7vL0BJyUbTfSBzVqd5t+uYQd5h4o97Xt2t/OCHkwlTwPvx5GyEkc9 bzlHmLnkhfphaoGZYSdOt/4VmJEv6Z6kDawpJixscezTM94QHbMhJOy+HM2EKJV8 /tAcoSksjRSldEmpCSw7hWY7svExM9l5j4c5v+6Ify4b1AeC8v7khagncDbSIymB /cCYjwC9jaqKz7IAKGW2sRLVWulicyEXvem94Tp7sh5W6qgDixzS+xkKJMIAd0uF CgTAsrJ711T/YYVJujRJMx0gPdhBnLzTg8Zsh1EA4tX+TWX2gacp9tI/TFFHkL+9 kQas6lRo/IpiFcjqAUXI =31BE -----END PGP SIGNATURE----- --Mt7uBmakGape2s7ToLfMWhgdXeHkueaXd-- From owner-freebsd-virtualization@FreeBSD.ORG Thu Aug 21 20:13:26 2014 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 ESMTPS id 61946C05; Thu, 21 Aug 2014 20:13:26 +0000 (UTC) Received: from www94.your-server.de (www94.your-server.de [213.133.104.94]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1E75E321D; Thu, 21 Aug 2014 20:13:25 +0000 (UTC) Received: from [188.104.2.112] (helo=[192.168.0.102]) by www94.your-server.de with esmtpsa (TLSv1:DHE-RSA-AES256-SHA:256) (Exim 4.80.1) (envelope-from ) id 1XKYja-00040i-LH; Thu, 21 Aug 2014 22:13:22 +0200 Subject: Re: -stable / bhyve / vmrc / centos65: no network card From: Mathias Picker To: Allan Jude In-Reply-To: <53F62141.1000701@freebsd.org> References: <1408619474.2442.116.camel@marcopolo.fritz.box> <53F614ED.6070203@freebsd.org> <1408637795.2442.140.camel@marcopolo.fritz.box> <53F62141.1000701@freebsd.org> Content-Type: text/plain; charset="UTF-8" Organization: virtual earth GmbH Date: Thu, 21 Aug 2014 22:13:18 +0200 Message-ID: <1408651998.2442.143.camel@marcopolo.fritz.box> Mime-Version: 1.0 X-Mailer: Evolution 2.32.1 FreeBSD GNOME Team Port Content-Transfer-Encoding: 7bit X-Authenticated-Sender: Mathias.Picker@virtual-earth.de X-Virus-Scanned: Clear (ClamAV 0.98.4/19299/Thu Aug 21 15:53:31 2014) 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: Thu, 21 Aug 2014 20:13:26 -0000 On Do, 2014-08-21 at 12:41 -0400, Allan Jude wrote: > On 2014-08-21 12:16, Mathias Picker wrote: > > On Do, 2014-08-21 at 08:49 -0700, Peter Grehan wrote: > >> Hi Mathias, > >>> twin# ifconfig > >>> igb0: flags=8943 metric > >>> 0 mtu 1500 > >>> > >>> options=400b8 > >>> ether 0c:c4:7a:05:81:be > >>> inet 1yy netmask 0xffffffc0 broadcast 1yy > >>> inet6 fe80::ec4:7aff:fe05:81be%igb0 prefixlen 64 scopeid 0x1 > >>> inet 1xx netmask 0xfffffff8 broadcast 1 > >>> inet 1xx netmask 0xffffffff broadcast 1 > >>> inet 1xx netmask 0xffffffff broadcast 1 > >> > >> Looks like there might be an error with the IPv4 config of the igb0 > >> interface - those addresses appear to be invalid. Though, that shouldn't > >> really matter for a bridged config. > >> > > > > I just edited them a bit... > > > >>> bridge0: flags=8843 metric 0 mtu > >>> 1500 > >>> ether 02:3d:80:23:57:00 > >>> nd6 options=1 > >>> id 00:00:00:00:00:00 priority 32768 hellotime 2 fwddelay 15 > >>> maxage 20 holdcnt 6 proto rstp maxaddr 2000 timeout 1200 > >>> root id 00:00:00:00:00:00 priority 32768 ifcost 0 port 0 > >>> member: tap8000 flags=143 > >>> ifmaxaddr 0 port 5 priority 128 path cost 2000000 > >>> member: igb0 flags=143 > >>> ifmaxaddr 0 port 1 priority 128 path cost 20000 > >> > >> That looks Ok. > >> > >>> tap0: flags=8802 metric 0 mtu 1500 > >>> options=80000 > >>> ether 00:bd:15:8e:4a:00 > >>> nd6 options=21 > >>> media: Ethernet autoselect > >>> status: no carrier > >>> tap8000: flags=8943 > >>> metric 0 mtu 1500 > >>> options=80000 > >>> ether 00:bd:76:11:59:40 > >>> nd6 options=29 > >>> media: Ethernet autoselect > >>> status: active > >>> Opened by PID 30817 > >>> > >>> bhyve is started like this: > >>> > >>> /usr/sbin/bhyve -c 1 -m 2048 -A -H -W -s 0,hostbridge -s > >>> 2,ahci-hd,/usr/local/vmrc/vm//zimbra-centos-six.five0/zimbra-c > >>> entos-six.five0.img -s 3:0,virtio-net,tap8000 -s 5,lpc -l com1,stdio > >>> zimbra-centos-six.five0 > >>> > >>> So, from what I understand, the tap device is created, bridged, and put > >>> correctly in the bhyve incantation. > >>> > >>> So: why do I not have a network card in centos: > >> > >> Can you try a 'lspci -vv' at the Linux shell prompt ? That will show > >> if the virtio-net PCI device was at least probed. > > > > No lspci in the base centos iso I'm afraid... Is there a way to access > > the local (FreeBSD) disk, so I can ship in pciutils? > > > > > >> > >> When you did the initial install, was any networking configured ? > > > > You mean the centos install? No, nothing. > >> > >> 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" > > > > Try 'ifconfig -a' in the VM > > If an interface is not 'up', it might not be listed in 'ifconfig' > OMG, that did it. Thanks, I can see eth0 now. Now I have to somehow learn how to configure it :) Thanks a lot! / Mathias