Solved Virtualization FreeBSD or another OS?

Greeting all,

I have an occasional need to use AutoCAD (R14) and Microsoft Office. Until now, I have solved the problem by dual-booting OpenBSD and Windows 7, but this is not a satisfactory solution. I have recently acquired another laptop and was able to install FreeBSD with X11/WM. Since the processor has support for VT-d with EPT and VT-x, I did some reading about virtualization.

Since I would prefer to stay with FreeBSD as a guest, for its ZFS and because it will be used ost of the time, From my understanding there are three options for FreeBSD as a host: emulators/qemu, emulators/virtualbox-ose, and emulators/vm-bhyve. Qemu was described as slow and difficult to set up, VirtualBox was called "an ugly hack" on one of the BSD related forums, and bhyve was characterized as lacking some of other virtual machine's conveniences.

Other option would be to install some other OS as a host. I would prefer an Illumos derivative, again for its ZFS and the fact that I am fairly familiar with Solaris, e.g., SmartOS and run both FreeBSD and Windows in its zones.

Any input from people who have practical experience with virtualization would be appreciated, including suggestion of any other options, e.g.,Xen.

Kindest regards,

M
 
Xen on FreeBSD is not really an option, it's still highly experimental and has a huge list of caveats.

For your situation I think Virtualbox is the best option. It allows you to run a VM full screen. It might be a 'hack' but it works just fine.
 
VirtualBox-ose works quite well for me on FreeBSD. Bhyve is supposedly getting better, and lots of people use it successfully, but I haven't seen much documentation outside of the handbook, (it's there if you look, but I'm too lazy, especially considering my very minimal needs). SirDice and others have strongly recommended vm-bhyve.

Ah, here's a non handook guide.

https://www.dan.me.uk/blog/2016/05/...isor-using-bhyve-and-vm-bhyve-to-manage-them/

Again, based on my somewhat limited experience and simple use case, VirtualBox is fine and probably easier to set up. FreeBSD can be as tribal as some Linux distributions, and I suspect some of the hatred you see for VirtualBox might be due to that. I believe that Oko has mentioned using VirtualBox in production (I could be wrong though) so if he sees this, he may have something to add. We also used it in conjunction with Vagrant without problems.
 
@SirDice and others have strongly recommended vm-bhyve.
I definitely do, just not for this case. The reason is AutoCAD. While you can run Windows on bhyve, the only graphical console you can run is by using the UEFI framebuffer and VNC. This will probably be horribly slow for AutoCAD. Another option is to use RDP to connect to the Windows VM but that poses the same slow screen update problems (lack of any 2D/3D acceleration).

VirtualBox running on a desktop can easily run a Windows VM full screen and should even allow for some 3D acceleration on the VM. That should massively improve how AutoCAD performs as a VM.

You can always try both of them. Just remember that you can't run VirtualBox and bhyve at the same time.
 
mefizto, I've been running a Windows 7 x64 guest under VirtualBox on FreeBSD 11.1-RELEASE on a Lenovo ThinkStation P300 for months, and it works fine. I've left the guest running for weeks and weeks on end, and it (along with the rest of the computer) has remained stable and responsive. If you configure your VM as indicated in this screenshot, you'll even get to leap past random guest I/O lockups! And if that isn't luxury, I don't know what is. :) Happiness to you mefizto.
 
Gentleman,

thank you very much for your input - VirtualBox it is.

Do you have any recommendation regarding installation, configuration, resource allocation, and/or other tips? My laptop is Dell Latitude E6410, i5-520M (2 physical cores, hyper-threading), 8GB memory , NVIDIA NVS 3100M - 512 MB.

Kindest regards,

M
 
Again, based on my somewhat limited experience and simple use case, VirtualBox is fine and probably easier to set up. FreeBSD can be as tribal as some Linux distributions, and I suspect some of the hatred you see for VirtualBox might be due to that. I believe that Oko has mentioned using VirtualBox in production (I could be wrong though) so if he sees this, he may have something to add. We also used it in conjunction with Vagrant without problems.

I second scottro's advise considering OP (mefizto) needs. VirtualBox is not a very robust product and unlike some I would not run virtual server on it but it is a perfect for a web or in this case technical developer who needs to spin a copy of Windows on her/his desktop in order to run applications which are not available on *nix (Office, Internet Explorer, AutoCAD and such). I was about to dig trough some mailing list where people reporting all sorts of problems with VirtualBox but I gave up as it is irrelevant for this particular discussion. One word of caution. I do not run VirualBox on FreeBSD as our web guys use Red Hat Linux on their desktops. FreeBSD is not officially supported platform to my knowledge so you might want to play with it before taking a plunge. My experience with VirtualBox on FreeBSD servers was not good. It is over 4-5 years old and for me VirtualBox would randomly reboot the hosts every few days.

