I know there is no good official way to back up VMs. But. What happens if I, say , share the location the VM are stored? Can I see them? I do not want to do this and break something, wondering if anyone has tried it.
One of the issues that iXsystems had to solve was how to deal with NFS and SMB accessing the same directories at once via sharing. That can quickly lead to corruption. IIRC, they came up with some pretty clever file locking mechanisms that worked across protocols.
The same principle applies to sharing a VM, no? The only thing modifying the VM should be the OS running the thing. Otherwise, it likely should be read only and even then I would only attempt a backup off a snapshot or a VM that has been shut down and is at rest, right?
Makes sense. Was just wondering. My VM is not 100% critical but I would like to set one up and be able to back it up. I’ll just wait until they give an official solution to do so. Thanks!
I have no doubt that it can be done. The question is rather what the best way is. I’d shut the VM down in order to only copy it in a at rest state with nothing volatile floating around but perhaps snapshots can do that also?
I simply don’t have a lot of experience with VMs since my one attempt to run windows via the TrueNAS VM subsystem was less than satisfying.
Assuming classic virtualization, the VM settings are backed up in your config backups and then you should be snapshotting and replicating the zvols for backup.
If your zvol is set for sync=always, (which is very slow without a fast slog), then your backups will be crash consistent.
Crash consistent means the backups will be the same as if you had simply backed up your VM after it had abruptly crashed, or lost power.
Which is probably fine.