# OpenSolaris/Xen Migration To FreeBSD



## Vegan (Jul 28, 2010)

Yet another victim of corporatism graced by the most profitable software company in the world, the  OpenSolaris operating environment will likely recede as the community-driven OpenSolaris Governing Board will elect to terminate itself August 23 following a cleverly poised scheme during the Sun Microsystems buyout to ax the open source counterpart of the impending Oracle Solaris 11 OS. Needless to say, Larry Ellison cannot have enough market capitalization at the cost of innovation and freedom.

I am looking at FreeBSD to provide a comparable virtualization solution I presently maintain. The setup I employ is the Sun-distributed OpenSolaris OS running as the host domain sporting the Xen 3 hypervisor on a x86 64-bit processing architect. The filesystem utilizes ZFS on local storage devices configured with RAIDZ. Guest domains/virtual machines running on the platform consist of OpenSolaris, FreeBSD, and GNU/Linux operating environment-derived operating systems as  paravirtualized and/or fully-virtualized nodes all bearing virtualized NICs. Lastly, this is a currently deployed, production server environment. Is FreeBSD able to provide an equivalent level of virtualization to satisfy these conditions?

Reading through the FreeBSD documentation, it appears the only medium of hosted viritualization is with Oracle VirtualBox, which is an inherently slower type two hypervisor and tailored for desktop/workstation purposes. FreeBSD Jails, much like OpenSolaris Zones, are limited to base system's kernel to virtualize guest instances, failing to provide the desired all-inclusive isolation and non-BSD VMs. The possibility of another, yet unofficial approach existing that I am not attuned with may be achievable, hence my inquiry.

Thanks in advance.


----------



## OH (Jul 28, 2010)

You might want to take a look at NetBSD: http://www.netbsd.org/ports/xen/howto.html.

No ZFS yet though


----------



## vermaden (Jul 28, 2010)

@Vegan

With FreeBSD You are 'limited' to VirtualBox, but You have ZFS v14, with NetBSD You have Xen 3.x but You do not have ZFS, I would go for FreeBSD/VirtualBox/ZFS tandem for sure, but better check both and decide which one works better for You.


----------



## Vegan (Jul 29, 2010)

Thank you for the prompt responses.

The reason I am inclined to stub Citrix XenServer and Oracle VM is due to ZFS not being an available filesystem, despite meeting all other requirements. Another free-of-charge Xen hypervisor that never made it to its first public release was Sun xVM Server, built on a modified version of OpenSolaris implementing ZFS, which too was axed by Oracle in April 2009 during regulatory approval of the Sun Microsystems buyout.

FreeBSD 8, apart from a nonexistent Xen dom0 kernel, is my best alternative moving away from the doomed OpenSolaris platform. I was quite ecstatic to note the root pool in FreeBSD can be configured with RAIDZ, a functionality not present in Solaris. Further evaluating VirtualBox, for a fully-virtualized hypervisor, its processing and I/O performance is not lagging far from Xen or KVM, which have the advantages of paravirtualization or kernel-based virtualization, respectively. With only essential services enabled, the X window system off, and running VirtualBox Open Source Edition in headless mode, I suspect it will experience similar measures from my present OpenSolaris dom0/Xen 3/ZFS RAIDZ setup.

In addition, can someone point me to any addition literature on best practices with FreeBSD 8.1 and VirtualBox OSE 3.2 beyond the official documentation I have already acknowledged?


----------



## vermaden (Jul 30, 2010)

Vegan said:
			
		

> Further evaluating VirtualBox, for a fully-virtualized hypervisor, its processing and I/O performance is not lagging far from Xen or KVM, which have the advantages of paravirtualization or kernel-based virtualization, respectively.



When You install VirtualBox Guest Additions, which are paravirtual drivers, many things will be run faster.



			
				Vegan said:
			
		

> In addition, can someone point me to any addition literature on best practices with FreeBSD 8.1 and VirtualBox OSE 3.2 beyond the official documentation I have already acknowledged?



Start searching with *headless/cli virtualbox* keywords, look for articles like that:
http://www.linux-mag.com/id/7673
http://www.virtualbox.org/wiki/User_FAQ

If You need heavy I/O performance, then create RAID10 in ZFS from disks with small Random Access Time, like WD Black/RE3/RE4 for SATA or even VelociRaptor ones (or an SSDs), You can also go SAS way which will be more expensive foe even faster I/O, depends how 'big' this project will be.

Be sure to enable AHCI (if Your hardware allows it) and get a lot of RAM for VMs and ZFS.


----------



## OH (Aug 2, 2010)

YMMV of course, but I had a lot of trouble keeping the virtual clock in sync with the hosts one when using more than one CPU. Depending on the chosen timecounter hardware, I would lose 11 to 44 seconds every minute. Guest additions did very little to resolve this.

As a solution I now assign all my guests one CPU maximum.


----------



## minimike (Aug 14, 2010)

OH said:
			
		

> You might want to take a look at NetBSD: http://www.netbsd.org/ports/xen/howto.html.
> 
> No ZFS yet though



But NetBSD 6.0 will destroy Solaris and maybe FreeBSD 
If I could wait, I would wait for NetBSD 6.0.
Comes with Xen, an RBAC System and ZFS. Hopefully someone will port Crossbow to a *BSD then the "weapon" will be complete


----------



