# Does FreeBSD generally just suck in VirtualBox?



## stratacast1 (Jul 22, 2017)

I have been testing FreeBSD in a VirtualBox VM so I can learn before deciding to put it on one of my systems. I REALLY want to love FreeBSD, but using this in VirtualBox has made me find it is one of the most unstable OSes I have used in quite some time and is very unpredictable and unreliable. So please tell me this is a problem with running FreeBSD in a VM and not on actual hardware because I really do want to like and use FreeBSD right now. I get constant compile fails from ports, pkg always hangs and times out, some of the software I'm trying to use throws frequent errors. I want to use this on an old HP Proliant ML G6 server so I can take advantage of jails with iocage and ZFS in place of Ubuntu, LXC and ZFS On Linux. I really like what I see with FreeBSD but I can't use this if my system is going to be a constant turd to me


----------



## stratacast1 (Jul 22, 2017)

Right now I'm doing CLI only with FreeBSD guest on Fedora 26, and I have FreeBSD virtualization mode set to be KVM (I had CPU utilization issues with the default setting in VBox). The last time I didn't use KVM and I was able to fix pkg problems with some timeout changes to pkg.conf with non-KVM. Perhaps I may have to pull out an old laptop from the closet and see what happens there


----------



## drhowarddrfine (Jul 22, 2017)

I could say the same thing about Linux when I run it in VirtualBox. And Windows, too, as booting it up is an exercise in exercising, but using VirtualBox to benchmark any operating system is unwise and thinking one of the most stable operating systems on the planet, FreeBSD, is not because of it is also unwise.

But Netflix and Whatsapp don't seem to have any issues using FreeBSD to serve over 40% of all internet traffic.


----------



## stratacast1 (Jul 23, 2017)

Yes, but they also spend absurd amounts of money to specifically make FreeBSD work reliably with their hardware, and have in-house developers doing just that. So FreeBSD is most certainly amazing and reliable on the hardware that Netflix uses, but whose to say it will work well on my hardware? I'll just have to dig one of my old machines out of the closet and test the software I want to use on it with precompiled binaries. These old AMD towers I have run hot when compiling and they tend to go beyond what's safe for them, hence why I'm trying stuff in VBox. I'll report back on success/fail and if fail, report to the port developers


----------



## drhowarddrfine (Jul 23, 2017)

stratacast1 said:


> Yes, but they also spend absurd amounts of money to specifically make FreeBSD work reliably with their hardware


And they contribute that code back to FreeBSD along with improvements like sendfile. So does nginx.



stratacast1 said:


> whose to say it will work well on my hardware?


It works on my hardware. Buy hardware that FreeBSD runs on which is a lot.



stratacast1 said:


> I'll just have to dig one of my old machines out of the closet and test the software I want to use on it with precompiled binaries.


Or you can do what I did two years ago, buy a bleeding edge system from Gigabyte, i7-3770 with 32GB of ram, SSD drivers nVidia card, etc. Probably a better idea, too.

Why would you want to be using an old, dilapidated system with FreeBSD? Do you do the same with every OS you use now?


----------



## Datapanic (Jul 23, 2017)

Here's an idea!  Install FreeBSD on whatever you are running VirtualBox on and then install VirtualBox on FreeBSD and install whatever it was that was on that system before and report back.  

I have FreeBSD on 10 year old Pentium 4 ShuttleXPC's, ESX vm's and A real nice NAS system and they all run great because I give them the minimum stuff they require for the job!

You are not going to get a lot of praise dogging FreeBSD here when you seem to be testing it on less than mediocre hardware, virtual or not.


----------



## rigoletto@ (Jul 23, 2017)

Or you just simply need to take a look in the documentation.


----------



## Deleted member 30996 (Jul 23, 2017)

drhowarddrfine said:


> Why would you want to be using an old, dilapidated system with FreeBSD?



All mine probably fall into that category. My Sony Vaio came with Vista on it and I bought it new 10 years ago. The HDD failed on the Gateway/Acer clone I'm on now, my brother-in-law was going to throw it away but gave it to me. I bought my Thinkpad W520, T61 and X61 (which also came with Vista) after careful inspection for signs of use as lease returns off ebay for less than $500 total. The ones that didn't come with Vista were Win7 machines.

While my Sony is nowhere near as snappy as my W520, FreeBSD has breathed new life into it and I use it every day. I installed Vista on my X61 just to see how it ran and it was BSOD one after another. Solid as a rock with FreeBSD. My T61 was my daily driver till the dock it was in shorted it out and killed it. I plan to get another. My Gateway has an AMD Phenom II triple core with 4GB RAM so that's what I use most often now. None of them would be worth a tinker's damn with Windows 10 on them.

My W520 runs OpenBSD, just because I like to expand my knowledge of BSD. It's the most powerful machine I own with an Intel Quad Core i7-2760QM @ 2.40GHz, 8GB RAM, and NVIDIA Quadro 1000M with 96 CUDA cores and Optimus Technology. It being 9 years old from build date.

They all are dependable with FreeBSD, with no hardware issues and do the everyday tasks I expect out of a laptop par excellence. I couldn't be happier with something other than FreeBSD on my old dilapidated boxen.


----------



## forquare (Jul 23, 2017)

I use FreeBSD with a GUI (Xfce) inside VirtualBox everyday at work—they gave me a Windows laptop, but I feel more comfortable in FreeBSD, so that’s my solution 

I’ve not experienced any performance issues. I don’t tend to compile from ports though, but I’ve never had an issue with ports-mgmt/pkg aside from improperly configured DNS.

A summary of my settings:

System
Motherboard
4096MB RAM
Enable I/O APIC
Enale EFI
Hardware Clock in UTC Time

Processor
2 Processors
100% Execution Cap
Enable PAE/NX

Acceleration
Paravirtualization Interface: None
Enable VT-x/AMD-V
Enable Nested Paging


Display
Screen
Video Memory: 128MB
Enable 3D Acceleration


Storage
A single disk on an IDE controller (default VBox controller for FreeBD)

Audio
Enable Audio
Host Audio Driver: Windows DirectSound
Audio Controller: IntelHD Audio

