0

Situation is the following: I'm having a Ubuntu14.04 LTS with VirtualBox installed. There is at least one VM that should start at the startup of ubuntu.

Since I have configured port-forwarding including port 80 for the VM I need root-permissions for the user executing the VM.

I have created a user "vboxrunner" that should run the VM. In the meantime I have added this user to the group "root".

I have found this thread (and similar ones) that I used to configure my system: https://askubuntu.com/a/404695/457544

  • I have created the configuration /etc/default/virtualbox
  • I have setup a /etc/vbox/autostart.cfg
  • I set permissions for /etc/vbox
  • I set the autostartdbpath
  • And I enabled autostart for the VM
  • I was required to add the vboxautostart-service manually since it was not part of my system. The statement sudo service vboxautostart-service restart does not work but I can execute sudo service vboxautostart-service start as well as sudo service vboxautostart-service stop but both without any result!

I'm encountering some issues ... I'm not a expert on ubuntu. So I think I make something wrong. Current state is the following:

  • If I'm logged in as "vboxrunner" and start the VM with sudo vboxmanage startvm MyVM it works.
  • Doing it without sudo there is an error that the registered machine MyVM could not be found.
  • I have added the root-user as well as the vboxrunner-user to the group "vboxusers".
  • Using the statement service vboxautostart-service start does not start the VM. As a result the VM does not start at boot of the ubuntu-system.

What is required to start the VM with root-permissions at startup of ubuntu? What I'm doing wrong?

xforfun
  • 121

1 Answers1

2

I solved it editing the file: /etc/rc.local

Adding the line vboxmanage startvm MYVM --type headless make it working fine.

xforfun
  • 121