# FreeBSD as a Hypervisor to Replace Linux



## jasonvp (Dec 21, 2014)

Hey gang -

The executive summary of this question is: I think I'm S.O.L.  And if that's the case, it's perfectly OK.

Challenge: I have two Ubuntu servers here at home, both running a KVM hypervisor with a slew of VMs on each.  The storage for each VM is via Linux's LVM, which is what will probably put a quick end to this idea.  I'm considering converting them both over to FreeBSD, and either using bhyve or the KVM port.

I'm assuming there's no way to make this happen on FreeBSD given the LVM volumes, without first converting them over to a file (qcow, raw, et al)?  That's a step I'd like to avoid because of the down time involved.

For the record: I know that FreeBSD, via fuse, can read LVM volumes.  But it can only do it in read-only mode, which won't work in this case.


----------



## ondra_knezour (Dec 21, 2014)

What about copy/rsync volume when the VM is running, shut it down and rsync only a "few" changes files/sectors again, start at the new server. Repeat for each VM ad nauseam


----------



## jasonvp (Dec 23, 2014)

ondra_knezour said:


> What about copy/rsync volume when the VM is running, shut it down and rsync only a "few" changes files/sectors again, start at the new server. Repeat for each VM ad nauseam



I think "S.O.L." describes me better:  this isn't going to happen.  The idea was to convert the hypervisor to FreeBSD without touching the existing VM volumes, and then get them up and running as quickly as possible.  The VMs volumes are all on separate physical drives, which is how I was planning to do this.  I also have the KVM configs on a separate (small) drive as well, so that I can nuke the hypervisor's OS at random and quickly rebuild it.

I should have done more research.  KVM no workie on FreeBSD 10+.  Had I known that, I wouldn't have even attempted it. 

So for now, the hypervisors stay running Linux.  That's not to say I won't convert my web servers, mail servers, DNS servers, etc, etc all over to FreeBSD though...


----------



## Oko (Dec 23, 2014)

jasonvp said:


> I think "S.O.L." describes me better:  this isn't going to happen.  The idea was to convert the hypervisor to FreeBSD without touching the existing VM volumes, and then get them up and running as quickly as possible.  The VMs volumes are all on separate physical drives, which is how I was planning to do this.  I also have the KVM configs on a separate (small) drive as well, so that I can nuke the hypervisor's OS at random and quickly rebuild it.
> 
> I should have done more research.  KVM no workie on FreeBSD 10+.  Had I known that, I wouldn't have even attempted it.


If you really, really want to get rid of Linux you might want to try SmartOS https://smartos.org/. It is based on Illumos a grand son of Solaris. I stop using Solaris 2002 and its future with Oracle looks very bleak. However Zones were killer features many years ago when Linux people didn't know how to pronounce Solaris Zones and BSD Jail let alone to have  something similar. ZFS came out of that kitchen and many people will argue that ZFS still works "better" on Solaris. I am not familiar with their implementation of KVM but it definitely exists. ZFS+KVM on Solaris sounds like a winner over KVM+ZFS on Linux (ZFS on Linux is sad).

At work we use KVM on Red Hat. I would love to get a rid of Linux for visualization but I don't still have enough confidence with Bhyve (We have to have Linux guests). On another hand IMHO Jails are light years ahead of LXC.


----------



## ondra_knezour (Dec 23, 2014)

At first, I am out of ideas what S.O.L. may stand for 

Anyway, there is bhyve(8) hypervisor, VirtualBox runs on the FreeBSD, Xen is coming sometime in the future. However, I would definitely migrate your storage to something native, probably ZFS zvols. You may consider some little exotic configurations how to minimize downtime during the move, for example exporting LVM volumes via NFS or iSCSI, mount them on the FreeBSD box, start VMs there, move data in the backround with writes from the VMs redirected somewhere using nullfs/unionfs...


----------



## jasonvp (Dec 24, 2014)

ondra_knezour said:


> At first, I am out of ideas what S.O.L. may stand for



Shit Outta Luck.



> Anyway, there is bhyve(8) hypervisor, VirtualBox runs on the FreeBSD, Xen is coming sometime in the future.



Bhyve isn't quite ready for prime time yet.  VirtualBox isn't a server-level hypervisor, it's something you run on your desktop.  And Xen is fine, but as you point: not here yet.

And that's all OK.  It was an interesting thought exercise but one I'm not going to complete.


----------



## Edsel (Dec 30, 2014)

jasonvp said:


> So for now, the hypervisors stay running Linux.  That's not to say I won't convert my web servers, mail servers, DNS servers, etc, etc all over to FreeBSD though...



If everything is running FreeBSD it might be an idea to use jails. https://www.freebsd.org/doc/handbook/jails.html


----------