Network
Adaptor 1
Enable Network Adaptor
Attached to: NAT  (work does filtering, so bridged doesn't work)

Adaptor type: Intel PRO.1000 MT Desktop (82540EM)
Promiscuous Mode: Deny

Adaptor 2
Enable Network Adaptor
Attached to: Host-only Adaptor
Adaptor type: Intel PRO.1000 MT Desktop (82540EM)
Promiscuous Mode: Deny


USB
Enable USB Controller
USB 3.0 (xHCI)

Shared Folder
Windows Downloads folder shared with VM (works as of VirtualBox 5.1.22_2 of emulators/virtualbox-ose-additions)

This is the setup I use 08:00—17:00, Monday—Friday and experience no problems.  Inside FreeBSD, I enable NTP, disable Unbound (this seems to cause occasional DNS glitches), enable the VirtualBox additions and kernel module (after installing via ports-mgmt/pkg), I also use ZFS as I take advantage of the snapshot feature to backup datasets to another, physical FreeBSD box.

Equally, I have FreeBSD running on various other bits of real hardware without issue (notably my ThinkPad T440 laptop, a Dell desktop at work (can’t recall the model), and a Raspberry Pi (model 1, B+). I’ve also had it running on some old Dell blade servers (circa 2007, can’t recall the model).


----------



## stratacast1 (Jul 23, 2017)

Datapanic said:


> Here's an idea!  Install FreeBSD on whatever you are running VirtualBox on and then install VirtualBox on FreeBSD and install whatever it was that was on that system before and report back.
> 
> You are not going to get a lot of praise dogging FreeBSD here when you seem to be testing it on less than mediocre hardware, virtual or not.



I'd love to try your experiment, but since FreeBSD doesn't have KDE Plasma 5 (all thanks to systemd), I don't think I could do FreeBSD as my primary workstation OS, otherwise I'd take a harder look at switching my Ryzen/Nvidia GTX 1070 build to that

And I got that message loud and clear  I'm just surprised to hear all the touting of the stability, reliability and awesomeness of FreeBSD, but it just runs like it hasn't been well tested in VBox. I have run this on one machine previously just fine, but like I said, I stopped pretty quick when I started compiling code and found it was overheating, not worth sinking $$$ into it for better cooling (old Phenom). I just want to be certain if I take my main machine down for a couple days, I will end up with FreeBSD on it in the end, not reverting back to what I have now. So my post may come across a bit crass but I want to know stability of FreeBSD will be > Ubuntu Server and know all my packages work as expected in a test environment before I put it on my main server, so I hope my concern is understood.

For the documentation: I read it, tried it, building from ports failed to compile and everything I am using in VBox is CLI only. I appreciate the reminder and provided information!



Trihexagonal said:


> I couldn't be happier with something other than FreeBSD on my old dilapidated boxen.



You know you got good hardware when it still operates well beyond its "worth" 

forquare that's great to hear what is working for you! I'm hoping as a BSD n00b I can figure out more exactly what I'm doing wrong. My hope is to get my server running FreeBSD 11.0 with iocage on a mirrored ZFS pool (with about 5 jails operating), and have a Pi 2 to do snapshot backups to a backup drive mounted to it.


----------



## drhowarddrfine (Jul 23, 2017)

Trihexagonal I asked "why would they want to" not why would you. Until two years ago, I was inheriting a lot of computers from Windows users who were "upgrading" to the next version of Windows which required a new computer. For years I'd get fairly recent systems that I could install FreeBSD on and use them as cheap workstations or cheap servers for cheap clients but I needed more power for some development work I was doing so I bought the latest and greatest instead.


----------



## fnoyanisi (Jul 23, 2017)

I would assume you will run a server or at least a production system as your intention is to install FreeBSD on a HP server. If you are serious about benchmarking or testing FreeBSD, I think it is wiser to give FreeBSD a go on bare metal than running it on a VM, which is another slim layer of "unknowns". 
Having said that, I doubt compile errors would be caused by any VM issues and I would highly recommend you to follow lebarondemerde's advise (read the documentation please).


----------



## Deleted member 30996 (Jul 23, 2017)

drhowarddrfine said:


> Trihexagonal I asked "why would they want to" not why would you.



That wasn't the portion of your quote I responded to. Only that my machines probably fell into the category of old, dilapidated systems.

I believe using FreeBSD to revive old hardware is one of its many strong points as a desktop OS.


----------



## scottro (Jul 23, 2017)

You can install FreeBSD's  guest-additions from pkg.  There is a virtualbox-ose-additions and also one with a nox11 suffix if you're not running a GUI.  (That is, run pkg install from the GUEST). 

If you're talking about installing on a tower and can easily add an NVidia card, then FreeBSD will probably do fine on your machine.  I'm not quite clear if this is going to be a server, desktop, or desktop-cum-server.  

The main hardware issues that I run into, and seem to get mentioned most here are recent Intel video cards, Intel wireless--Atheros is supposed to be well supported but I don't have anything with a dual channel 802.11ac wireless in Atheros--the Intel driver supports the card but not 802.11.ac, and mouse tracking pads.  Most of these affect laptops more than workstations.   Power management can also be an issue, untested by me because I'm so powerful.  

If you're using ZFS on a VirtualBox install, that will probably be a bit slow, but if you have a reasonable amount of memory--I've run that with 4 GB given to the VM, though I didn't do much with it, I was testing some disk replacement stuff, my guess is that the guest additions (from FreeBSD's packages) might help.


----------



## ralphbsz (Jul 23, 2017)

(talking about Netflix and WhatsApp using FreeBSD...)



stratacast1 said:


> Yes, but they also spend absurd amounts of money to specifically make FreeBSD work reliably with their hardware, and have in-house developers doing just that.



My (very educated) bet is that IBM spends 10x more than Netflix and/or WhatsApp, and RedHat at least 100x more (perhaps 1000x).  I have no idea how much Google spends on OS tuning/fixing/ adaption (nor do I know what exact OS Google uses on their server farms), but it's in the same order of magnitude as IBM or Redhat.

If you want to use any OS for a very large shop (and Netflix and WhatsApp certainly qualify), you *will* end up having your own OS group for support.  This has been true since the mainframe OS'es of the 1960s (where users used to modify their Univac and IBM 709x or 360 source codes themselves, when source was still delivered on fiche or tape), and it has not really changed.


----------



## drhowarddrfine (Jul 23, 2017)

And, in the end, after spending lots and lots of time and money, and having the ability to choose any OS for their critical systems, Netflix and Whatsapp chose FreeBSD over all others.


----------



## fnoyanisi (Jul 23, 2017)

ralphbsz, here is (a bit outdated, but still valid) the answer for "who actually does develop Linux" question.

I am not a system admin, but I have not made a "clean install" on my laptop after I installed FreeBSD on it! I think this is a good sign of stability (and my system is up to date). pkg(8) update/upgrade and freebsd-update(8) have just worked fine for me since the day one.



Datapanic said:


> Here's an idea! Install FreeBSD on whatever you are running VirtualBox on and then install VirtualBox on FreeBSD and install whatever it was that was on that system before and report back.


Unfortunately, FreeBSD is not one of the officially supported operating systems by VirtualBox and some functionality (USB integration for example) is missing. I think this is one of the main drivers behind developing bhyve (8).

stratacast1 , I have several VirtualBox VMs running on my laptop (to test some code, compile kernel etc...) and I have had no issues similar to those you mentioned. Is there any specific reason why you use ports and not pkg(8)?


----------



## Deleted member 30996 (Jul 24, 2017)

stratacast1 said:


> I want to use this on an old HP Proliant ML G6 server so I can take advantage of jails with iocage and ZFS in place of Ubuntu, LXC and ZFS On Linux. I really like what I see with FreeBSD but I can't use this if my system is going to be a constant turd to me



I looked up the specs on that machine. It outclasses my Sony Vaio laptop with Intel Dual Core T2060 @ 1.60GHz and 2 GB RAM in every way and I have no problems whatsoever running FreeBSD on it.

http://h20564.www2.hpe.com/hpsc/doc/public/display?docId=emr_na-c01713311

However, with only 2GB RAM I do not use ZFS, as the recommended amount is 4GB:



> A minimum of 4GB of RAM is required for comfortable usage, but individual workloads can vary widely.



https://www.freebsd.org/doc/en/books/faq/all-about-zfs.html

Why not try building it on your HDD instead of VM using pkg instead of ports? Or will that set you back somehow? I can build FreeBSD in under 24 hrs from start to finish on my Sony using ports, pkg is much quicker. If you decide it's not for you a Linux build takes a few minutes in my experience.


----------



## drhowarddrfine (Jul 24, 2017)

When I had a 550Mhz PIII with 192MB of ram I could install FreeBSD in an hour or two using ports. So I assume you mean using Gnome or other full GUI desktop thingy.


----------



## Deleted member 30996 (Jul 24, 2017)

I was referring to a fully functional desktop with Xorg, Fluxbox, The Gimp and all the programs I normally install, all my system and security settings, Firefox extensions, etc.

The full process of building the base system takes about 10 minutes.

I was really stunned at how quickly my Thinkpad W520 built Xorg compared to my Sony. Several hours less in time.


----------



## Datapanic (Jul 24, 2017)

I kinda like to Rock and Roll.  Therefore, my main setup is an ASRock E3C226D2I with 16GB of ECC Ram and 6 Hitachi Ultrastar 7K3000 2TB drives.  I custom installed FreeBSD 11.0 Root on ZFS.  This server hosts 5 public URLS, pf with fail2ban, poudriere, 12 mysql databases, observium, bacula, iscsi, samba4, plex, bind910, all interfaces are lagg, shoutcast and if I want, CDE, xfce4, kde and mate are available to run up and use firefox-esr or chromium or whatever else.  BSD in ANY flavor DOES NOT SUCK.


----------



## stratacast1 (Jul 25, 2017)

fnoyanisi said:


> stratacast1 , I have several VirtualBox VMs running on my laptop (to test some code, compile kernel etc...) and I have had no issues similar to those you mentioned. Is there any specific reason why you use ports and not pkg(8)?



Hey fnoyanisi! Thank you for the additional information, I have been living off the documentation this whole time, and that plus blogs/guides has really been a big help for me. The reason why I have been doing ports more often is because I like the idea of getting some extra code optimization for my hardware that comes with compiling on the machine

Trihexagonal, I tried some more of what you guys have been saying and put FreeBSD on an my old Gateway with a Phenom (and 4GB RAM) and everything seems to run rock solid. I have found that currently the issues I am having running this on metal has to do with py36-iocage now. I grabbed iocage and did freebsd updates using pkg. The problem with iocage is being investigated on github so hopefully a patch is released soon! Currently I cannot destroy or even restart jails, but I can create and use jails.

I would say I'm generally well seasoned at Linux and Linux administration, but I want to learn FreeBSD because it looks like a more cohesive system, and I think I could trust it more on my own server than Ubuntu Server.

Datapanic - I'm not implying any BSD sucks, I just wanted to see if my problems were just anomalies that came from using FreeBSD in VBox or if there were just some known issues right now with 11.0-RELEASE. Seems more and more to be just a few anomalies with VBox (like pkg barely works with a bridged adapter, but just fine using a NAT interface). 

My Ubuntu Server just kernel panicked as I was typing this so I'm getting more antsy to get FreeBSD on it  I just want to keep an eye out on iocage. I don't trust myself with raw jail management just yet. My Proliant has a quad core Xeon, 8GB DDR3 ECC memory (soon to be 16GB), a 120GB Samsung 840 EVO for the OS and 2 2TB Western Digital RE4 drives doing a mirrored ZFS pool, but may get another 2TB for RAIDZ1 so I can imagine this is nothing to sneeze at for FreeBSD


----------



## Deleted member 30996 (Jul 25, 2017)

stratacast1 said:


> Trihexagonal, I tried some more of what you guys have been saying and put FreeBSD on an my old Gateway with a Phenom (and 4GB RAM) and everything seems to run rock solid.



Glad to hear it. I'm on my Gateway NV53A with AMD Phenom II x 3 N830 and 4GB RAM right now.


----------



## fnoyanisi (Jul 25, 2017)

stratacast1 , have you tried ezjail instead of iocage?

It appears that there are different versions of iocage available; one is written with Python 2 and the other one is written with Python 3. You may want to give the Python 2 version a go?

```
~ % pkg search iocage
py27-iocage-0.9.5_1            FreeBSD jail manager written in Python
py36-iocage-0.9.8.1            FreeBSD jail manager written in Python3
```


----------



## islamux (Jul 25, 2017)

i'm tested FreeBSD 11 for a month or less and i was very exicted in practicing this magnific world.
so that i decided to install it in real hd to know and learn more about hardware detection and facing the problems and solve them.
all that made me happy.


----------



## stratacast1 (Jul 28, 2017)

I did see the python 2.7 version of iocage available, but I see it is also a deprecated package, as is ezjail, which creates the old rc.conf-style jails instead of the new jail.conf method of jails.

I was able to follow the code error and do a cheap fix for my problem (can't destroy jails with iocage), but it will have to remain that way until the devs of iocage release a version 0.9.8.2 (or 3? I forgot).  Currently, there's a bug in a dependency that the GH master relies on (py-libzfs) so I can't compile from GitHub. This is the price I pay for playing with in-development software though right?


----------



## vm9 (Jun 11, 2018)

I have the same stuck... FreeBSD successfully installed in virtualbox only when I've reduced available cores downto 8.


----------

