Re: [vm-bhyve] adding existing vm instances to the vm-bhyve system
tech-lists wrote: > > How would one import a freebsd or linux vm currently running on a > freebsd-12 server into vm-bhyve management? I can see lots of > instructions for starting from fresh, but none for import of existing. > Is this possible? > > The guests are currently running as per > https://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/virtualization-host-bhyve.html > in screen. Some guests are file-backed, others zvol-backed. When I migrated a VM from one vm-bhyve installation to another (on a different host), it was sufficient to "zfs send -R" the vm dataset on the old host and "zfs receive" it on the new host under the $vm_dir. -- Victor Sudakov, VAS4-RIPE, VAS47-RIPN 2:5005/49@fidonet http://vas.tomsk.ru/ signature.asc Description: PGP signature
Re: [vm-bhyve] adding existing vm instances to the vm-bhyve system
> Hi, > > How would one import a freebsd or linux vm currently running on a > freebsd-12 server into vm-bhyve management? I can see lots of > instructions for starting from fresh, but none for import of existing. > Is this possible? > > The guests are currently running as per > https://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/virtualization-host-bhyve.html > in screen. Some guests are file-backed, others zvol-backed. > > thanks, > J. This is possible, and not overly complex, but also non-trivial to do. First some preliminary data collection and issue resolution needs to be done. a) vm-bhyve assumes each vm lives in a directory by itself, and the collection of vm's all share a common parent. If your setup is not like this you need to try and bring it to this form. b) vm-bhybe wants to, but does not have to, manage all your tap devices, creating and destroying them as you go, sorting this out between /etc/rc.conf methods and vm-bhyve methods can be messy if you have done anything very fancy. The mechanics once this much is done is a matter of writting a fairly direct translation of your bhyve(8) command into a .conf file that vm-bhyve uses. Something like this for my more fb-bld-13-amd64/fb-bld-13-amd64.conf (Note: The directory name and .conf file name must match for vm-bhyve to work, which makes an easy way to make vms disappear from its management by changing either name) loader="bhyveload" cpu=4 memory=2048M network0_type="virtio-net" network0_switch="trunked" #disk0_name="/home/ISO/x/FreeBSD-13.0-CURRENT-amd64-20181213-r342020-disc1.iso" #disk0_dev="custom" #disk0_type="ahci-hd" disk0_type="ahci-hd" disk0_name="disk0.img" wiredmem=1 network0_mac="58:9c:fc:00:ce:7f" I picked this sample specifically as it shows how to refer to a "disk" that is not in the home directory of the vm by using the _dev=custom option, which you may very well need to do for some of your vms. You do not need to put the *_mac stuff in there, vmbhyve well automagically add those for you. Personally I have migrated both my self managed bhyve stuff, and almost all of my ESXi based FreeBSD vm's to vm-bhyve. -- Rod Grimes rgri...@freebsd.org ___ freebsd-virtualization@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-virtualization To unsubscribe, send any mail to "freebsd-virtualization-unsubscr...@freebsd.org"
Re: [vm-bhyve] adding existing vm instances to the vm-bhyve system
Hello "J", so you'd like to manage your current bhyve guests with vm (https://github.com/churchers/vm-bhyve)? Very easy.. just create a configuration for them. I use a /var/vm directory, here is my /etc/rc.conf vm_enable="YES" vm_dir="zfs:zpoolssd/vm" -- regards / s pozdravem Jakub Chromy CGI Systems div. CGI CZ s.r.o. sa...@cgi.cz 775 144 257 234 697 102 www.cgi.cz On 12.5.2019 13:06, tech-lists wrote: Hi, How would one import a freebsd or linux vm currently running on a freebsd-12 server into vm-bhyve management? I can see lots of instructions for starting from fresh, but none for import of existing. Is this possible? The guests are currently running as per https://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/virtualization-host-bhyve.html in screen. Some guests are file-backed, others zvol-backed. thanks, ___ freebsd-virtualization@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-virtualization To unsubscribe, send any mail to "freebsd-virtualization-unsubscr...@freebsd.org"
[vm-bhyve] adding existing vm instances to the vm-bhyve system
Hi, How would one import a freebsd or linux vm currently running on a freebsd-12 server into vm-bhyve management? I can see lots of instructions for starting from fresh, but none for import of existing. Is this possible? The guests are currently running as per https://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/virtualization-host-bhyve.html in screen. Some guests are file-backed, others zvol-backed. thanks, -- J. signature.asc Description: PGP signature