I’d like to compare any changes between a running instance and a snapshot but there’s some issues. The instance is a virtual machine, and zfs shows it to be of the type volume. Because it’s a volume type, there isn’t a mountpoint to set. And /dev doesn’t seem to show any block devices that i can try accessing.
How can i do a diff between a vm instance and a snapshot if i cannot mount the block device ?
Easiest is to lxc copy name/snapshots old-name so you get a new instance from that snapshot, then you can start it and compare things between the two. You may want to remove the network interface from old-name though to avoid it conflicting with the current version of the instance.
You can do a zfs set volmode=full name/of/dataset which will make some /dev/zvol entries show up. However I don’t believe you can do that on a snapshot, so you’ll still need to make a copy.
Yeah, LXD snapshots create a ZFS snapshot. But for a VM, this means a snapshot on a ZFS volume, so not something you can mount directly, it’s a big binary block device with partitions and such.
A vm snapshot can be mounted if snapdev=visible is set additionally.
Altogether:
lxc snapshot mytestvm backup
zfs set volmode=full tank/virtual-machines/mytestvm.block
zfs set snapdev=visible tank/virtual-machines/mytestvm.block
mount /dev/zvol/tank/virtual-machines/mytestvm.block\@snapshot-backup-part2 /mnt/mytestvm.block