Automatic Provisioning through MACLIST

Hello,

I am trying to setup automatic provisioning by MAC Address with a few of our OS Profiles (we will have logic on the backend to select the type of Profile to use). I can get it to provision manually by going into Server Management, selecting the OSD Server, and then editing the profile to set the Targeting Rule by MACLIST. This is what I need, but I am running into dead ends attempting to automate the Targeting Rule by MACLIST without having to go through the BigFix User Interface.

When you go through the UI to edit the MACLIST it creates a Custom Action “Profile Properties” that updates TPMfOS Files\global\gsp and sets the wim.rule and wim.ini where you can see your maclist listed. I’ve re-created the exact Profile Properties Actions, and by the looks of the action it is setting all the proper settings within the rule files and ini settings, but it still does not go into the Automatic Bindings window to start provisioning (Binding Menu becomes out of sync). Even the mkgenericsysprof.log will show that its setting the targeting rule successfully on my OSD server. Running a profile sync sequentially with the Profile Properties actions is not helping it either.

Eventually I will be making the MACLIST targeting rule edits either through the RESTAPI or through the IEM CLI to call the action. I am running 9.5.14 as well.

Thanks in advanced!

Hello,
you can find details in the documentation at the following link -> https://help.hcltechsw.com/bigfix/10.0/lifecycle/Lifecycle/OSD_Users_Guide/c_deploy_bare_metal_props.html
Looking at it:
"Targets are evaluated only once against a rule."
so if you apply a rule when a target computer is already known to the bare metal server, it will not be applied to that target. So with the default parameters for a rule, the target computer must be removed from the list of the known targets for the rule to be applied on it.
At the same link:
"When you modify a rule, if you want all targets to be evaluated against the changed rule, select Re-apply rule to all targets."
So, if you want that a rule is applied to a target computer that is already known to the bare metal server, this option must be selected in the wizard. You can export this action for you Custom Action. Looking at the difference between the 2 actions, in the .rule file created with “Re-apply rule to all targets”, the first line defining a rule has a “true” as second element (comma separated). E.g.
[10.40.0.14:2020/05/08:true:true]
MACLIST(00:38:56:A8:EB:FE,00:38:56:A8:CB:CD);
[end:1588076958972]
Furthermore, at the same link:
“When targets perform a PXE boot, the target properties are evaluated against the rule.”, so a target that is already PXE booted against the bare metal server and is showing the binding menu, will not start the deployment but it must restarted abd PXE booted again for the automatic deployment to be started.
Thanks.

2 Likes

Thank you!

I was following those directions already and sending the re-apply rule to all targets action, but after going through it again, there needs to be no Targeting Rule’s already configured in the UI. Once there are no targeting rules, you need to do a Sync Bare Metal server to give it a clean slate. After that, run the Custom Action, boot up the server, and it’ll auto deploy. If I need to send another Custom Action with a new MAC, it fails on me. I noticed that you need to re-run a Sync Bar Metal Server action, wait for it to complete, and then run the Custom Action again. This doesn’t seem very smooth but if this is all we have right now, I guess I’ll take it.