How to get around abortpxe.com issue (Full Version)

All Forums >> [Management Products] >> System Center Products >> System Center Configuration Manager



Message


bthomas161 -> How to get around abortpxe.com issue (9/21/2008 5:52:31 PM)

First post here, forgive me if this has been covered. I have searched throughout this forum and many other sites for answers, but have not found anything that works.

I installed R2 the other day. Am able to PXE boot to machines for images without any prestaging or placement of machines in collections. Image process seems to be working very well.

However, after the machine is imaged, I cannot image it again. i receive the abortpxe.com message. I understand why this would be blocked after an image, but there are times when re-imaging must occur. Especially with testing.

I have tried many fixes. 'Clear last PXE advertisement', restarting WDS service, deleting machine from database, re run advertisement..... but nothing works.

Anyone know how to get around this. I know at some point this will cause issues in production when a machine does not quite image properly and must be redone.

Thanks for any assistance.




wbracken -> RE: How to get around abortpxe.com issue (9/22/2008 9:15:29 AM)

Welcome to the forums.  :)

So I feel your pain to a degree with R2.  I was excited about having the built in Unknown Computer support however after seeing it compared to my current customized PXEFilter.vbs solution I am remaining with with the pxefilter.  Its a good first step but not exposing the ability to turn off the "Clear last pxe" it really is a flawed solution in my opinion.  I modified the PXEFilter.vbs that comes with the Microsoft Deployment Toolkit 2008 to auto clear the last PXE advert during the boot so I can re-image a machine via PXE as often as I like.  :)

Here's the code if your interested:

' //***************************************************************************
' // ***** Script Header *****
' //
' // Solution:  Microsoft Deployment Toolkit
' // File:      PXEFilter.vbs
' //
' // Purpose:   Decide what needs to be done for each PXE requests received
' //            by WDS.  If not present in the ConfigMgr database, add it.
' //
' // Usage:     (loaded automatically by Microsoft.BDD.PXEFilter DLL)
' //
' // Microsoft Solution Version:  4.1.501
' // Microsoft Script Version:    4.1.501
' // Customer Build Version:      1.0.0
' // Customer Script Version:     1.0.0
' //
' // Microsoft History:
' // 4.0.501 MTN  02/19/2008  Added header, additional logging, advertisement
' //                          verification for every request.
' //
' // Customer History:
' // 1.0.1 WCB 06/05/2008   Added code to automatically clear the last PXE
' //      Advertisement versus manually doing it from the
' //      SCCM Admin console
' //
' // ***** End Header *****
' //***************************************************************************

'//----------------------------------------------------------------------------
'//
'//  Set global variables, used by the ZTIProcess function below.  (Note that
'//  any changes to this script will require restarting the WDS service, since
'//  the script is only loaded once and kept in memory as long as the service
'//  is running.)
'//
'//  If ConfigMgr is running on the same server as WDS, the sProviderServer
'//  value can be left blank and the sUsername and sPassword values must be
'//  blank.
'//----------------------------------------------------------------------------
Option Explicit
Dim sProviderServer
Dim sSiteCode
Dim sNamespace
Dim sUsername
Dim sPassword
Dim sCollection
Dim connection
sProviderServer = "MYSCCMSERVER"
sSiteCode = "P01"
sNamespace = "root\sms\site_" & sSiteCode
sUsername = ""
sPassword = ""
sCollection = "P0100027"   ' This must be a collection ID, not a collection name

'//----------------------------------------------------------------------------
'//  Main routine
'//----------------------------------------------------------------------------
ZTIProcess

Function ZTIProcess
Dim sMacAddress
Dim sIPAddress
Dim sUUID
Dim sNetBiosName
Dim oLocator
Dim oSMS
Dim sQuery
Dim bFound
Dim iResourceID
Dim re
Dim oSite
Dim oParams
Dim oResult
Dim oLastError
Dim oClients
Dim oClient
Dim oCollection
Dim oNewRule
Dim oAdvertisement
Dim bTrying
Dim sAdvert
Dim i

' Initialization
sMacAddress = PXE.MacAddress
sIPAddress = PXE.IPAddress
sUUID = PXE.UUID
Set re = New RegExp
re.Pattern = ":"
re.Global = true
sNetBiosName = "MAC" & re.Replace(sMacAddress, "")

' Clear invalid UUID values
If sUUID = "00000000-0000-0000-0000-000000000000" or sUUID = "FFFFFFFF-FFFF-FFFF-FFFF-FFFFFFFFFFFF" then
 sUUID = ""
End if

