From nobody Tue Jun 28 09:29:29 2022 X-Original-To: freebsd-hackers@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 5BCAE875874 for ; Tue, 28 Jun 2022 09:29:32 +0000 (UTC) (envelope-from theraven@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4LXK701tNDz4rfV for ; Tue, 28 Jun 2022 09:29:32 +0000 (UTC) (envelope-from theraven@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1656408572; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=QXANfcJUGDvyg8N34gt2lX8Gd54mU/IlaUn4FrHO7IU=; b=SfmZMP/YbN7pHhyP2T7eAM1rlvwOKMtv7Xbm0LjKTrAG+mSMZtRazqeRa4GI5GmLtCJw2F Y4jRPqcZo6cOgduYySA103i4fLfxkx+6zPXPuMAmUfeQ1dp4XtKWKqsgdKpfiy7LFFHoBX AAJ3Cn2nxug1yAPCuLyQpGG/htHu8zgfh7vy9j8/50Bg/od095K2BYpwL9MA79rn+7XVh4 4SR5Lga4JIkNo+I5xhsv6dOGlWLMCOKHaR07TQBcnH9vColuHKrTgf1+3I/YCT4ANQa3oG VPqMU0hg4tHvbw3cPHtPaTmWjzNNTYkwFPJiqRZy4/6snS0A1/NXrZyseDPPKQ== Received: from smtp.theravensnest.org (smtp.theravensnest.org [45.77.103.195]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) (Authenticated sender: theraven) by smtp.freebsd.org (Postfix) with ESMTPSA id 195172CDAA for ; Tue, 28 Jun 2022 09:29:32 +0000 (UTC) (envelope-from theraven@FreeBSD.org) Received: from [10.164.186.150] (unknown [167.220.197.22]) by smtp.theravensnest.org (Postfix) with ESMTPSA id A5F8331AF6 for ; Tue, 28 Jun 2022 10:29:31 +0100 (BST) Message-ID: Date: Tue, 28 Jun 2022 10:29:29 +0100 List-Id: Technical discussions relating to FreeBSD List-Archive: https://lists.freebsd.org/archives/freebsd-hackers List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-hackers@freebsd.org MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.10.0 Subject: Re: how to run bhyve and virtualbox at the same time Content-Language: en-GB To: freebsd-hackers@freebsd.org References: <62B9FBF1.6030906@grosbein.net> From: David Chisnall In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1656408572; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=QXANfcJUGDvyg8N34gt2lX8Gd54mU/IlaUn4FrHO7IU=; b=RV7wiRBVE7zn05iYPfNk+bsLEf0OgAzh8tB9UHoWCIhefe0AtCh2Jx4p54plOfKM+FX4/5 ekU4CcECRx+ekTc788iJrUzIxs4cOvIc4Q7Q/AF1KuJ1fua0ZJ3ewqpaIyawnwypmM16a0 NYW5p/jnI2Qcfz4Cse1LP2jEWL00g5awql0QfMJvSehX2qzFDEHfapKxRljzmq/sQBaQkA DXHqfRYhLBP2ONXkx5HPI2px3dyLJuYJnc1p1uF65Xhh9jHxA6S1uZNUDtq17HkSGcQlLm s9oEaM9/072YF9kGRuOHaHKlQpO7jktt745GUQtHtPxoWMaB0xBA1PDR2im2gQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1656408572; a=rsa-sha256; cv=none; b=rZXjIlQoXG5EqgEUr/L6bqapUVTTb4okogeNlMGR7clagouooo1jsJGVnO7s9zpxkt01gT z6meNmuHN+xSS7cn/N2MmRfp+yGeF/ITJFAwgyFqidnf3NWu/E3IrfjRbdfLnOfYPIwFhx yOvksoK4hwKKuA6PQ6a/XXevGVgQpjLmJ93VE9kQ7yZLjNZHRoOfBC3szSIP8jJTSsQs+D EjrPD65tSHxUMMXmYA9P8Uon01Em+B5mbpXWk4866Oqa9UWyWTTNdWib2dfsOQ3F5lHdgU 7YogJl+Mnx5kmKd0KEntS6veYAm9f/cfhgyej4DzqCsP/kbVIQoGwSqYxYVRRA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N On 27/06/2022 20:41, Mario Marietto wrote: > I did it already and it works. Fact is that if I use virtualbox I can't > use bhyve at the same time. So It's not a good idea to use only > virtualbox machines. On macOS, VirtualBox can coexist with other hypervisors because it does not provide a kernel module (it is not allowed to on recent macOS) but is, instead, layered on top of Apple's Hypervisor framework. bhyve has also been ported to sit on top of Apple's Hypervisor framework (xhyve, used by Docker) and I believe that the abstractions provided by the bhyve kernel module are fairly similar. It should be possible to port VirtualBox to sit on top of vmm.ko. I have not been able to find any documentation of the vmm(4) ioctls other than the source code, so I'd imagine that about 2/3 of this work would be documenting the kernel interfaces. David