From nobody Mon Jun 27 19:34:23 2022 X-Original-To: freebsd-virtualization@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 C6E4386D499 for ; Mon, 27 Jun 2022 19:34:36 +0000 (UTC) (envelope-from lobo@bsd.com.br) Received: from mail-oa1-x29.google.com (mail-oa1-x29.google.com [IPv6:2001:4860:4864:20::29]) (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 4LWybb34mdz3ksf for ; Mon, 27 Jun 2022 19:34:35 +0000 (UTC) (envelope-from lobo@bsd.com.br) Received: by mail-oa1-x29.google.com with SMTP id 586e51a60fabf-1013ecaf7e0so14165072fac.13 for ; Mon, 27 Jun 2022 12:34:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsd.com.br; s=capeta; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=hNeDNdcArc3iy1TLSrezlstlRjTav0sRa+1hpGRqxpU=; b=HV4lJSx1ppJagp4/C5eejXUXVSfZGSOPvgAXObM7nnV1G0NMfjaUZ9X/VDMEqX9SRd 7nRfEBhDdaqfpfiuzITGXzDZ2H3o8efm1kLXBGjedGnQEVybQl+vfinFqNBshuNvK/qj XDEOE4SwRNfapwL0KOnqw84mEG27T+J/9TjbE= 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=hNeDNdcArc3iy1TLSrezlstlRjTav0sRa+1hpGRqxpU=; b=VVDR9BvV8DDOkjTEHbteo+qSl6SCzoksRaWLMwP28+ilpa0ptjmnbCQhCADUV0lQtE 7G906ZVVIJF2JlC7CVqxPmJZ3MNV9TUo7PjDFlPhI1ii21b3XmHzfZ/JIKXB6E6CMmPO 7lM9D6t7J6yBlVCjv1fRDmSPn8gdCv/8CF6RZIL8WiVFUcs44oqIYKhLAEWEERB66IzI 1SZ/jVweR7G3MiWGGtacdih0zujcHXTIcyDPRnP5QCpVQLx4samWu60/Q+71JXyL5lJe ZbNI73kRKv4h4zmHvWQqz0mNsFs3Ua0dszgeoUhQAg6oxEPyyeZ4arw8CEntZ0TW6Pvw sfwA== X-Gm-Message-State: AJIora/RUepIGb0zV99SLt/ILXB1MPHGtUrqqCKCMeYr1ZiuX5+AiWJk dFA2rHtChBquE7Ba/7nRCBdR9jbySH0z63c9YAyK3v0S1nE= X-Google-Smtp-Source: AGRyM1tZw3Bf2SQldnn2B8Lh7r6XgItYXQBl4laKiVjNK+c+cLq8MNRF4UKeUZ3pDHPiocdIU4mYZzx2KOr0VMEasWI= X-Received: by 2002:a05:6870:430c:b0:101:f886:3760 with SMTP id w12-20020a056870430c00b00101f8863760mr7915196oah.88.1656358474373; Mon, 27 Jun 2022 12:34:34 -0700 (PDT) List-Id: Discussion List-Archive: https://lists.freebsd.org/archives/freebsd-virtualization List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-virtualization@freebsd.org X-BeenThere: freebsd-virtualization@freebsd.org MIME-Version: 1.0 References: <62B9FBF1.6030906@grosbein.net> In-Reply-To: <62B9FBF1.6030906@grosbein.net> From: Mario Lobo Date: Mon, 27 Jun 2022 16:34:23 -0300 Message-ID: Subject: Re: how to run bhyve and virtualbox at the same time To: hackers@freebsd.org Cc: freebsd-virtualization@freebsd.org Content-Type: multipart/alternative; boundary="0000000000007c6ee705e273021d" X-Rspamd-Queue-Id: 4LWybb34mdz3ksf X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=bsd.com.br header.s=capeta header.b=HV4lJSx1; dmarc=none; spf=pass (mx1.freebsd.org: domain of lobo@bsd.com.br designates 2001:4860:4864:20::29 as permitted sender) smtp.mailfrom=lobo@bsd.com.br X-Spamd-Result: default: False [-3.49 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; R_DKIM_ALLOW(-0.20)[bsd.com.br:s=capeta]; FROM_HAS_DN(0.00)[]; R_SPF_ALLOW(-0.20)[+ip6:2001:4860:4000::/36]; NEURAL_HAM_LONG(-1.00)[-1.000]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-virtualization@freebsd.org]; TO_DN_NONE(0.00)[]; DMARC_NA(0.00)[bsd.com.br]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DKIM_TRACE(0.00)[bsd.com.br:+]; RCPT_COUNT_TWO(0.00)[2]; RCVD_IN_DNSWL_NONE(0.00)[2001:4860:4864:20::29:from]; NEURAL_HAM_SHORT(-0.99)[-0.989]; MLMMJ_DEST(0.00)[freebsd-virtualization]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; ASN(0.00)[asn:15169, ipnet:2001:4860:4864::/48, country:US]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[] X-ThisMailContainsUnwantedMimeParts: N --0000000000007c6ee705e273021d Content-Type: text/plain; charset="UTF-8" On Mon, Jun 27, 2022 at 4:00 PM Eugene Grosbein wrote: > 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. > > > You don't need to go that far. You can share any local mounted disk with the virtualbox SharedFolder option. -- Mario Lobo http://www.mallavoodoo.com.br FreeBSD since version 2.2.8 [not Pro-Audio.... YET!!] --0000000000007c6ee705e273021d Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Mon, Jun 27, 2022 at 4:00 PM Eugene Grosbein <eugen@grosbein.net> wrote:
=
On 26.06.2022 20:43, Mari= o 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.



You don't need to go that fa= r.

You can share any local mounted disk with the virtualbox Sh= aredFolder option.
--
Mario Lobo
http://www.mallavoodoo.com.br
FreeBSD si= nce version 2.2.8 [not Pro-Audio.... YET!!]
--0000000000007c6ee705e273021d--