# Install virtualbox on a GUI-less FreeBSD OS ???



## rtsiresy (Mar 22, 2019)

Hello everyone,
is it possible to install virtualbox in a CLI-only FreeBSD system???
if yes, could use some indication, specially *how to switch into respectively installed VMs*???


----------



## D-FENS (Mar 22, 2019)

There is a port for it without X11 dependencies: emulators/virtualbox-ose-nox11


----------



## apacketofsweets (Mar 22, 2019)

If you're looking to use already pre-configured VirtualBox images using VirtualBox CLI then you should be OK, but if you're looking to create and install an OS using the command-line only, keep in mind that it's not a trivial task. It is possible but it involves scripts and pre-empting commands and actions that OS installers and the like will request.


----------



## rtsiresy (Mar 23, 2019)

roccobaroccoSC said:


> There is a port for it without X11 dependencies: emulators/virtualbox-ose-nox11


and how can I switch into the VMs; for ex I start a VM , does the VM monopolize the screen ?? or do I have to switch to the VM console after it starts?


----------



## D-FENS (Mar 23, 2019)

I don't know virtualbox. I have used bhyve and qemu. Usually you can see the screen via the VNC protocol or something similar. When you start the VM you provide a parameter for the VNC, this is how bhyve does it.
If I recall correctly, virtualbox has a console you can call with a command. It was long time ago, I don't remember.


----------



## aragats (Mar 23, 2019)

rtsiresy said:


> how can I switch into the VMs; for ex I start a VM , does the VM monopolize the screen ?


You assign different VNC ports to all your VMs and access them via VNC. VB's console is just a window, it cannot "monopolize" anything, and you don't launch it anyway.
You start your VMs using `vboxheadless` command, and, e.g. you can add the corresponding cron jobs _@reboot_ or use to /etc/rc.local to automate their start in case of power failure or whatever. I used such scheme in a headless server for many years. Now I prefer bhyve().
To me the main advantage of the VB is the possibility to passthrough USB devices, now I don't need it, thus there is no need in VB.


----------



## rtsiresy (Mar 24, 2019)

key thanx


----------



## Ancient (Mar 24, 2019)

I think you could, but you couldn't run it once installation finished.
But you can install Vagrant. It is CLI and its commands are not hard to learn.
I can post the port, but since I use more `pkg ins` than the ports because of the sh**** error 1 or 2, I can't compile the port. Well, I can in some ports. In others not.


----------

