Your browser was unable to load all of the resources. They may have been blocked by your firewall, proxy or browser configuration.
Press Ctrl+F5 or Ctrl+Shift+R to have your browser try again.

CloudNodeUserData on Windows / Azure agents #4309

pendor ·

I'm trying to create a reusable Windows 10 image in Azure to use as a QuickBuild agent. Looking at the instructions ( for Windows versus Linux agents, I notice a significant difference in that the Linux agent appears to get a dynamic CloudNodeUserData value passed in through Azure's ovf-env.xml whereas the instructions for Windows say to authorize the build agent before capturing an image from it.

I've tried building my image both with and without authorizing the template node in QuickBuild before the image is captured. It doesn't seem to make any difference, which makes sense since the hostname of the cloud-spawned agent is going to be different than the hostname of the template.

Is the QuickBuild agent on Windows capable of reading the CloudNodeUserData value from c:\AzureData\CustomData.bin? It appears the test launch for the cloud node on Windows does push the CloudNodeUserData into CustomData.bin in the VM when it's spawned, but the agent in the VM is stuck at "Build agent 'vm088738749a:8811' is not authorized to join the grid."

We're looking to be able to dynamically spawn many build agents to run automated GUI testing on Windows, so we need something where a dynamic number of agents can be spawned from one template as we do on Linux. I feel like I'm missing something obvious to get the cloud node running appropriately with the dynamic CloudNodeUserData. Any pointers on how to build the Windows image to work this way would be appreciated.

  • replies 5
  • views 244
  • stars 0
robinshen ADMIN ·

QB agent will read CustomData.bin to get the token to join the grid. However with Windows 10 image, it seems that there is some issue reading that file from build agent process. Am checking the issue and will let you know the result...

robinshen ADMIN ·

It turns out that CustomData.bin is populated too late in Windows 10 and QB is unable to get the token when started. Please upgrade to QB 10.0.32 ( which waits for this file to be populated at startup. Also you need to rebuild your build agent image to do below steps before running Sysprep.exe to prepare machine for image capture:

  1. Delete file C:\AzureData\CustomData.bin if exists.
  2. Create an empty file /azure_windows.txt.
pendor ·

Thank you for the super-quick response! QuickBuild still holds the crown for best support of any software I use!

Just to clarify on #2, is that c:\azure_windows.txt or under the QuickBuild agent install directory somewhere?

robinshen ADMIN ·

Sorry the empty file azure_windows.txt should be placed under agent's installation directory. That is:

<agent install dir>\azure_windows.txt
pendor ·

Thanks again! I ended up putting both in, and everything's working now. I'll trim out the extra file next time I rebuild the image.