Bug 271449 - FreeBSD Handbook: re-write 'Creating a FreeBSD Guest' and 'Using ZFS with bhyve Guests'
Summary: FreeBSD Handbook: re-write 'Creating a FreeBSD Guest' and 'Using ZFS with bhy...
Status: Open
Alias: None
Product: Documentation
Classification: Unclassified
Component: Books & Articles (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: freebsd-doc (Nobody)
URL: https://github.com/freebsd/freebsd-do...
Keywords: needs-patch
Depends on:
Blocks:
 
Reported: 2023-05-16 11:03 UTC by Steven Friedrich
Modified: 2023-07-29 05:48 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Steven Friedrich 2023-05-16 11:03:55 UTC
I am new to virtualization and zfs.

Could someone re-write 23.6.2. Creating a FreeBSD Guest
to use zfs instead of ufs?

Create a file to use as the virtual disk for the guest machine. Specify the size and name of the virtual
disk:
# truncate -s 16G guest.img


I read 23.6.6. Using ZFS with bhyve Guests

If ZFS is available on the host machine, using ZFS volumes instead of disk image files can provide
significant performance benefits for the guest VMs. A ZFS volume can be created by:
# zfs create -V16G -o volmode=dev zroot/linuxdisk0
When starting the VM, specify the ZFS volume as the disk drive:
# bhyve -A -H -P -s 0:0,hostbridge -s 1:0,lpc -s 2:0,virtio-net,tap0 -s3:0,virtio
-blk,/dev/zvol/zroot/linuxdisk0 \
-l com1,stdio -c 4 -m 1024M linuxguest

but can't correlate it.
I believe the vm man page states that using a zfs volume through a /dev point should be avoided.
What is best practice for a mere workstation using root-on-zfs?

It looks like these two sections were written by different people.
I know much has changed over the last two years.