Pat Maddox
unread,Mar 23, 2025, 5:12:46 PM3/23/25Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to freebsd-...@freebsd.org
I'm running a bhyve VM (freebsd guest), and want to back up individual files from the VM. I thought I would need to use SSH, or possibly stop the VM and mount the image from the host.
However, I tried mounting the image while the VM was running... and to my surprise, it worked (I was expecting a kernel panic):
1. `mdconfig -a /vm/myvm/myvm.img`
2. `zpool import -f -o readonly=on -t -R /tmp/myvm-root -d /dev/md0p2 zroot myvm-root`
I was then able to read the files from the host _as of the time I ran `mdconfig`_. So if I add / edit / delete files in the VM, the host doesn't see it until I unmount and remount.
Is this a wonderful feature that lets me back up individual files from a running VM? Or a giant footgun that will eventually corrupt my VM image?
Pat