Open syleishere opened 1 week ago
Can't see anything in the release notes. Could you please link to the info?
EDIT:
Plus it looks like you have to use the checkpoint
instead of suspend
:
--checkpoint=<filename>
Save a snapshot of a virtual machine. The guest memory
contents are saved in the file given in <filename>. The
guest device and vCPU state are saved in the file
<filename>.kern.
--suspend=<filename>
Save a snapshot of a virtual machine similar to
--checkpoint. The virtual machine will terminate after
the snapshot has been saved.
I saw the options in the man page in FreeBSD 14.1, I assumed they were working without patching kernel with BHYVE_SNAPSHOT. Trying from command line, options are not recognized, so I guess it has not officially been added yet.
For anyone that wants it working procedure is as follows:
cd /usr/src/sys/amd64/conf
cp GENERIC MYKERNEL
(edit MYKERNEL) (add: options BHYVE_SNAPSHOT)
cd /usr/src
make -j$(sysctl -n hw.ncpu) buildworld -DWITH_BHYVE_SNAPSHOT
make -j$(sysctl -n hw.ncpu) buildkernel KERNCONF=MYKERNEL
make installkernel KERNCONF=MYKERNEL
shutdown -r now
etcupdate -p
cd /usr/src; make installworld
shutdown -r now
etcupdate -B
shutdown -r now
Just checked the FreeBSD VMs, and the feature is still hidden behind a build flag on the 14-STABLE
and 15-CURRENT
. Looks like we're not gonna get it any time soon (at least by default that is).
yaroslav, checked your github repo, haven't tried it but I noticed it says on your hoster page OpenBSD etc not supported. I have had no issues at all running OpenBSD, NetBSD, home assistant etc. Here is link to blog to help you make your project better :) https://blog.sunsaturn.com/freebsd/create-virtual-machines-with-freebsd-vm-bhyve/
Good job on doing all that in GO :) Personally I would have done it on flet framework with a fastapi server, that way it would support all OS's including google tv :) Be nice to see interface on the TV, its 2024 :) Plus if you like working with python, when mojo hits full release status be easy transition to a language faster than C and rust.
I know OpenBSD works under Bhyve, but it threw some bootloader errors when I first tried it in the UEFI mode. Unfortunately, fixing it is not a priority right now (and I personally haven't had a use-case for it, yet).
vm-bhyve
has been a huge inspiration for me, that's why I stick around here and help other users, whenever I can :smile:
1st iteration of Hoster
was written in Python, but it wasn't cutting it:
venv
dependencies? On the system? What if the end user updates them? In a separate folder? What if the user decided to switch to a newer Python version by default? I had this happen to my "test subjects" all the time.So I've learned Go (and JS, eventually, for the front) and never looked back. The project is far from being ready for the prime time, but it's getting there (at least I've got few paying customers, who additionally sponsor my small dev lab). So in the end, I hope to create a virtualisation WebUI (+ backend + CLI, but hey, who is counting?) for the FreeBSD community. The one they want and like (hopefully? lol) :sweat_smile:
(written using Go+VueJS):
@yaroslav-gwit that's pretty impressive! I mean I won't use it personally, but I can see this deployed for customers who want a GUI for management.
Just to be clear, are you automating bhyve, or vm-bhyve under the hood?
I used to automate the vm-bhyve
in the beginning, but it became a complete rewrite in the end (because I had to write my own VM process daemon, etc etc). It also has a REST API interface and a "modern feel" CLI, with the autocomplete, pretty tables and whatnot (checkout the repo, it's all there).
Support needs to be added for bhyvectl --suspend and bhyve -r