As of Virtualization in general I have to admit that I belong to the group of skeptics who believe that BSDs in general are too late for the party. I do run virtual servers for Xen Dom0 (I use Alpine Linux for Dom0 as a few OpenBSD guys I know) and I would not recommend it to OP based of his needs. Although Xen Dom0 is formally ported to NetBSD IMHO is not usable for production purposes. NetBSD Dom0 is not SMP safe

https://wiki.netbsd.org/projects/project/xen-dom0-smp/

and the Xen server version in pkgsrc is typically many major versions behind what people are actually using in the production. The documentation is also seriously lacking although Alpine Linux could use better documentation too.

I have yet to play with Bhyve or OpenBSD VMM. I have heard rumors that Joyent is working on porting Bhyve to SmartOS (Illumos kernel) that might give some wind into the Bhyve sails. In theory running virtual machines of the ZFS pool might simplify backup, hot migration and what not (By the way Alpine Linux does support ZFS so one can put DomUs onto the ZFS pool) but in practice unless you are using paid product my experience is that free tools available from FreeBSD ports are typically not complete.
 
It says here: https://appdb.winehq.org/objectManager.php?sClass=application&iId=86
that AutoCAD R14 is "Gold" (or perhaps you can upgrade to R16 which is "platinum").

I would recommend making a FreeBSD 32-bit Jail, installing emulators/wine and giving it a shot in there. It will have much lower overhead than virtualization and should have direct access to your GPU.
You can install emulators/wine outside of a Jail on a host amd64 architecture but I find it a little bit buggy, you also need to remember to set certain environment variables for some Windows apps to install correctly.
 
Hi Oko,

I appreciate your input. As I am reading through the VirtualBox manual, I was able to confirm that FreeBSD as a host is not supported. Perhaps that is the reason for the "ugly hack"comment? On the other hand, there has been quite a progress in VirtualBox development in 4-5 years, and several people report success, so as you concluded for my infrequent use that should work.

Hi kpedersen,

I have completely forgotten about emulators/wine, I actually had AutoCAD working under PORT]emulators/wine[/PORT] few years ago on Linux. Perhaps for the direct GPU access this might be worth to try. Hard to upgrade the AutoCAD though, R16 is dated product. Thank you for the suggestion.

Can you please explain the reason for the jail? And, is it possible to install 32-bit jail on a 64-bit system?

Kindest regards,

M
 
Virtualbox running on FreeBSD works just fine. It's not "officially" supported and some of the plugins don't work, but it's available and it works. I've got a pair of Windows VMs running on my FreeBSD server at home (7 and 10). It's really the only GUI-based VM solution for FreeBSD (where you can actually access the guest GUI without going through VNC/RDP). Hopefully, something like virt-manager will come to FreeBSD once bhyve matures a bit (and gains AMD CPU support).
 
Can you please explain the reason for the jail? And, is it possible to install 32-bit jail on a 64-bit system?

I tend to use the 32-bit Jail because it makes things a little bit easier (once it is set up). I also find emulators/wine and the required 32-bit compat libraries to be a little messy so I like to contain it.

But as mentioned, it works fine on an amd64 host, just make sure to install the package "i386-wine(-3.0,1.txz)"
The main things to watch for when running on amd64 (outside a Jail) is:
  • set the environment variable "WINEARCH=win32".
  • make sure you install the lib32 compat library package set (it is on the DVD).
  • make sure if using an NVIDIA binary GPU driver to install the 32-bit compat libraries, either set this through the port config or via the upstream installer.
And I think that is it. I don't think you need to install any mesa 32-bit libraries when not running in a Jail but I cannot quite recall.

As a note: When inside a Jail, I can still access the GPU but I also find net/tigervnc to be very fast at software rendering. I think it uses LLVMpipe. It works great for Blender so should perhaps also be effective for AutoCAD?
This is also true for VirtualBox. I find net/tigervnc to be faster than the native emulated GPU rendering via the GUI.
 
Hi phoenix,

thank you for the reply, notwithstanding the confusing reference to VNC/RPD, see my reply to kpedersen.

Hi kpedersen,

I think I will try to find some tutorial re 32-bit jail on 64-bit system, if nothing I will at least learn about jails.

The reference to the net/tigervnc is currently above my level of knowledge. My understanding is that VNC is used to access remote computers; however, the the jail is running at the local machine.

Kindest regards,

M
 
The reference to the net/tigervnc is currently above my level of knowledge. My understanding is that VNC is used to access remote computers; however, the the jail is running at the local machine.

No you are exactly right and this is more relevant to VMs rather than Jails however if there are issues communicating with the native GPU from inside the Jail (32-bit lib mismatch, etc) then a decent fallback is VNC and treat the Jail like a remote machine. Sometimes (but not always) this can also give you a more stable experience with emulators/wine because the virtual GPU is 100% software so is less quirky than actual NVIDIA / AMD hardware and buggy drivers etc..
 
Back
Top