' Log details
PXE.LogTrace "Processing request from MAC address = " & sMacAddress & ", IP address = " & sIPAddress & ", UUID = " & sUUID

'//----------------------------------------------------------------------------
'//  Filter requests.  This may need to be customized if you only want some
'//  network segments to be supported.
'//----------------------------------------------------------------------------
' Ignore ConfigMgr "ping" requests
If PXE.IPAddress = "127.0.0.1" or PXE.MacAddress = "FF:FF:FF:FF:FF:FF" then
 PXE.LogTrace "Ignoring ConfigMgr ping request"
 Exit Function
End if

'//----------------------------------------------------------------------------
'//  Verify the computer is known to ConfigMgr
'//----------------------------------------------------------------------------
' Connect to the SMS provider
Set oLocator = CreateObject("WbemScripting.SWbemLocator")
Set oSMS = oLocator.ConnectServer(sProviderServer, sNamespace, sUsername, sPassword)

' Build the query
sQuery = "SELECT * FROM SMS_R_System WHERE MacAddresses = '" & sMacAddress & "'"
If sUUID <> "" then
 sQuery = sQuery & " OR SMBIOSGUID = '" & sUUID & "'"
End if

' Process the query
bFound = False
Set oClients = oSMS.ExecQuery(sQuery)
For each oClient in oClients
 bFound = true
 iResourceID = oClient.ResourceID
 PXE.LogTrace "Found existing machine " & oClient.NetbiosName & " with ResourceID = " & iResourceID
 sNetBiosName = oClient.NetbiosName
 Exit For
Next


'//----------------------------------------------------------------------------
'//  If necessary, add the computer to the ConfigMgr database
'//----------------------------------------------------------------------------
If not bFound then 
 PXE.LogTrace "Could not find machine with MAC address '" & sMacAddress & "' or SMBIOS UUID '" & sUUID & "'."

 ' Add the computer
 Set oSite = oSMS.Get("SMS_Site")
 Set oParams = oSite.Methods_.Item("ImportMachineEntry").inParameters.SpawnInstance_()
 oParams.NetbiosName = sNetBiosName
 oParams.SMBIOSGUID = sUUID
 oParams.MACAddress = sMacAddress
 oParams.OverwriteExistingRecord = false
 On Error Resume Next
 Set oResult = oSite.ExecMethod_("ImportMachineEntry", oParams)
 If Err then
  PXE.LogTrace "Error importing machine entry: " & Err.Description & " (" & Err.Number & ")"
  Set oLastError = CreateObject("WbemScripting.SWbemLastError")
  PXE.LogTrace "Last WMI error: " & oLastError.Description
  Exit Function
 End if
 On Error Goto 0
 iResourceID = oResult.ResourceID
 PXE.LogTrace "Added new machine with ResourceID = " & iResourceID
End if

'//----------------------------------------------------------------------------
'//  Check if the computer is a member of the specified collection
'//----------------------------------------------------------------------------
If bFound then
 ' Build the query
 sQuery = "SELECT * FROM SMS_CM_RES_COLL_" & sCollection & " WHERE ResourceID = " & iResourceId

 ' Process the query
 bFound = False
 Set oClients = oSMS.ExecQuery(sQuery)
 For each oClient in oClients
  bFound = true
  PXE.LogTrace "Machine is already in collection " & sCollection
  Exit For
 Next
End if

'//----------------------------------------------------------------------------
'//  If necessary, add the computer to the specified collection
'//----------------------------------------------------------------------------

If not bFound then
 ' Add the computer to the specified collection
 On Error Resume Next
 Set oCollection = oSMS.Get("SMS_Collection.CollectionID='" & sCollection & "'")
 If Err then
  PXE.LogTrace "Error retrieving collection " & sCollection & ": " & Err.Description & " (" & Err.Number & ")"
  Set oLastError = CreateObject("WbemScripting.SWbemLastError")
  PXE.LogTrace "Last WMI error: " & oLastError.Description
  Exit Function
 End if
 On Error Goto 0

 Set oNewRule = oSMS.Get("SMS_CollectionRuleDirect").SpawnInstance_()
 oNewRule.ResourceClassName = "SMS_R_System"
 oNewRule.RuleName = sNetBiosName
 oNewRule.ResourceID = iResourceID
 On Error Resume Next
 oCollection.AddMembershipRule oNewRule
 If Err then
  PXE.LogTrace "Error adding membership rule to " & sCollection & ": " & Err.Description & " (" & Err.Number & ")"
  Set oLastError = CreateObject("WbemScripting.SWbemLastError")
  PXE.LogTrace "Last WMI error: " & oLastError.Description
  Exit Function
 End if
 On Error Goto 0
 PXE.LogTrace "Added new membership rule to collection " & sCollection
End If

'//----------------------------------------------------------------------------
'//  Clear Last PXE Advertisement
'//----------------------------------------------------------------------------
If bFound Then
 On Error Resume Next
 Dim resources
 Dim InParams
     
 ' Set up the Resource array parameter.
 resources = Array(1)
 resources(0) = iResourceID
     
 Set InParams = oSMS.Get("SMS_Collection").Methods_("ClearLastNBSAdvForMachines").InParameters.SpawnInstance_
 InParams.ResourceIDs = resources

 oSMS.ExecMethod "SMS_Collection","ClearLastNBSAdvForMachines", InParams
        
 if Err.number <> 0 Then
  PXE.LogTrace "Failed to clear PXE advertisement for resource: " & iResourceID
 Else
  PXE.LogTrace "Clear PXE Advertisement Completed successfully for resource: " & iResourceID
 End If
End If
'//----------------------------------------------------------------------------
'//  Wait until an advertisement is seen.
'//----------------------------------------------------------------------------
' Check for the advertisements
Set oAdvertisement = oSMS.Get("SMS_Advertisement")
i = 0
bTrying = True
Do While bTrying 
 Set oParams = oAdvertisement.Methods_("GetAdvertisements").inParameters.SpawnInstance_()
 oParams.ResourceID = iResourceID
 Set oResult = oAdvertisement.ExecMethod_("GetAdvertisements", oParams)
 For each sAdvert in oResult.AdvertisementIDs
  PXE.LogTrace "Found advertisement " & sAdvert
  bTrying = False
 Next
 i = i + 1
 If bTrying and i > 20 then
  PXE.LogTrace "Giving up after 30 seconds of checking for new advertisements."
  bTrying = False
 End if
 PXE.Sleep 3000
Loop
PXE.LogTrace "Exiting PXEFilter.vbs"
End Function




bthomas161 -> RE: How to get around abortpxe.com issue (9/22/2008 12:13:29 PM)

Thanks for the reply.
In my case, there were 2 separate issues.
In my troubleshooting the original abortpxe message, I created a new TS and did not advertise it to the Unknown Computers collection. That took care of new PC's being able to PXE boot.

However,there was another problem somewhere(have not specifically determined it yet). Had to make call to MS for support. SCCM or WDS were evidentally holding some signature or ID of the machines, and we could not find out where this was located. Clear last PXE Ad was used, machines were deleted from database, but the log still noted that machines were still in database.

We ended up placing the MAC of offending machines, with new hostnames into the unknown computers collection, then they would PXE boot. Not a solution, but the workaround allowed me to continue. I have not had problem re-appear since.

Thanks again for the info, I will definitely look into applying the script. 




anyweb -> RE: How to get around abortpxe.com issue (12/9/2008 3:21:20 AM)

does anyone have a solution for getting rid of abortpxe on SCCM 2007 SP1 (not R2)

I need to re-image a server and cannot because abortpxe kicks in even if I clear the last PXE advertisement...




anyweb -> RE: How to get around abortpxe.com issue (12/10/2008 12:36:29 PM)

hi again,

this one is really bugging me,

I image a server 5 or six times then boom no matter what I do I cannot get away from abortpxe.com

I understand the need for it but when testing configs it would be nice to control abortpxe.com and the ability to reimage machines for ever if necessary

I've tried the 'keep test computers in test collections' and deleting computers in AD sites and computers, deleting them from within the All Systems in SCCM and whatever other collections they may be in... and still abortpxe is there, (and yes, I've cleared the PXE advertisement...)

how can I convince SCCM that this system is ok to install again as I really need to test it........

will removing the advertisement help ? reimporting the computer info in computer association ?

what value is keeping me from doing what I need..... and how can I reset it..

cheers
anyweb




bluzier -> RE: How to get around abortpxe.com issue (12/10/2008 2:40:04 PM)

Try restarting WDS to clear the cache on the WDS server.  I've been burnt by this issue myself.

Brian




anyweb -> RE: How to get around abortpxe.com issue (12/10/2008 2:44:23 PM)

quote:

Try restarting WDS to clear the cache on the WDS server. I've been burnt by this issue myself.

Brian

(in reply to anyweb)


i restarted the whole server and that did the trick, ive tried restarting wds in the past to no avail, but next time i'll try that again,

i wish there was a tool to make this easier....

cheers
anyweb




Page: [1]

Valid CSS!




Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI
0.328125