Вы на правильном пути. Вы определенно хотите использовать DEBIAN_FRONTEND=noninteractive
. Для критических вопросов, которые не могут быть проигнорированы, Вы захотите предварительно отобрать debconf
база данных с необходимыми ответами. debconf
страница справочника имеет все подробности о том, как выполнить это.
It is definitely possible. The basic building blocks you will need are:
You will need two scripts:
Runs via the 'User Data' feature. Responsible for scheduling the execution of the second script using the windows task scheduler on Windows start up, changing the Windows machine name and restarting Windows. The scheduling command should look something like:
schtasks.exe /create /TN my-task /SC ONSTART /TR SCRIPT_FILE /RU USERNAME /RP PASSWORD
The second script may also delete the scheduled task - depends if you want this VM to recover automatically from restarts or not.