BHyve desktops + easy access to host data

stratacast1

Active Member

Reaction score: 20
Messages: 190

I'm getting to a point where I want to switch my desktop to FreeBSD, but can't yet because there are some specific applications that I use that are Linux only. I'd like to simply just run FreeBSD as my host OS and have a Linux guest(s), but the thing is, some of the applications I use require access to many gigabytes of data which I don't want to be locked into any Linux guest. So what I'm wondering is, can I have a reasonably snappy Linux desktop guest in BHyve (plus windows 10 for that matter) and also have an easy way to pass the data on the host to the VMs?
 

usdmatt

Daemon

Reaction score: 505
Messages: 1,351

There is no host/guest file access in bhyve, it's purely a hypervisor. You'd need to use a network file system for this. The obvious choice for Linux would be NFS although you'd probably need to use Samba for Windows.
 
OP
OP
stratacast1

stratacast1

Active Member

Reaction score: 20
Messages: 190

There is no host/guest file access in bhyve, it's purely a hypervisor. You'd need to use a network file system for this. The obvious choice for Linux would be NFS although you'd probably need to use Samba for Windows.
That was ultimately my assumption. I THINK I saw that Windows had NFS support in Windows 10, but with Windows data it isn't as dire that I have easy access to data vs a Linux guest. Would it then be possible to keep an NFS instance that is only accessible to my VMs?
 

aragats

Daemon

Reaction score: 433
Messages: 1,055

I use net/freerdp for everything related to Windows guest: shared folders, clippboard, sound, microphone:
Code:
xfreerdp -grab-keyboard /sec:rdp /bpp:24 /w:$WIDTH /h:$HEIGHT /v:$HOST /u:$USER /p:$PASSWD /clipboard /drive:home,/home/<myuserdir> /fonts /sound:sys:oss,dev:3 /microphone:sys:oss,format:1
Perfectly works.
 
OP
OP
stratacast1

stratacast1

Active Member

Reaction score: 20
Messages: 190

Those are both very interesting ondra, I'd be curious to see where those go in the future as they become more stable.

For freerdp, in the end I may be able to get away with just having a Windows guest and no Linux guest, since Windows has the missing software I need too. Otherwise, for a Linux guest I'd just VNC in right? I might give some test runs from my current setup and see how performance is. I assume it'd be about the same, since rdp is rdp, and vnc is vnc no matter what the host is...
 

aragats

Daemon

Reaction score: 433
Messages: 1,055

for a Linux guest I'd just VNC in right?
I think, it's overkill for a particular application. You can easily tunnel X via SSH. Just login via SSH:
Code:
% ssh -XYC <your_guest_host>
and run any graphical application then.
Check ssh(1) for the flags you may (or may not) want.
 

Oko

Daemon

Reaction score: 768
Messages: 1,620

There is no host/guest file access in bhyve, it's purely a hypervisor. You'd need to use a network file system for this. The obvious choice for Linux would be NFS although you'd probably need to use Samba for Windows.
Not following your post. Bhyve is full virtualization. An example of pure hypervisor would be Xen. Xen 4.9 introduces a Xen transport for 9pfs so there is no need for clunky NFS. FreeBSD jails have nullfs(5)
The guy wants something similar for Bhyve. Sounds pretty reasonable to me. Sharing a common data pool among guests is a very frequently encountered in real world.
 

usdmatt

Daemon

Reaction score: 505
Messages: 1,351

NAME
bhyve – run a guest operating system inside a virtual machine

DESCRIPTION
bhyve is a hypervisor that runs guest operating systems inside a virtual
machine.
The guy wants something similar for Bhyve. Sounds pretty reasonable to me. Sharing a common data pool among guests is a very frequently encountered in real world.
That's very nice but bhyve doesn't have this ability, yet at least. There was experimental support for p9 (with only Linux guest afaik) but that doesn't seem to have gone very far. So at the moment the only solution to his problem is to use a network file system.
 
