Virtualbox jail template; automatic start vms on startup

Status
Not open for further replies.

alttab

Dabbler
Joined
Aug 7, 2014
Messages
11
I noticed that the Virtualbox Jail template does not offer the ability to automatically start virtual machines on startup. I did found various threads which describe how to fix it on linux, however i cannot find it for freebsd.

Does someone know how to accomplish this?

Will this option be included in future releases of the virtualbox jail template

( Maybe together with usb passthrough (which can be solved easily, see my other posts) )
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
There *is* a thread on how to do this somewhere. I don't know where but it is in the forum.

USB passthrough is NOT as easy as chmod 777 /dev/usb. Something else you did made it work. I haven't even been able to get easily reproducible steps for getting USB passthrough to work in the template. If I did it would be in the template already! If you can I'd like to know so I can update the template. ;)
 

Whattteva

Wizard
Joined
Mar 5, 2013
Messages
1,824
I noticed that the Virtualbox Jail template does not offer the ability to automatically start virtual machines on startup. I did found various threads which describe how to fix it on linux, however i cannot find it for freebsd.

Does someone know how to accomplish this?

Will this option be included in future releases of the virtualbox jail template

( Maybe together with usb passthrough (which can be solved easily, see my other posts) )
I haven't actually tried this, but a quick search through VirtualBox manual reveals that it is easily done with VBoxManage (or VBoxHeadless).
I'd imagine it's as simple as making a script set at jail startup with the "VBoxManage startvm" command.

Check this link for more information.
 

alttab

Dabbler
Joined
Aug 7, 2014
Messages
11
There *is* a thread on how to do this somewhere. I don't know where but it is in the forum.

USB passthrough is NOT as easy as chmod 777 /dev/usb. Something else you did made it work. I haven't even been able to get easily reproducible steps for getting USB passthrough to work in the template. If I did it would be in the template already! If you can I'd like to know so I can update the template. ;)

This is what i did to get it working; i followed the procedure in the link below, i did it in both the virtualbox jail and the freenas server.
This procedure at first did not work. It started working after i did the chmod 777 command in the jail.
Only after that, the usb devices start being displayed under the pulldown menu in phpvirtualbox, before that the pulldownmenu stays empty.
Now, after a jail restart i have to chmod 777 in the jail again for it to get working.

At one point i added the resulting mod_devd.sh as a post init script in Freenas, however after i deleted this script as postinit, it kept working.
Also at one point i did the chmod 777 on the usb devices in freenas server itself.

https://code.google.com/p/nas4free-extensions/wiki/VirtualBox_USB
To me it seems to be a combination of permissions on usb devices inside- and outside- the jail but i could be wrong.


Regarding the auto-start of vm's, on the virtualbox implementation on nas4free , in phpvirtualbox, i had an option to set a startup type per VM.
It's an out of the box option in virtualbox which got introduced in 4.2
From what i've read this has something to do with the vboxautostart-service, some details are described here;
http://lifeofageekadmin.com/how-to-set-your-virtualbox-vm-to-automatically-startup/
The paths described in the thread are not in line with freebsd so i don't think this will work 1 on 1.
Will look further in it today.
 
Last edited:

alttab

Dabbler
Joined
Aug 7, 2014
Messages
11
Where you able to verify it using my information cyberjock?
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
I've been too busy. In fact, I'm working on a server right now. :P
 
Status
Not open for further replies.
Top