Batch file initialization - rebooting the Azure node RRS feed

  • Question

  • I have a batch file that runs when provisioning Azure nodes.  Two of the initialization steps are using setx -m to create an environment variable and setting a registry key with the reg command.  After this, though these variables are set they don't take effect unless the azure node is rebooted.  I tried adding shutdown /r to the batch file but the reboot loops continually.  Is there a way to either reboot the machine once or otherwise have these changes recognized without a reboot?

    Thursday, May 21, 2015 3:19 PM


  • To reboot the machine once, you can try:

    - Before the reboot command, read a registry key to check whether it exists

    - if exists, won't reboot

    - if not exist, add the registry and then reboot

    You can also set cluster wide environment variables at the scheduler side if the value are same across nodes. "cluscfg setenvs /?".

    Qiufang Shi

    Friday, May 22, 2015 1:40 AM