How to set location for storage nodes

  • I have the following setup:

    Site 1:

    Fog server with storage node

    Site 2:

    Storage node only

    What I want to do is be able to image using the local storage node for each site and i cant figure out where this info goes and what the process is. Then based on which location, run a powershell script after the fact once the machine boots back up. Is this possible?

  • @george1421 Ah ok so if im imaging without registering then location doesnt really do what i need in this case. Thanks though.

  • Moderator

    @lps The location plugin is not quite that sophisticated. You assign storage nodes to the location and then the registered hosts to a location (the location field is added when the plugin is installed). That way a pxe booting target computer knows how to find its storage node.

    For bulk setting the location on a group of computers, create a FOG (set) group. Assign the hosts to that FOG (set) group then use the group to assign the location to the target computers in that group.

    (FWIW FOG Groups don’t work the way you might think a group works. They are more for setting a number of computers one or more values at one time. They are not persistent groups).

  • @george1421 Ok ive got location plugin installed, does this allow me to configure subnets and which storage they should be pulling from? I watched the tutorial and cant figure out how it determines which to pull from.

  • Moderator

    @lps You need to enable the plugin manager in the FOG Configuration->FOG Settings menu then install the location plugin.

  • @george1421 Where do I get the location plugin from, I cant find out where to install it from anywhere.

  • Moderator

    @lps You need the location plugin. That way you assign hosts and storage nodes to a location.

    The second part is a little bit harder but possible to do. Remember that FOG is linux based so it can’t do anything in the windows realm. It can leave cookies behind for windows to find, but can’t interact with windows directly.

    You could use a FOG Post install script to update/write a setupcomplete.cmd file that launches your powershell command after OOBE/WinSetup finishes and before the login form is displayed. The setupcomplete.cmd file is a windows thing, but its a batch script (text file) that FOG could write into (i.e. the cookie).

    The location specific thing in your post install script could be scripted similar to this, where I use the IP address where the target computer is to determine the location: This way I could write a custom powershell script into the setupcomplete.cmd file based on the location where the target computer is, or a variable you entered when you registered the computer with FOG.