I have installed Oracle VirtualBox 5.2.18 on my Ubuntu 18.04 and created 2 (two) VM's.

I wanted to autostart both VM's at system boot. I created shorhcut of both VM's and copied the commands into the startup Application.

Now both VM's only start when I login to my user account. but I want to start both VM's without login. Please help me

  • Not an expert but to run those they need a user context to do so! Receive permissions and the like based on the currently logged in user! Running them in that way would effectively remove restrictions that should be in place for every process started by the kernel! Commented Apr 25, 2019 at 13:17

2 Answers 2


To me it seems that you just want to execute two commands after startup but before you login. I am not sure if this will work with Virtual Box but usually you just add a line to /etc/rc.local. But make sure you add your line before exit 0 :)


It is not recommended to run a virtual machine as root and Virtual Box is not designed to do so. This is why a virtual machine always needs to be started from a user session.

If you need to run this session after boot you may enable auto-login for a user running your virtual machines as startup application.

enter image description here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .