From nobody Mon Jun 27 19:41:38 2022 X-Original-To: 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 7F71687126B; Mon, 27 Jun 2022 19:42:15 +0000 (UTC) (envelope-from marietto2008@gmail.com) Received: from mail-yw1-x112a.google.com (mail-yw1-x112a.google.com [IPv6:2607:f8b0:4864:20::112a]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4LWymQ6JFmz3qb1; Mon, 27 Jun 2022 19:42:14 +0000 (UTC) (envelope-from marietto2008@gmail.com) Received: by mail-yw1-x112a.google.com with SMTP id 00721157ae682-31bf3656517so5106137b3.12; Mon, 27 Jun 2022 12:42:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=rcWtOKhY2BmTSIYREf3pE4a2rtbIKS7sa0Yqt/HoA24=; b=AeK8TccTC2WukENewKC68JkPY5r+7CFY3cSQ2PxEp9O8KnJfmRcQJ1P0gb3oDyS0Lv iW6gNkkwPvOgg9JhgrlUVql8Ced5lzPRrbFknmY5foazftCxL2/gFb1Zd7dSwYrZXA2R 8Df4grZze0JwD7+uYHwZStJFEPLo3KpwR18SnH/JJm10XmyuWUwTAurtZ2zJtmdXBqHE VkA6j9uV2ItPPY/2CerPrjv7ZcE+SJPdGzaouhcNIFeFd9XsInLyLPrNOeOVCQJXkQQE YBAOHl2URfY+o/uwcHuboUv48urFpuTA3qx4wPG3gCzu0gaNJXcyHvoA3DjQ2R4Hr57J aCHg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=rcWtOKhY2BmTSIYREf3pE4a2rtbIKS7sa0Yqt/HoA24=; b=gqbqI9zv3hMiKDI5SnZNWcYhiBu9ORWFHk9hkHOgkGyGQdl1+phcL8ZK1ZNtKB/Ucs +ETS1qa6tkWEoMhdYSTZjcuaVKIRjWuKmc7XW0rURbK5bB+/Gkezf09JV77eeTQFRWjr +CZQeqCApcG0BxdRWoBcZVw1sw9d2xtnYdikgam++AxnvBP5tfCFZa3ZqZUQAWy3fy3P mQoXQVBgpoQCa+FxhKqSd6GQmwrVf4k3EaWayP31l1fNI7kgMBDa/qdteyiLzwAHDPHC FiVzjdFhGX8GjlTxl4XhRmxeXFsrHA7y/HwTZkMoCP7/qi6VrJ9TgmudlRpHiWmThKVW /JIw== X-Gm-Message-State: AJIora8PxVFGCmT+BeQfxelsEnopIN3aNP83QAVPbsJZPhflX4uE8GKw W4ytlYb4Lx5j44MDXNjpDCSwnMLtJrn+FtoCaVk= X-Google-Smtp-Source: AGRyM1vcj+wHNKZQr/eJ7CfRqCyRTQ6xgnFROYVyT0h3goOwgzTDNHVwwMQwqboQWRiO4ncvX4mxXty3e9APaP7dmns= X-Received: by 2002:a81:1406:0:b0:317:9cca:6fe6 with SMTP id 6-20020a811406000000b003179cca6fe6mr16795551ywu.287.1656358934175; Mon, 27 Jun 2022 12:42:14 -0700 (PDT) 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 References: <62B9FBF1.6030906@grosbein.net> In-Reply-To: <62B9FBF1.6030906@grosbein.net> From: Mario Marietto Date: Mon, 27 Jun 2022 21:41:38 +0200 Message-ID: Subject: Re: how to run bhyve and virtualbox at the same time To: Eugene Grosbein Cc: =?UTF-8?Q?Corvin_K=C3=B6hne?= , FreeBSD virtualization , hackers@freebsd.org Content-Type: multipart/alternative; boundary="000000000000e4654805e2731d7b" X-Rspamd-Queue-Id: 4LWymQ6JFmz3qb1 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20210112 header.b=AeK8TccT; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of marietto2008@gmail.com designates 2607:f8b0:4864:20::112a as permitted sender) smtp.mailfrom=marietto2008@gmail.com X-Spamd-Result: default: False [-2.08 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20210112]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; FREEMAIL_FROM(0.00)[gmail.com]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; NEURAL_SPAM_SHORT(0.92)[0.919]; NEURAL_HAM_LONG(-1.00)[-1.000]; TO_DN_SOME(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; MID_RHS_MATCH_FROMTLD(0.00)[]; DKIM_TRACE(0.00)[gmail.com:+]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::112a:from]; MLMMJ_DEST(0.00)[freebsd-virtualization,hackers]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[]; DWL_DNSWL_NONE(0.00)[gmail.com:dkim] X-ThisMailContainsUnwantedMimeParts: N --000000000000e4654805e2731d7b Content-Type: text/plain; charset="UTF-8" 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. Il giorno lun 27 giu 2022 alle ore 21:01 Eugene Grosbein ha scritto: > On 26.06.2022 20:43, Mario Marietto wrote: > > Hello to everyone. > > > > Just for educational purposes I've virtualized MacOS Monterey with > Virtualbox in FreeBSD : > > > > Screenshot_2022-06-26_15-32-51.jpg > > > > Now,the problem is that Virtualbox supports only USB 1.0 speed devices > because it does not support the USB 3.0/3.1 plugin/addon and since I use a > lot of USB disks and I transfer data between them,I can't have a low level > speed like that. So,I've thought of some ideas to overcome the problem. > > If you need to pass USB disk only (not other kinds of USB devices), then > USB pass-through is not only way, there is another one: > you can pass block device without performance hit. > > Optionally, in the /etc/devfs.rules: > > [localrules=10] > add path 'da*' mode 0660 group vboxusers > > So, any CAM-supported disks including USB-attached is writable by > vboxusers group. > > Then create VMDK link to actual device: > > $ VBoxManage internalcommands createrawvmdk -filename $HOME/usbdisk.vmdk > -rawdisk /dev/da1 > > Then attach VMDK to the VM as fixed HDD. > > > -- Mario. --000000000000e4654805e2731d7b Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
I did it already and it works. Fact is that if I use virtu= albox I can't use bhyve at the same time. So It's not a good idea t= o use only virtualbox machines.

Il giorno lun 27 giu 2022 alle ore 21:01= Eugene Grosbein <eugen@grosbein.n= et> ha scritto:
On 26.06.2022 20:43, Mario Marietto wrote:
> Hello to everyone.
>
> Just for educational purposes I've virtualized MacOS Monterey with= Virtualbox in FreeBSD :
>
> Screenshot_2022-06-26_15-32-51.jpg
>
> Now,the problem is that Virtualbox supports only USB 1.0 speed devices= because it does not support the USB 3.0/3.1 plugin/addon and since I use a= lot of USB disks and I transfer data between them,I can't have a low l= evel speed like that. So,I've thought of some ideas to overcome the pro= blem.

If you need to pass USB disk only (not other kinds of USB devices), then US= B pass-through is not only way, there is another one:
you can pass block device without performance hit.

Optionally, in the /etc/devfs.rules:

[localrules=3D10]
add path 'da*' mode 0660 group vboxusers

So, any CAM-supported disks including USB-attached is writable by vboxusers= group.

Then create VMDK link to actual device:

$ VBoxManage internalcommands createrawvmdk -filename $HOME/usbdisk.vmdk -r= awdisk /dev/da1

Then attach VMDK to the VM as fixed HDD.




--
Mario.
--000000000000e4654805e2731d7b--