Date: Sat, 14 Sep 2024 07:18:53 -0700 From: "Chuck Tuffli" <chuck@tuffli.net> To: void <void@f-m.fm>, "FreeBSD virtualization" <freebsd-virtualization@freebsd.org> Subject: Re: nvme virtualisation string for bhyve Message-ID: <484d66f9-3f61-4512-b7e7-6142c79fd04c@app.fastmail.com> In-Reply-To: <ZuWMPNMQEYYRDL8f@int21h> References: <ZuWMPNMQEYYRDL8f@int21h>
next in thread | previous in thread | raw e-mail | index | archive | help
--72ff171a59e94fc2b4713140065a723a
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
On Sat, Sep 14, 2024, at 6:14 AM, void wrote:
> ...
> I usually start my vms with a bhyve variable for the disk
> like:
>=20
> -s 4,virtio-blk,/dev/zvol/ssd/vm2 \
>=20
> The man page for bhyve says this:
>=20
> ### NVMe device backends
> ### =E2=80=A2 devpath[,maxq=3D#][,qsz=3D#][,ioslots=3D#][,sect=
sz=3D#][,ser=3D#][,eui64=3D#][,dsm=3Dopt]
>=20
> How do I get this information? Like maxq qsg ioslots sectorz ser eui64=
dsm
>=20
> The ssds are:
>=20
> nvme0: <Intel DC PC4500>
> nvme1: <DC P3700 SSD>
If you want the guest to see their storage as an NVMe device, you would =
replace "virtio-blk" with "nvme" in your device specification above (i.e=
., -s 4,nvme,...). The bhyve NVMe emulation code will pick sensible valu=
es for the above device characteristics like the max number of supported=
queues (a.k.a., maxq). If you want to override the values bhyve picks, =
you can add those key-value pairs after the device name.
Note that the emulated device the guest VM sees is entirely separate fro=
m the devices providing the storage to the host OS. As an example, the g=
uest can have an NVMe drive backed by a zpool on the host comprised of S=
ATA or SCSI drives.
So if the question was, "how do I determine maxq, qsz, etc. from the hos=
t drive information?", the answer is, you wouldn't.
--chuck
--72ff171a59e94fc2b4713140065a723a
Content-Type: text/html; charset=utf-8
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE html><html><head><title></title><style type=3D"text/css">p.Mso=
Normal,p.MsoNoSpacing{margin:0}</style></head><body><div>On Sat, Sep 14,=
2024, at 6:14 AM, void wrote:<br></div><blockquote type=3D"cite" id=3D"=
qt" style=3D""><div>...<br></div><div>I usually start my vms with a bhyv=
e variable for the disk<br></div><div>like:<br></div><div><br></div><div=
>-s 4,virtio-blk,/dev/zvol/ssd/vm2 \<br></div><div><br></div><div>The ma=
n page for bhyve says this:<br></div><div><br></div><div>### NVMe =
device backends<br></div><div>### =E2=
=80=A2 devpath[,maxq=3D#][,qsz=3D#][,ioslots=3D#][,sectsz=3D=
#][,ser=3D#][,eui64=3D#][,dsm=3Dopt]<br></div><div><br></div><div>How do=
I get this information? Like maxq qsg ioslots sectorz ser eui64 dsm<br>=
</div><div><br></div><div>The ssds are:<br></div><div><br></div><div>nvm=
e0: <Intel DC PC4500><br></div><div>nvme1: <DC P3700 SSD><br=
></div></blockquote><div><br></div><div>If you want the guest to see the=
ir storage as an NVMe device, you would replace "virtio-blk" with "nvme"=
in your device specification above (i.e., -s 4,nvme,...). The bhyve NVM=
e emulation code will pick sensible values for the above device characte=
ristics like the max number of supported queues (a.k.a., maxq). If you w=
ant to override the values bhyve picks, you can add those key-value pair=
s after the device name.<br></div><div><br></div><div>Note that the emul=
ated device the guest VM sees is entirely separate from the devices prov=
iding the storage to the host OS. As an example, the guest can have an N=
VMe drive backed by a zpool on the host comprised of SATA or SCSI drives=
.<br></div><div><br></div><div>So if the question was, "how do I determi=
ne maxq, qsz, etc. from the host drive information?", the answer is, you=
wouldn't.<br></div><div><br></div><div>--chuck<br></div></body></html>
--72ff171a59e94fc2b4713140065a723a--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?484d66f9-3f61-4512-b7e7-6142c79fd04c>
