EpiJunkie

chyves-demo-auto-reverted-snapshot

by EpiJunkie 2016-08-21 01:40:16 UTC
  • FreeBSD / csh / xterm
  • 304

This is demonstration of snapshot functionality and the automated revert to snapshot on boot, reboot, or both functionality.

chyves info -bv

chyves obsd snapshot list

chyves obsd snapshot

chyves obsd snapshot list

chyves obsd start

chyves obsd console

vi chyves.demo.txt

< This was changed after the first snapshot was taken. >

halt -p

chyves obsd snapshot rollback

chyves obsd start

chyves obsd console

vi chyves.demo.txt

Well you can see the snapshot reverted the change I made to this document. No big deal right? I mean that is the purpose of a ZFS snapshot. Well there is a feature with chyves that speeds this up by automating this process on boot or reboot or both. This is done by setting the guest property 'revert_to_snapshot' and the 'revert_to_snapshot_method'.

halt -p

~~.

< To make this interesting, we will change the RAM allocation and add a tap interface. >

chyves info -bv

chyves network bridge2 private

chyves network obsd add tap bridge2

chyves obsd set ram=2g revert_to_snapshot_method=reboot

chyves info -bv

chyves list bridges

chyves obsd start

chyves obsd console

cat chyves.demo.txt

reboot

~~.

[ Watching the reversion process in the host terminal ]

chyves obsd console

cat chyves.demo.txt

ifconfig

< Seems the tap interface is missing. >

dmesg | grep mem

< Seem the ram is back down to 2G. >

< Let's see what the host changes were. >

~~.

chyves info -bv

chyves list bridges

< The host also removed the device that no longer exists to prevent a conflict later on. >

< If a tap interface did exist on the snapshot state that the changed state had, it would be added to the default bridge. >

More by EpiJunkie