I want confirm my understanding of how "vm clone" works since I'm not finding an answer elsewhere....
Assuming we are using zfs, if we have a client "test" whose disk image is file based the cloning is pretty straightforward.
However, if disk image is zvol based, things change a bit, we must do the following:
This is what empirically works for me but it leaves me wondering if I'm missing some other nuances here?
Assuming we are using zfs, if we have a client "test" whose disk image is file based the cloning is pretty straightforward.
Code:
# create a snapshot of the client we want to clone
zfs snapshot zdata/bhyve/test@mark
# create the clone
vm clone test@zdata/bhyve/test@mark testclone
However, if disk image is zvol based, things change a bit, we must do the following:
Code:
# create two snapshots, one for the machine and one for the zvol
# the snapshot tags MUST MATCH
zfs snapshot zdata/bhyve/test@mark
zfs snapshot zdata/bhyve/test/disk0@mark
# now we can create the clone, both the snapshots must exist and must share the same tag
vm clone test@zdata/bhyve/test@mark testclone
This is what empirically works for me but it leaves me wondering if I'm missing some other nuances here?