## vermaden (Aug 14, 2010)

minimike said:
			
		

> If I could wait, I would wait for NetBSD 6.0


When it is meant to be released?


----------



## minimike (Aug 14, 2010)

Don't know. I wil ask some Guys on the Froscon 2010 next saturday


----------



## vermaden (Aug 14, 2010)

@minimike

Thanks.


----------



## lme@ (Aug 14, 2010)

minimike said:
			
		

> Don't know. I wil ask some Guys on the Froscon 2010 next saturday



AFAIK there is only a FreeBSD and PC-BSD booth this year.


----------



## Vegan (Aug 15, 2010)

Pushing the thread back on topic, news was leaked this past Friday that Oracle has indeed killed OpenSolaris operating environment and binary releases. No surprise to any of those in the loop. Read the internal brief here- http://opensolaris.org/jive/thread.jspa?threadID=133043&tstart=0

However, Nexenta (http://www.nexenta.com/corp/) divulged a number of weeks ago an already persisting fork of the OSOL codebase, called Illumos, which sought to completely open source the ON consolidation and other components that make up the operating environment (not an OS distribution per say), effectively is the new community to sustain the development of OpenSolaris- http://illumos.org/ Further reading on this project- http://gdamore.blogspot.com/2010/08/hand-may-be-forced.html

Given the existence of the Illumos community/operating environment fork, which will become the codebase for future Nexenta Core Platform Nexenta and NexentaStor operating system releases (currently OSOL-derived), the resolve to my initial inquiry is to easily migrate from the Oracle OpenSolaris OS to the NexentaStor OS that has a non-Oracle-dependent future. A free, truly open, and possibly superior Solaris 11-like distribution is the implication of this dignified, progressive shift. I am quite content now!


----------



## erik2e (Aug 19, 2010)

*No dom0 in Nexenta*

Being in the boat with Vegan, stuck with OpenSolaris xVM/Xen ZFS servers, I'm also searching for an upgrade solution, and was investigating the same tracks.

IllumOS seems promising with people from OpenSolaris coming in, but not yet ready, although it might go fast.

Nexenta does not seem to support any kind of virtualization hosting. To my (small) knowledge, neither xVM/Xen, nor VirtualBox or something similar actually works on Nexenta. So unless I did not digged enough to find some hack for it, Nexenta is not (yet) the solution.

I'll investigate the FreeBSD/ZFS/VirtualBox, as it seems interesting (Virtualbox being available on desktops and supporting migration).

If I don't get good results, I might go for Nexenta or FreeBSD as ZFS filer, along with Linux or NetBSD dom0 dedicated servers, and dedicated network link between them.

Did someone already used FreeBSD/ZFS for this kind of usage ?


----------



## vermaden (Aug 19, 2010)

erik2e said:
			
		

> Did someone already used FreeBSD/ZFS for this kind of usage ?



I run similar setup but not in production, I just have FreeBSD setup with 'most important' part of base system on UFS rest on ZFS on 3 disks RAIDZ. I run VirtualBox there with various guests like Windows XP/7, Linux (CentOS mostly for Oracle and/or IBM TSM), Minix (for fun), FreeBSD (for various tests/setups) and so, often all of them running at the same time.

Its 4 core machine with 4GB RAM, rather cheap setup with Intel Q8300 (with VT-x) and Intel Q35 (with VT-d) motherboard.

I do not use 'dedicated' ZVOLs from ZFS for that, only 'plain' disk images on filesystem, but for production it would be a good idea to use ZVOLs from ZFS.

... You can also still run an older OpenSolaris and/or Solaris SXDE/SXCE/10 release for Your Xen setup and the upgrade to Illusmos based OS or migrate to other OS if Illusmos would fail/would be taking too long to respawn.


----------



## ethoms (Dec 9, 2010)

*No need to migrate*

I know this an old thread, but I think it's still relevant. I'm seriously looking at FreeBSD to replace my Solaris 10. I was following OpenSolaris keenly until Oracle ended it. I'm running OpenIndiana at home, but considering trying out FreeBSD, it seems perfect at the moment. My top ten reasons why FreeBSD is a good choice: (1) it's FOSS (2) Very stable apparently (3) true, homogenized UNIX (4) good documentation (5) Jails! (6) runs most open source apps (7) improving at a good pace, with a solid and strong community (8) base is independent from userland (9) has a good sound system, [OSS4 > ALSA] (10) ZFS!!!

Jails will hopefully be good for me, but for you Vegan I think you should stay on OpenSolaris 2009.06. Keep your Xen Dom0 on it. Lock it down completely by running IPFilter, blocking all ports, then just run all your guests as Xen DomU's. I've found that the most stable system is one that never updates, and the only reason a well configured server needs to update is for security patches. But with OpenSolaris-STABLE running IPFilter with maximum shields, you probably have one of the most secure hosts you can get.


----------



## vermaden (Dec 9, 2010)

ethoms said:
			
		

> My top ten reasons why FreeBSD is a good choice: (1) it's FOSS (2) Very stable apparently (3) true, homogenized UNIX (4) good documentation (5) Jails! (6) runs most open source apps (7) improving at a good pace, with a solid and strong community (8) base is independent from userland (9) has a good sound system, [OSS4 > ALSA] (10) ZFS!!!



You forgot (11) VirtualBox ;p


----------

