From nobody Sun Mar 13 17:02:06 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 E03EE1A11565 for ; Sun, 13 Mar 2022 17:02:43 +0000 (UTC) (envelope-from marietto2008@gmail.com) Received: from mail-yb1-xb36.google.com (mail-yb1-xb36.google.com [IPv6:2607:f8b0:4864:20::b36]) (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 4KGmFH0fYXz3qpl for ; Sun, 13 Mar 2022 17:02:43 +0000 (UTC) (envelope-from marietto2008@gmail.com) Received: by mail-yb1-xb36.google.com with SMTP id j2so26641382ybu.0 for ; Sun, 13 Mar 2022 10:02:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:from:date:message-id:subject:to; bh=G2r/UUKyI5TtuBqFSm9CcuKKaMp/tliPU7B1iUXLZeA=; b=CP4Eu32tl2RBFt+gJpPq6rrpXfAndgNmrmFvguwwIhPIdoCMAG1eEbbaXOyS48krnT EVFl3emghPAjqVx+Od9xnuaXuQ2BZFqkECGGodEwpZ9Ig0zj0eLz2ufFYUEIS4EGnpKW kYEcJAVJkNJGkjolkxDgsci4ATo86OL4V3xbXxpqLSIUfVJnQsp09L/wouwopdwm2iDu pN+To31ML7NqN7adFO3W4FddYWAa73nq81hhVJh1RdrcxqAnAeMo8cfWVRBqwbH4c/ZN YhmbpSPHBkktlKw0FzHl0g4HkEJWBEHeN0aZpPUwGXOEEmX0K/UwNKRhfh2ZKZTQqHVg wTPQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=G2r/UUKyI5TtuBqFSm9CcuKKaMp/tliPU7B1iUXLZeA=; b=0AtnbFjo9kolwkQjYPXp4vorudwXRjfkAGMgmoSULovNUvd9h0U3YapyaN5NXevPNb opQhyEIyrc4kM2EVsXCSDOjIgfKSMj4snVgGaVEroIpruKlqZ0kNFAUrNWwb8u0b9rQv UOl4SlRuRoYqf6kiDZUxBT2hoKk544Y469X9Zp1+XBANjUj60FSpP26nfH+L7Ca5DD+X VfF32va+u9SrAN0FwqRKPFxsC+3+vq6/KFOWlW01SZEfr9dAq58iCKfIDX0nNHB6AdbX z6Ph2+i7Wln+NaRv4oo5O9Pgu1VYRBpM7NKGOxpdCX1HAfmHw8hzZ/L6tW2XtDDvcq7l hnDQ== X-Gm-Message-State: AOAM533aqiNqasoG68r4Nl5cBjK8ChHMIqDkgS/CCTd/jtAFwmWDmv2U Puq82i2Go3hQJJam3i3149pip/F2a9HYSj3dB39wSq+IzpfIWg== X-Google-Smtp-Source: ABdhPJy7dpT5wEJYfxTgtYrP9mIA7jP08DVflFG/NpwaomlIb7yjUtkiwYrcC43DKugwuSfH4pVIvgW2/vlukFNYNIs= X-Received: by 2002:a25:2:0:b0:628:aaf1:3159 with SMTP id 2-20020a250002000000b00628aaf13159mr15442740yba.375.1647190962229; Sun, 13 Mar 2022 10:02:42 -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 From: Mario Marietto Date: Sun, 13 Mar 2022 18:02:06 +0100 Message-ID: Subject: bhyve + USB disks as slots + virtio-blk driver + passt-thru will not allow any OS to boot To: FreeBSD virtualization Content-Type: multipart/alternative; boundary="0000000000002e55cb05da1c8871" X-Rspamd-Queue-Id: 4KGmFH0fYXz3qpl X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20210112 header.b=CP4Eu32t; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of marietto2008@gmail.com designates 2607:f8b0:4864:20::b36 as permitted sender) smtp.mailfrom=marietto2008@gmail.com X-Spamd-Result: default: False [-3.00 / 15.00]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36:c]; FREEMAIL_FROM(0.00)[gmail.com]; MID_RHS_MATCH_FROMTLD(0.00)[]; TO_DN_ALL(0.00)[]; DKIM_TRACE(0.00)[gmail.com:+]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; NEURAL_HAM_SHORT(-1.00)[-1.000]; 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]; DWL_DNSWL_NONE(0.00)[gmail.com:dkim]; 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)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_HAM_LONG(-1.00)[-0.996]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-virtualization@freebsd.org]; RCPT_COUNT_ONE(0.00)[1]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::b36:from]; HTTP_TO_IP(1.00)[]; MLMMJ_DEST(0.00)[freebsd-virtualization]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[] X-ThisMailContainsUnwantedMimeParts: N --0000000000002e55cb05da1c8871 Content-Type: text/plain; charset="UTF-8" Hello. What I want to achieve is to pass thru two of my NTFS "formatted" disks to a Windows 11 VM,but without passing them thru using the USB controller in FreeBSD with a bhyve virtual machine (in the example below I tried to boot Windows 11 from the nvme disk nvd0) AT at the same time I want to pass thru my graphic card to a Windows 11 and / or Linux VM. I'm using this FreeBSD version : *FreeBSD marietto 13.0-RELEASE FreeBSD 13.0-RELEASE #5 n244809-dff3dead3734: Wed Feb 23 13:16:32 CET 2022 marietto@marietto:/usr/obj/usr/src/amd64.amd64/sys/GENERIC amd64* I've configured the bhyve VM like this : *bhyve -S -c sockets=1,cores=2,threads=2 -m 4G -w -H -A \ -s 0,hostbridge \ -s 1,ahci-hd,/dev/nvd0 \ -s 2,virtio-blk,/dev/da4 \ -s 3,virtio-blk,/dev/da2 \ -s 4:0,passthru,2/0/0 \ -s 4:1,passthru,2/0/1 \ -s 4:2,passthru,2/0/2 \ -s 4:3,passthru,2/0/3 \ -s 8,virtio-net,tap2 \ -s 9,virtio-9p,sharename=/ \ -s 10,hda,play=/dev/dsp,rec=/dev/dsp \ -s 29,fbuf,tcp=0.0.0.0:5902 ,w=1440,h=900 \ -s 30,xhci,tablet \ -s 31,lpc \ -l bootrom,/usr/local/share/uefi-firmware/BHYVE_BHF_CODE.fd \ vm2 < /dev/null & sleep 2 && vncviewer 0:2* These are the NTFS disks that I would like to see inside the Windows 11 guest os : -s 2,virtio-blk,/dev/da4 \ -s 3,virtio-blk,/dev/da2 \ * => 34 19532873661 da4 GPT (9.1T) 34 32734 1 ms-reserved (16M) 32768 19532838912 2 ms-basic-data (9.1T) 19532871680 2015 - free - (1.0M) => 34 23437705149 da2 GPT (11T) 34 2014 - free - (1.0M) 2048 23437701120 1 ms-basic-data (11T) 23437703168 2015 - free - (1.0M)* Using the whole disks in bhyve they are recognized by fdisk. But as I said,what matters a lot for me,is to boot the nvme physical disk passing through at the same time my graphic card but it does not work. I care so much about this feature,because Ubuntu boots much much faster if I use the physical disk instead of the img / raw file. And this is again more valid if I want to boot Windows 11. It gets frozen e if I use a raw / img disk. I can't use it. But if I use the nvme disk where I have installed it physically it is much,much faster and I can use it. This is what happens : (linux and windows 11 installed on the disk nvme don't boot) https://forums.freebsd.org/attachments/screenshot_2022-03-13_16-35-42-jpg.13323/ I will keep the discussion updated also here : *https://forums.freebsd.org/threads/usb-3-0-disks-not-recognized-by-windows-if-passed-through-as-slots.84402/#post-559892 * -- Mario. --0000000000002e55cb05da1c8871 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hello.

