Issue:

When deploying a machine using ZENworks imaging with ENGL PE (as per TID 2018004 ) the imaging engine is unable to delete the disk partitions and the deployment process then fails.

This has been reported to Micro Focus and will be resolved in a future release of ZENworks Configuration Management.


Solution:

Use a diskpart script to reset the partitions prior to letting the imagine engine (img.exe) configure the disk.


Procedure:

  • Set up a zim.cfg file as per TID 2018004 
  • Open the zim.cfg file in a text editor.
  • Find the entry below then edit to add in the diskpart script section shown in green
    Dialog:Popup,"Restoring ENGL Smart Windows build process, please wait...",Green
    Pause:3
    
    ; Update VendorDataENGL (sample)
    Set:VendorDataENGLSTRING,PutKeyPairStringValue("%VendorDataENGLSTRING%","Machine_Type","%Machine_Type%")
    Set:VendorDataENGLSTRING,PutKeyPairStringValue("%VendorDataENGLSTRING%","OS","%Project_OS%")
    Set:VendorDataENGLSTRING,PutKeyPairStringValue("%VendorDataENGLSTRING%","Project","%Lookup_Project%")
    
    Set:_MonitorData_Task,""
    Set:MonitorStatus,"Started"
    Gosub:SendUpdateToMonitorServer
    
    ;
    ; Workaround for img.exe unable to delete diskpart encrypted partitions
    
    ; Delete diskpart script if found
    If:File,Exist,"%_ZimDir%ZimDiskpartScript.txt"
        File:Delete,"%_ZimDir%ZimDiskpartScript.txt"
    End:
    
    File:Append,"%_ZimDir%ZimDiskpartScript.txt","select disk 0"
    File:Append,"%_ZimDir%ZimDiskpartScript.txt","clean"
    File:Append,"%_ZimDir%ZimDiskpartScript.txt","create partition primary"
    File:Append,"%_ZimDir%ZimDiskpartScript.txt","assign letter = c"
    File:Append,"%_ZimDir%ZimDiskpartScript.txt","active"
    File:Append,"%_ZimDir%ZimDiskpartScript.txt","Format FS=NTFS LABEL=System QUICK"
    File:Append,"%_ZimDir%ZimDiskpartScript.txt","exit"
    
    ; run diskpart to clear all partitions on the machine
    File:Run,"diskpart /s %_ZimDir%ZimDiskpartScript.txt"
    
    
    If:EFI,Exist
    	; EFI machines
    	; Clear all partitions
    	File:Run,"cmd /c img -pd -all >> zim.log",verbose

  • Save changes to the zim.cfg file.
  • Test the updated file. 


If you have any problems or questions about the steps in this TID please contact the ENGL support team