CBSD putting disk image of bhyve-guest in RELEASE?

Hi,

Just ran freebsd-install upgrade -r 14.2 (upgrading from 14.0). After that I ran:
Code:
# /usr/sbin/freebsd-update install
Creating snapshot of existing boot environment... cannot create 'zroot/ROOT/14.0-RELEASE-p3_2025-01-09_215215/homeassi3/dsk1.vhd': 'canmount' do
es not apply to datasets of this type
error when calling zfs_clone() to create boot env
Failed to create bootenv 14.0-RELEASE-p3_2025-01-09_215215
failed.

On the server I am using CBSD to manage bhyve. I am not really sure what's going on here, though?

Code:
 # zfs list -t snapshot | grep dsk1.vhd
zroot/ROOT/default/homeassi3/dsk1.vhd@2025-01-09-21:33:07-0                              0B      -  3.96G  -
zroot/ROOT/default/homeassi3/dsk1.vhd@2025-01-09-21:33:31-0                              0B      -  3.96G  -
zroot/ROOT/default/homeassi3/dsk1.vhd@2025-01-09-21:47:40-0                              0B      -  3.96G  -
zroot/ROOT/default/homeassi3/dsk1.vhd@2025-01-09-21:52:15-0                              0B      -  3.96G  -
zroot/ROOT/default/vm3/dsk1.vhd@2025-01-09-21:33:07-0                                    0B      -  1.79G  -
zroot/ROOT/default/vm3/dsk1.vhd@2025-01-09-21:33:31-0                                    0B      -  1.79G  -
zroot/ROOT/default/vm3/dsk1.vhd@2025-01-09-21:47:40-0                                    0B      -  1.79G  -
zroot/ROOT/default/vm3/dsk1.vhd@2025-01-09-21:52:15-0

Why is this snapshot stopping freebsd-update from finishing?
 
zroot/ROOT/default is part of the boot environment. You should not create datasets under it as they will become part of that boot environment. See bectl(8) (Boot Environment Structures).

freebsd-update(8) creates new BEs when you install patches, this allows for easy rollback (because you can easily boot or revert to the previous 'state').
 
Thanks for answer and advice!

I temporarily took the risky decision to disable CreateBootEnv in /etc/freebsd-update.conf to be able to continue upgrade.

Now I need to figure out why CBSD places them in zroot/ROOT/default .
 
Now I need to figure out why CBSD places them in zroot/ROOT/default .
Yeah, you should move these to another location, outside of the zroot/ROOT/ tree. I often create a zroot/DATA dataset and place various datasets for application data under it. That keeps everything organized. It's always a good idea to separate data from the OS and applications.
 
Thanks for answer and advice!

I temporarily took the risky decision to disable CreateBootEnv in /etc/freebsd-update.conf to be able to continue upgrade.

Now I need to figure out why CBSD places them in zroot/ROOT/default .
This behavior is typical for old CBSD installations - it was done long before `beadm`. In newer CBSD versions this is taken into account (on ZFS, CBSD now requires a separate ZFS dataset), but it requires recreating the working directory.
 
This behavior is typical for old CBSD installations - it was done long before `beadm`. In newer CBSD versions this is taken into account (on ZFS, CBSD now requires a separate ZFS dataset), but it requires recreating the working directory.
Can I re-create the working directory without losing the disk image for my bhyve-image?
 
Can I re-create the working directory without losing the disk image for my bhyve-image?
You can use
Code:
cbsd bexport [compress=0]
and
Code:
cbsd bimport
to create VM image (for jail: 'cbsd jexport' + 'cbsd jimport'). But I strongly recommend not to delete the original volume ( zroot/ROOT/default/homeassi3/dsk1.vhd in your case ) after export until you run the VM on the new dataset ( your virtual machine image is a ZFS volume, so you can perform normal operations on it with zfs:
Code:
zfs rename
,
Code:
zfs send
and so on ).

Also, with `jexport` you can save settings-only (
Code:
cbsd jexport jname=test jexport_exclude='/'
(check out: `cbsd jexport --help` ), and copy the data by renaming manually
 
Back
Top