Comments on VBoxHeadless - Running Virtual Machines with VirtualBox 5.1 on a headless Ubuntu 16.04 LTS Server
This guide explains how you can run virtual machines with VirtualBox 5.1 on a headless Ubuntu 16.04 server. Normally you use the VirtualBox GUI to manage your virtual machines, but a server does not have a desktop environment. Fortunately, VirtualBox comes with a tool called VBoxHeadless that allows you to connect to the virtual machines over a remote desktop connection, so there's no need for the VirtualBox GUI.
20 Comment(s)
Comments
Good article.
Thanks, I'm noticing APT still wants to install X, how would one explicitly exempt X and all the other useless packages?
I get this error during
sudo apt-get install linux-headers-$(uname -r)
E: Unable to locate package linux-headers-3.14.32-xxxx-grs-ipv6-64
Note uname -r shows 3.14.32-xxxx-grs-ipv6-64
please help
i experiencing the same error:
"Unable to locate package linux-headers-2.6.32-042stab120.6"
when i start the vm i get the error message:
Error: failed to start machine. Error message: Failed to open/create the internal network 'HostInterfaceNetworking-ens33' (VERR_INTNET_FLT_IF_NOT_FOUND)
Can you please help me in solving this. I tried gooling the error, but had no luck in finding a working answer.
i have same problem
at this line:
VBoxManage modifyvm "Ubuntu 16.04 Server" --memory 2048 --acpi on --boot1 dvd --nic1 bridged --bridgeadapter1 ens33
network adapter described as bridget, so as you can find in documentation:
--bridgeadapter<1-N> none|<devicename>: If bridged networking has been enabled for a virtual network card (see the --nic option above; otherwise this setting has no effect), use this option to specify which host interface the given virtual network interface will use. For details, please see Section 6.5, “Bridged networking”.
as a result - your system doesn't have this adapter ;)
Excellent article. Learned a lot.
For the guys having trouble with the 'Error: failed to start machine. Error message: Failed to open/create the internal network 'HostInterfaceNetworking-ens33' (VERR_INTNET_FLT_IF_NOT_FOUND)' my solution was to change the 'ens33' part to 'eth0'. Basically it's the networking part of Virtualbox and with the bridged adapter it uses the host's connection, on mine it's 'eth0' and on the author of the article it's 'ens33'. Good luck.
It looks like it expects a soundcard? It works anyway. But I don't have a soundcard in my server so I might have to disable the soundcard.
Also, internet did tot work directly. For some reason the cable did not get connected? I had to do the following, is that normal behavior?
vboxmanage controlvm "Ubuntu 16.04 Server" setlinkstate1 on
check pings to your router, 8.8.8.8 if all ok but you cant ping google.com (as example) - check resolver section in network preferences file
when i run "wget -q https://www.virtualbox.org/download/oracle_vbox_2016.asc -O- | sudo apt-key add -" i get:
gpg: no valid OpenPGP data found
on ubuntu server 16.10
when i run "wget -q https://www.virtualbox.org/download/oracle_vbox_2016.asc -O- | sudo apt-key add -" i get:
gpg: no valid OpenPGP data found
on ubuntu server 16.10
-
You can use wget -q -O- http://download.virtualbox.org/virtualbox/debian/oracle_vbox_2016.asc | sudo apt-key add -
solved
using static ip address.
forget to put dns in the config file
I do not get the reason for creating a Virtual Ubuntu server on a Ubuntu server ?
Thanks for writing this up. I have been beating my head against the wall...
Thanks a lot! But I get an error 0xc0000225 (your pc should be repaired) when I try to install Windows 10. Any ideas ?
Remember to enabled cableconnection !
--cableconnected1 on
As of today (2018/07) in a "Debian Stretch" environment the restart of the SSHD service does not force the recreation of the host keys. I had to run "dpkg-reconfigure openssh-server".
Great tutorial! I installed version 6.0, the latest available today (january 2019)