SNAPSHOTS, CLONES, AND ROLLBACKS, OH MY!
Before we get started, my tasty friends (yes, hungry!), let me tell you, I am unfathomably proud of myself for making the graphic for this in Gimp. Yeah, it only took me like 2.5 hours. blows on nails. I’m that good.
Ok, one of the awesome FreeBSD tools I use frequently:
vm clone name[@snapshot] new-name vm snapshot [-f] name|name@snapshot
Later, if you like, you can restore a previous snapshot of your vm:
rollback [-r] <name@snapshot>
VM-BHYVE SNAPSHOT: Easy as Pie 😉
It’s best to make sure the conta`iner is powered-off:
vm poweroff $name
Now, we can make the snapshot…
root@bean ~ vm snapshot fnas11vm 2089
“Trust But Verify”
— Ronald Reagan
root@bean ~ zfs list -t snap | grep fnas11vm 1 ↵ 2090 NAME USED AVAIL REFER MOUNTPOINT zroot/vm/fnas11vm@2018-01-02-12:38:07 0 - 96K - zroot/vm/fnas11vm/disk0@2018-01-02-12:38:07 0 - 1.21G - zroot/vm/fnas11vm/disk1@2018-01-02-12:38:07 0 - 7.53M -
Creating an image from the container for provisioning more containers!
root@bean ~ vm image create -d 'fnas11_image' fnas11vm 2099 Creating a compressed image, this may take some time... Image of fnas11vm created with UUID 650759c6-efff-11e7-8013-0cc47ac2a6ec