Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I have set up a small Centos machine in our office to run Oracle VirtualBox. Unfortunately this is GUI based, and should only have one instance running. I want multiple people to be able to start up VM's, change settings etc (not simultaneously). The easiest way for this is that we have a single user and they just go to the machine and unlock the session, however I don't really want to have to have a monitor/keyboard and mouse attached - I want to just stick the machine under a desk and people can remote connect onto it to manage the running program.
Is the easiest way to achieve this to use VNC? I don't think I can use standard X forwarding because each connection would be a new session, which isn't what I want.
Location: Montreal, Quebec and Dartmouth, Nova Scotia CANADA
Distribution: Arch, AntiX, ArtiX
Posts: 1,363
Rep:
Quote:
Originally Posted by devnull10
Do you know whether there is a better alternative? I've just always found VNC a bit clunky.
In my opinion, there is a better alternative (... if I understand your objective properly ...), which I use myself on my home network.
Virtualbox (as with KVM/libvirt/QEMU) can be run headlessly, meaning that you remotely connect to the VM's running on the server using remote desktop. You don't even need a GUI on the server at all (hence the "headless" appellation ...). You configure the VM's on the server to "export" their display to a specific TCP port and the client connects to the IP address of the server and the specific port you set using a remote desktop client (CLI, GUI-based ... doesn't matter ...).
If this is what you're interested in doing, let us know. I'd be happy to help you with details as needed.
for a LAN, VNC is fine, for WAN there are probably better alternatives such as nomachine/NX, tho most would probably just end out tunneling VNC over SSH in those situations.
Personally I use KVM for my home set-up, which has both CLI and GUI tools.
In my opinion, there is a better alternative (... if I understand your objective properly ...), which I use myself on my home network.
Virtualbox (as with KVM/libvirt/QEMU) can be run headlessly, meaning that you remotely connect to the VM's running on the server using remote desktop. You don't even need a GUI on the server at all (hence the "headless" appellation ...). You configure the VM's on the server to "export" their display to a specific TCP port and the client connects to the IP address of the server and the specific port you set using a remote desktop client (CLI, GUI-based ... doesn't matter ...).
If this is what you're interested in doing, let us know. I'd be happy to help you with details as needed.
Cheers,
Hi,
I will be remote connecting to the VM's once they're started - they're all ssh enabled. This is so that a user can log in and see what VM's are started, start up new VM's etc... I don't see any option to do that in the VB options? No matter what I do, it seems to launch a GUI:
Code:
# virtualbox -h
Oracle VM VirtualBox Manager 5.1.22
(C) 2005-2017 Oracle Corporation
All rights reserved.
Usage:
--startvm <vmname|UUID> start a VM by specifying its UUID or name
--separate start a separate VM process
--normal keep normal (windowed) mode during startup
--fullscreen switch to fullscreen mode during startup
--seamless switch to seamless mode during startup
--scale switch to scale mode during startup
--no-startvm-errormsgbox do not show a message box for VM start errors
--restore-current restore the current snapshot before starting
--no-aggressive-caching delays caching media info in VM processes
--fda <image|none> Mount the specified floppy image
--dvd <image|none> Mount the specified DVD image
--dbg enable the GUI debug menu
--debug like --dbg and show debug windows at VM startup
--debug-command-line like --dbg and show command line window at VM startup
--debug-statistics like --dbg and show statistics window at VM startup
--no-debug disable the GUI debug menu and debug windows
--start-paused start the VM in the paused state
--start-running start the VM running (for overriding --debug*)
Expert options:
--disable-patm disable code patching (ignored by AMD-V/VT-x)
--disable-csam disable code scanning (ignored by AMD-V/VT-x)
--recompile-supervisor recompiled execution of supervisor code (*)
--recompile-user recompiled execution of user code (*)
--recompile-all recompiled execution of all code, with disabled
code patching and scanning
--execute-all-in-iem For debugging the interpreted execution mode.
--warp-pct <pct> time warp factor, 100% (= 1.0) = normal speed
(*) For AMD-V/VT-x setups the effect is --recompile-all.
The following environment (and extra data) variables are evaluated:
VBOX_GUI_DBG_ENABLED (GUI/Dbg/Enabled)
enable the GUI debug menu if set
VBOX_GUI_DBG_AUTO_SHOW (GUI/Dbg/AutoShow)
show debug windows at VM startup
VBOX_GUI_NO_DEBUGGER disable the GUI debug menu and debug windows
Location: Montreal, Quebec and Dartmouth, Nova Scotia CANADA
Distribution: Arch, AntiX, ArtiX
Posts: 1,363
Rep:
Hey devnull10,
Check out the extensive Virtualbox documentation on the vboxmanage command, especially the modifyvm and controlvm options.
For example, to list existing virtual machines:
Code:
vboxmanage list vms
... to list running virtual machines:
Code:
vboxmanage list runningvms
There are also commands to configure every aspect of the VMs from the command line, launch headless VM sessions ... tons of stuff. Take a look and let us know if you want some help for specific things.
Ah excellent - that looks perfect. I can also wrap the above commands in a nice shell script that displays the list of running VM's on login, allows users to select which to start from a menu option etc. I'll take a look and let you know if I have any issues.
Location: Montreal, Quebec and Dartmouth, Nova Scotia CANADA
Distribution: Arch, AntiX, ArtiX
Posts: 1,363
Rep:
Quote:
Originally Posted by devnull10
Ah excellent - that looks perfect. I can also wrap the above commands in a nice shell script that displays the list of running VM's on login, allows users to select which to start from a menu option etc. I'll take a look and let you know if I have any issues.
Thanks
Excellent - don't hesitate with any questions you may have. I've been running a headless Vbox server for several years - works well. You might be interested in setting up phpvirtualbox to manage the VMs remotely. It's a web interface resembling the usual Vbox GUI.
I had a quick look at vboxheadless and it looks like it will be perfect for what I want. I presume you have nohup it? I don't suppose you have any useful scripts you could share?
Location: Montreal, Quebec and Dartmouth, Nova Scotia CANADA
Distribution: Arch, AntiX, ArtiX
Posts: 1,363
Rep:
Quote:
Originally Posted by devnull10
I had a quick look at vboxheadless and it looks like it will be perfect for what I want. I presume you have nohup it? I don't suppose you have any useful scripts you could share?
Hey devnull - not sure what your first question is - maybe a typo ?
As to scripts - I don't use any so can't help you there.
I have 7-8 virtual machines defined on my headless server (which I also use as my main file server, btw), and 4-5 are generally running at any given time. The vm's vary in OS-type : several Windows versions, linux distros ... At one point I was even experimenting with Macs and had an OS/2 machine up and running (!).
I manage them mostly through phpvirtualbox from any computer on my home network, or at times from the command line on the server itself via an SSH session.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.