Reactions: Oko

p3rj

Member

Reaction score: 24
Messages: 44

I might give some test runs from my current setup and see how performance is. I assume it'd be about the same, since rdp is rdp, and vnc is vnc no matter what the host is
With a Linux client, you might be able to use x2go, for which there is a port (x2goclient) of the client, if unmaintained. I've no experience with it in the context of bhyve, but with a physical headless Linux system, performance for me was pretty good. Does audio, too.
On the server side one is somewhat restricted with respect to the desktop environment, compositing WMs are not or poorly supported, I think. IIRC, Mate worked fine.
 
OP
OP
stratacast1

stratacast1

Active Member

Reaction score: 20
Messages: 190

I'll take a look at X11 over SSH, I have thought about that. The last time I tried it, I didn't have the best experience, but it was from a Pi over the network so...that could be my problem. I wouldn't have an issue with NFS if I can contain it to only being passed to my VMs which are in a NATed network ONLY. I also see that VirtualBox version 5 is on FreeBSD now? That would be another option I wouldn't mind testing
 
OP
OP
stratacast1

stratacast1

Active Member

Reaction score: 20
Messages: 190

Here with bridged network iperf shows about 5Gb/s for bhyve host<->guest and guest<->guest.
Would that be able to easily throw a whole GUI desktop my way, or will that just be fetching an application from a bhyve guest?
 

malco_2001

Member

Reaction score: 21
Messages: 63

If its a Linux guest you can also use xdmcp. Then something like X -query ip can forward the entire desktop. Be aware sound emulation does not work yet. I poked for sound emulation to be merged in the review a few weeks ago, and someone is working on adding capsicum support again to fix it in CURRENT.
 

aragats

Daemon

Reaction score: 433
Messages: 1,055

Would that be able to easily throw a whole GUI desktop my way, or will that just be fetching an application from a bhyve guest?
I run both Windows and Linux in bhyve. There is no problem getting the entire desktop, however, as I mentioned, IMO, there no reason to get the entire desktop of Linux.
Generally speaking, you can very roughly estimate the maximum bandwidth you may need assuming that you get completely uncompressed bitmaps. The actual protocols use this or that compression method, it will be significantly less.
So, for an HD desktop at 30fps and 24-bit color you'll need: 1080*1920*24*30≈1.4Mb/s.
 

sko

Well-Known Member

Reaction score: 218
Messages: 429

For those linux-specific applications you might be able to use the linux compatibility layer within a jail (to keep the host clean...). IIRC the vmadm port from Project FiFo [1] wanted to introduce the concept of LX-jails (linux-branded jails; similar to LX-zones on smartOS).
Don't know the status on that though, the FreeBSD-vmadm project didn't received any updates since ~4 months...

Speaking of LX-Zones: instead of running a fully-bloated linux desktop install inside bhyve, smartOS also runs very well on bhyve and provides very decent performance. LX-Zones are really great if you are stuck with a specific linux application, as their overhead is really small even compared to any container solution on linux itself. I'm running smartOS on bhyve on 2 hosts for testing/development and even with only 6GB RAM for the whole smartOS VM you can easily run 20+ zones as their resource overhead is amazingly small. E.g. our primary local DNS server (bind 9.11) that serves 12 zones to 8 subnets and 4 views runs with a total of ~300MB RAM for the zone.

As already mentioned, for graphical applications X forwarding is usually far more efficient than VNC, especially because you can handle the window just like any local one, so this should always be preferred over VNC if possible.


Regarding VirtualBox: It works, it has a "very colorful" GUI, the CLI interface is absolutely horrible and the overhead insane. Avoid it like the plague unless you can't use anything else (e.g. if you absolutely have to run Windows and need drag&drop/copy&paste between host and VM).


[1] https://gitlab.com/Project-FiFo/FiFo/vmadm
 
Top