bhyve vm clone - how to promote clone?

I have a bhyve vm running Rocky Linux 8.7 (RL). I have vm-bhyve installed. I need to test that the upgrade to RL 8.8 will not disrupt the user application running on that vm. My plan is to clone the production vm and perform the upgrade on that. If everything goes well then I would like to promote the clone instead of reapplying the upgrade to the original. However, while vm clone guest is documented I cannot find a reference in the vm man page respecting how promotion is done. I would like some guidance on the procedure to follow to promote a vm bhyve clone. Is is simply: zfs promote ZVOL?
 
You need to promote zfs filesystem with cloned vm config and all of the child zvol's. After that you may delete original vm and rename cloned. Basic steps:

1. zfs promote zroot/bhyve/cloned-vm
2. zfs promote zroot/bhyve/cloned-vm/disk0
3. zfs promote zroot/bhyve/cloned-vm/diskN
4. vm stop origin-vm
5. vm delete origin-vm
6. vm stop cloned-vm
7. vm rename cloned-vm origin-vm
8. vm start origin-vm

Please note before deleting the original vm in step 5 - it may contain changed workload data since cloning.
 
Back
Top