What I want to achieve is to=20 pass thru two of my NTFS "formatted" disks to a Windows 11 VM,but= =20 without passing them thru using the USB controller in FreeBSD with a=20 bhyve virtual machine (in the example below I tried to boot Windows 11=20 from the nvme disk nvd0) AT at the same time I want to pass thru my graphic= card to a Windows 11 and / or Linux VM.

I= 9;m using this FreeBSD version :

=09 =09
FreeBSD marietto 13.0-RELEASE FreeBSD 13.0-RELE=
ASE #5 n244809-dff3dead3734: Wed Feb 23 13:16:32 CET
2022     marietto@marietto:/usr/obj/usr/src/amd64.amd64/sys/GENERIC  amd64<=
/code>

I've configured the bhyve VM like this :

bhyve -S -c sockets=3D1,cores=3D2,threads=
=3D2 -m 4G -w -H -A \
-s 0,hostbridge \
-s 1,ahci-hd,/dev/nvd0 \
-s 2,virtio-blk,/dev/da4 \
-s 3,virtio-blk,/dev/da2 \
-s 4:0,passthru,2/0/0 \
-s 4:1,passthru,2/0/1 \
-s 4:2,passthru,2/0/2 \
-s 4:3,passthru,2/0/3 \
-s 8,virtio-net,tap2 \
-s 9,virtio-9p,sharename=3D/ \
-s 10,hda,play=3D/dev/dsp,rec=3D/dev/dsp \
-s 29,fbuf,tcp=3D0.0.0.0:5902,w=3D1440,=
h=3D900 \
-s 30,xhci,tablet \
-s 31,lpc \
-l bootrom,/usr/local/share/uefi-firmware/BHYVE_BHF_CODE.fd \
vm2 < /dev/null & sleep 2 && vncviewer 0:2=

These are the NTFS disks that I would like to see inside the Windows 11 gue= st os :
=09 =09

-s 2,virtio-blk,/dev/da4 \
-s 3,virtio-blk,/dev/da2 \


=3D>         34  19532873661  da4  GPT  (9.1T)
           34        32734    1  ms-reserved  (16M)
32768  19532838912    2  ms-basic-data  (9.1T)
19532871680         2015       - free -  (1.0M)


=3D>         34  23437705149  da2  GPT  (11T)
           34         2014       - free -  (1.0M)
2048  23437701120    1  ms-basic-data  (11T)
23437703168         2015       - free -  (1.0M)

Using the whole disks in=20 bhyve they are recognized by fdisk. But as I said,what matters a lot for me,is to boot the nvme physical disk passing through at the same time my= =20 graphic card but it does not work. I care so much about this=20 feature,because Ubuntu boots much much faster if I use the physical=20 disk instead of the img / raw file. And this is again more valid if I=20 want to boot Windows 11. It gets frozen e if I use a raw / img disk. I=20 can't use it. But if I use the nvme disk where I have installed it=20 physically it is much,much faster and I can use it.

This is what happens : (linux and windows 11 installed on the disk nvme d= on't boot)



--
Mario.
--0000000000002e55cb05da1c8871--