# Virtual Platform with FreeBSD



## freebei (Feb 7, 2012)

Hi all,

We are thinking on building virtual platform with FreeBSD. We will be providing hosting services. We thought it will be better to serve via virtual platforms. We are thinking on using vmware but it would be great if anyone provide suggestions and alternatives on virtualization.

Thanks.


----------



## gkontos (Feb 7, 2012)

If you want to provide FreeBSD virtual machines you should also have a look at Linux KVM as an alternative.
IMHO Linux KVM FreeBSD hosts perform much better than ESXi hosts. 

Regards,


----------



## freebei (Feb 7, 2012)

Thank you very much for your reply. We want to use FreeBSD for stability and security. We thought that we can take advantage of vmwares tools and functionalities.


----------



## gkontos (Feb 7, 2012)

freebei said:
			
		

> Thank you very much for your reply,
> 
> We want to use FreeBSD for stability and security.
> We thought that we can take advantage of vmwares tools and functionalities.



Are you planning on spreading your hosting services across different FreeBSD virtual machines?

If you plan on using only FreeBSD hosts then you might be better off using FreeBSD jail(8)() capabilities. No need to involve vmware or any different virtualization platform for that matter.


----------



## phoenix (Feb 7, 2012)

If you are going to use FreeBSD as the *host*, for running virtual machines on top, then you are limited to:

FreeBSD Jails, or
VirtualBox

If you will only be providing FreeBSD guests, then you could probably get away with jails.

However, you'd probably get better results using Linux as the host, and running FreeBSD guests.


----------



## throAU (Feb 8, 2012)

gkontos said:
			
		

> If you want to provide FreeBSD virtual machines you should also have a look at Linux KVM as an alternative.
> IMHO Linux KVM FreeBSD hosts perform much better than ESXi hosts.
> 
> Regards,



Perhaps that is true, but until Linux KVM can do stuff like/equivalent to live storage vmotion, DRS, HA, memory sharing/compression and the level of performance monitoring instrumentation that vSphere provides, I'll stick with ESXi thanks 

If you're really paranoid about hardware failure, you can even run VMware FT, and have 2 copies of a VM running in lockstep on 2 hosts, so if one host dies the VM carries on seamlessly (runs instruction for instruction) on the other host.


Sorry to sound like a VMware sales-droid (I don't work for them), but IMHO nothing else comes close (on x86 type hardware, anyway).

It's just a question of cost.


----------



## gkontos (Feb 8, 2012)

throAU said:
			
		

> It's just a question of cost.



Exactly and it doesn't come cheap for real HA:

Link: http://www.vmware.com/products/vsphere/pricing.html


----------



## throAU (Feb 12, 2012)

Hmm, it's not so bad.  We used vSphere to virtualise a heap of old physical boxes - the cost of replacement boxes (to get redundant PSU and RAID in each one) would have been roughly equal to the cost of our 4 hosts + SAN + sphere licenses.

YMMV, but for us it worked out competitively with physical hardware on cost, but massive win on maintainability and reliability.


----------



## gkontos (Feb 12, 2012)

I agree with you but I just don't think that it is worth for selling a $20/month VPS


----------



## throAU (Feb 13, 2012)

Heh, probably not.


----------



## Jurgen (Dec 17, 2012)

throAU said:
			
		

> Perhaps that is true, but until Linux KVM can do stuff like/equivalent to live storage vmotion, DRS, HA, memory sharing/compression and the level of performance monitoring instrumentation that vSphere provides, I'll stick with ESXi thanks
> 
> If you're really paranoid about hardware failure, you can even run VMware FT, and have 2 copies of a VM running in lockstep on 2 hosts, so if one host dies the VM carries on seamlessly (runs instruction for instruction) on the other host.
> 
> ...



vMotion ? What about HAST/CARP on FreeBSD.

Additionally, I have seen FreeBSD as host for multiple VMware esxi somewhere...


----------



## vermaden (Dec 17, 2012)

@freebei

If You will have 2 servers, then I would put them into cluster with HAST, ZFS on top of that HAST and UCARP.

You will then bring various Jails and VirtualBox machines up on one of these hosts with failover on the second one.

You can of course forgot about 'tricks' like vMotion or Live Partition Mobility ... at least until some BHyVe release I hope 

You can also use Two boxes for the storage cluster and another two for the virtualization host using iSCSI.

If You already ask, try SmartOS (based on Illumos) which is created for such purposes and it uses Linux KVM and Solaris Zones at the same time, so it has similar flexibility to FreeBSD Jails along with VirtualBox.

VirtualBox VMs can of course be run headless along with the web management interface called phpVirtualBox.


----------



## Jurgen (Dec 18, 2012)

@vermaden

I saw a much better setup, well...somewhere, of a freebsd server, having Jails and running several VMware ESXi inside (using KVM I guess as hypervisor). So to actually virtualize ESXi inside KVM !

I agree, where is BHyVe.  I hope they can release it very soon.


----------



## UNIXgod (Dec 19, 2012)

Which distro would be preferred for running FreeBSD through KVM? centos, debian or custom gentoo install? Any drawbacks to just using amazon services or more importantly does the current cloud services have support for FreeBSD without issue?


----------



## vermaden (Dec 19, 2012)

Jurgen said:
			
		

> @vermaden
> 
> I saw a much better setup, well...somewhere, of a freebsd server, having Jails and running several VMware ESXi inside (using KVM I guess as hypervisor). So to actually virtualize ESXi inside KVM !



Could You explain that layer by layer? After reading Your sentence I still do not get what is being run on what and what for


----------



## Sebulon (Dec 19, 2012)

UNIXgod said:
			
		

> Which distro would be preferred for running FreeBSD through KVM? centos, debian or custom gentoo install? Any drawbacks to just using amazon services or more importantly does the current cloud services have support for FreeBSD without issue?



We are using Fedora, which is the upstream, fast moving, where-the-action-is-distro. Then thereÂ´s CentOS, which is the calm, enterprise, boring version of Fedora basically

Whatever your distro is, if you have a problem you want the distro to pick up a fix as fast as possible. We currently have an issue where FreeBSD guests panic at boot if vCPU >1, whether itÂ´s cores or sockets. I issued a bug-report at RHÂ´s bugzilla and got a reply this morning thatÂ´s itÂ´s first being fixed upstream at Fedora 18, and then backported into 17 shortly. And then CentOS in turn, picks that fix up from Fedora 17 some time later.

/Sebulon


----------

