Example mirage-eio unikernels
813 B
17 lines
1Boot the sqlite unikernel twice. Each boot opens a notafs filesystem on the
2persistent block device `disk`, bumps a boot counter held in a SQLite database,
3and writes it back, so the count survives across boots. notafs_extract then
4pulls the SQLite file out of the block device so the host's sqlite3 can read
5the count back. setup.sh runs this in a scratch directory.
6
7 $ unikernel.exe
8 +boot #1: persisted on the block device via notafs + SQLite
9 $ unikernel.exe
10 +boot #2: persisted on the block device via notafs + SQLite
11 $ notafs_extract disk app.db app.db
12 $ sqlite3 -header -box app.db "SELECT n AS boot_count FROM boots;"
13 ╭────────────╮
14 │ boot_count │
15 ╞════════════╡
16 │ 2 │
17 ╰────────────╯