Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 11 Jan 2024 17:17:00 +0000
From:      void <void@f-m.fm>
To:        freebsd-questions@freebsd.org
Subject:   Re: Bhyve backup options?
Message-ID:  <ZaAijDhwEdo_4J-0@int21h>
In-Reply-To: <CAMW11TZEu0KOwv%2B7XBkfA4XVihMyi5NCZfaEyZv41U0moyFuRA@mail.gmail.com>
References:  <CAMW11TZEu0KOwv%2B7XBkfA4XVihMyi5NCZfaEyZv41U0moyFuRA@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, Jan 11, 2024 at 05:15:00PM +0300, Mark wrote:

>
>Second -and much important- question:
>
>Is it a bad practice to take a backup of a running bhyve VM instance
>(actually doing tar on the 'disk1.img' VM disk)? Should the VMs be stopped
>before doing so? Any data loss possibility, otherwise?

disk1.img would be file-backed. yes, I'd stop the vm in that situation.

>If powering them off is needed, and in case of dozens of VMs running, how
>would you handle that?

If the vm is zvol-backed [1] then one can take a snapshot of the zvol.
You could turn the vm off, make the snapshot, turn it back on again 
for 100% safety. making the snapshot is very quick.

I've not tried, yet, making the snapshot *while* the vm is running.
I *think* you can (because zfs handles it) but for better advice I suggest
you post to the freebsd-fs mail list as that's where the filesystem
experts are.

[1] you can convert a file-backed bhyve img to a zvol backed one easily
     by writing to a newly-created zvol of the same size as the image with dd.
-- 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?ZaAijDhwEdo_4J-0>