New Question

Revision history [back]

click to hide/show revision 1
initial version

Hello,

Here you have the domain join explained: https://ask.cloudbase.it/question/1166/automate-domain-join-when-we-provision-a-windows-vm-on-openstack-running-on-kvm/

Thank you,
Adrian Vladu

Hello,

Here you have the domain join explained: https://ask.cloudbase.it/question/1166/automate-domain-join-when-we-provision-a-windows-vm-on-openstack-running-on-kvm/

Update #1:
If the hostname change is done by oobe hook after specialize has finished, and in the specialize the order is:

  1. Domain join
  2. Cloudbase-init hostname change,

I suggest configuring Cloudbase-Init to run a local script that can dump the initial hostname somewhere and then exit from that local script with the exit code 1002, then at the next boot cloudbase-init will run that local script again (which at the second run will set the hostname and exit with exit code 1001).

In cloudbase-init-unattend.conf put:
[DEFAULT]
plugins=cloudbaseinit.plugins.common.localscripts.LocalScriptsPlugin # plus the ones you already have minus the SetHostnamePlugin

And in cloudbase-init.conf you might want to manually set the exact plugins you require, otherwise all the default plugins will run (inlcuding SetHostnamePlugin and the LocalScriptsPlugin).

How to configure the local scripts plugin:
https://cloudbase-init.readthedocs.io/en/latest/plugins.html#scripts-execution-main

And the exit codes you can use:
http://cloudbase-init.readthedocs.io/en/latest/tutorial.html?highlight=1001#file-execution

Thank you,
Adrian Vladu