Altering the defaults for unattended installs

This is for discussing general topics about how to use VirtualBox.
Post Reply
salan
Posts: 69
Joined: 7. Jan 2014, 16:38

Altering the defaults for unattended installs

Post by salan »

Is there a way to change the defaults for unattended installs wizard?
Things like the user and password etc.
when I am testing new builds/setups I sometimes use the UA wizard but often forget to change things like the user and pass to what I use as defaults. Then other scripts I have to configure the guest (add apps for example I always want) fail.
It's a minor thing but would be great if there was a way to set these defaults.
Thanks
"Those who don not learn from Dilbert are doomed to repeat it"
scottgus1
Site Moderator
Posts: 20945
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: Altering the defaults for unattended installs

Post by scottgus1 »

The only thing I can think of to try tweaking is the scripts in the default installation folder Oracle\VirtualBox\UnattendedTemplates.
fth0
Volunteer
Posts: 5678
Joined: 14. Feb 2019, 03:06
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Linux, Windows 10, ...
Location: Germany

Re: Altering the defaults for unattended installs

Post by fth0 »

In the unattended installation templates, look for strings beginning with "@@VBOX_INSERT_" and ending with "@@", containing "USER_LOGIN", "USER_PASSWORD" and "USER_FULL_NAME" in between (and sometimes more).
salan
Posts: 69
Joined: 7. Jan 2014, 16:38

Re: Altering the defaults for unattended installs

Post by salan »

Many thanks.
Would an upgrade to VB over write these though?
"Those who don not learn from Dilbert are doomed to repeat it"
salan
Posts: 69
Joined: 7. Jan 2014, 16:38

Re: Altering the defaults for unattended installs

Post by salan »

scottgus1 wrote: 23. Jan 2024, 20:30 The only thing I can think of to try tweaking is the scripts in the default installation folder Oracle\VirtualBox\UnattendedTemplates.
Where on a linux host are these please?
"Those who don not learn from Dilbert are doomed to repeat it"
scottgus1
Site Moderator
Posts: 20945
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: Altering the defaults for unattended installs

Post by scottgus1 »

I'm not certain. Find where Virtualbox is installed. "UnattendedTemplates" will be inside that folder.
fth0
Volunteer
Posts: 5678
Joined: 14. Feb 2019, 03:06
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Linux, Windows 10, ...
Location: Germany

Re: Altering the defaults for unattended installs

Post by fth0 »

salan wrote: 24. Jan 2024, 10:31 Where on a linux host are these please?
The package manager of your Linux distribution would tell you. ;)

On Debian/Ubuntu hosts: /usr/share/virtualbox/UnattendedTemplates.
salan wrote: 24. Jan 2024, 10:29 Would an upgrade to VB over write these though?
Yes.
salan
Posts: 69
Joined: 7. Jan 2014, 16:38

Re: Altering the defaults for unattended installs

Post by salan »

fth0 wrote: 24. Jan 2024, 22:11
salan wrote: 24. Jan 2024, 10:31 Where on a linux host are these please?
The package manager of your Linux distribution would tell you. ;)

On Debian/Ubuntu hosts: /usr/share/virtualbox/UnattendedTemplates.
Thanks I had already found them there but looking at the scripts, I was a bit confused.
I could see the variables but not where they were defined i.e. initial values which is what I assume I would change to the defaults I want to use.
"Those who don not learn from Dilbert are doomed to repeat it"
AndyCot
Posts: 297
Joined: 29. Feb 2020, 03:04

Re: Altering the defaults for unattended installs

Post by AndyCot »

This may or may not be of some use:
https://kifarunix.com/how-to-automate-v ... virtualbox

I have used it to create install bath file on Windows to install a bunch of Linux & !Intel ISO's.
fth0
Volunteer
Posts: 5678
Joined: 14. Feb 2019, 03:06
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Linux, Windows 10, ...
Location: Germany

Re: Altering the defaults for unattended installs

Post by fth0 »

The scripts are what the corresponding guest OSes expect as a parameter file, so their structure is defined by the respective guest OS. VirtualBox "only" replaces the variable names with the contents given in the VirtualBox Manager, and provides the scripts to the guest OS installer.

Simply replace the variable names with your intended username and password inside the templates, for example replace "@@VBOX_INSERT_USER_LOGIN@@" by "myusername", and VirtualBox won't insert the username and password you forget to change in the VirtualBox Manager (defaults: "vboxuser", "changeme").
Post Reply