CycoTron Absent Member.
Absent Member.
10892 views

New fix for Duplicate GUID and creating an image

I stumbled across an extremely easy way to fix the duplicate GUID problem. I believe it is the manual way of what "zac fsg -d" is supposed to do, but doesn't actually do. Hopefully this information will become irrelevant after the next ZCM patch.

I had been banging my head against a wall while trying to image all of our machines because I didn't clear the GUID before I created the original images, and hundreds of machines ended up with identical GUIDs that just wouldn't seem to go away no matter how many ways I imaged the machines or cleared the ISD (Image Safe Data).

Then I stumbled across this file:
C:\Program Files\Novell\ZENworks\config\DeviceGUID (and DeviceGUID.sav)

If you delete "DeviceGUID", and clear the GUID from your ISD, then restart the computer, your machine will import with a brand new GUID every time!

You can also use that method just before creating an image, and any new machines will then generate their own GUID upon first boot.

It would be awesome if ziswin accepted command line switches... then you could script the whole process.

-Nick Kelnhofer Professional Network Administrator CNA, MCSA, A+, Net+, Security+
Labels (2)
0 Likes
13 Replies
mbreiden Absent Member.
Absent Member.

Re: New fix for Duplicate GUID and creating an image

On Wed, 03 Sep 2008 00:26:01 GMT, CycoTron wrote:

> Then I stumbled across this file:
> C:\Program Files\Novell\ZENworks\config\DeviceGUID (and
> DeviceGUID.sav)


will look into this, thanks for letting us know
--


Marcus Breiden

If you are asked to email me information please remove the - in my e-mail
address.
The content of this mail is my private and personal opinion.
http://www.didas.de

Marcus Breiden If you are asked to email me information please remove the - in my e-mail address. The content of this mail is my private and personal opinion. http://www.didas.de
0 Likes
mbreiden Absent Member.
Absent Member.

Re: New fix for Duplicate GUID and creating an image

On Wed, 03 Sep 2008 08:07:36 GMT, Marcus Breiden wrote:

> will look into this, thanks for letting us know


when you do in unregister of the box, when does the DeviceGUID file reapear
again?
--


Marcus Breiden

If you are asked to email me information please remove the - in my e-mail
address.
The content of this mail is my private and personal opinion.
http://www.didas.de

Marcus Breiden If you are asked to email me information please remove the - in my e-mail address. The content of this mail is my private and personal opinion. http://www.didas.de
0 Likes
CycoTron Absent Member.
Absent Member.

Re: New fix for Duplicate GUID and creating an image

The next time it boots to windows, it will detect that there is no GUID, and it will then generate a new one right away.

-Nick Kelnhofer Professional Network Administrator CNA, MCSA, A+, Net+, Security+
0 Likes
mbreiden Absent Member.
Absent Member.

Re: New fix for Duplicate GUID and creating an image

On Wed, 01 Oct 2008 14:56:03 GMT, CycoTron wrote:

> The next time it boots to windows, it will detect that there is no GUID,
> and it will then generate a new one right away.


hmm well that is normal..after unreg you would need to shut down and than
upload the image.. or not?
--


Marcus Breiden

If you are asked to email me information please remove the - in my e-mail
address.
The content of this mail is my private and personal opinion.
http://www.didas.de

Marcus Breiden If you are asked to email me information please remove the - in my e-mail address. The content of this mail is my private and personal opinion. http://www.didas.de
0 Likes
CycoTron Absent Member.
Absent Member.

Re: New fix for Duplicate GUID and creating an image

You are correct. I guess I wasn't sure what you were getting at.

When I am making an image, what I do now is:
1. Configure the image how I want it.
2. Run a batch file I made, called "NewImage.bat".
NewImage.bat:

del "C:\Program Files\Novell\ZENworks\conf\deviceguid"
del "C:\Program Files\Novell\ZENworks\conf\deviceguid.sav"
shutdown -r -t 0

3. The computer will reboot, from the above batch file. Before it boots back to windows, I go into PXE and send the image up. After this, any computer that receives this image will have no GUID file in the image, therefore it will either create its own or restore the GUID from the Image Safe Data.
4. After sending the image up, reboot the original computer. It will restore its GUID from ISD and operate as normal.

I also made a batch file for computers that have duplicate GUIDs. This will remove the DeviceGUID file, and launch Ziswin so you can remove the ISD GUID. After closing Ziswin the computer restarts. Upon startup ZCM will detect no DeviceGUID and no ISD GUID, so it will generate a new one.
NewGUID.bat:

del "C:\Program Files\Novell\ZENworks\conf\deviceguid"
del "C:\Program Files\Novell\ZENworks\conf\deviceguid.sav"
"C:\Program Files\Novell\ZENworks\bin\preboot\ZISWIN.EXE"
shutdown -r -t 0

-Nick Kelnhofer Professional Network Administrator CNA, MCSA, A+, Net+, Security+
mbreiden Absent Member.
Absent Member.

Re: New fix for Duplicate GUID and creating an image

On Mon, 06 Oct 2008 20:06:06 GMT, CycoTron wrote:

> 3. The computer will reboot, from the above batch file. Before it
> boots back to windows, I go into PXE and send the image up. After this,
> any computer that receives this image will have no GUID file in the
> image, therefore it will either create its own or restore the GUID from
> the Image Safe Data.


ok... so I guess the problem is solved now..
--


Marcus Breiden

If you are asked to email me information please remove the - in my e-mail
address.
The content of this mail is my private and personal opinion.
http://www.didas.de

Marcus Breiden If you are asked to email me information please remove the - in my e-mail address. The content of this mail is my private and personal opinion. http://www.didas.de
0 Likes
adrie_h Absent Member.
Absent Member.

Re: New fix for Duplicate GUID and creating an image

CycoTron;1630526 wrote:
I stumbled across an extremely easy way to fix the duplicate GUID problem. I believe it is the manual way of what "zac fsg -d" is supposed to do, but doesn't actually do. Hopefully this information will become irrelevant after the next ZCM patch.

I had been banging my head against a wall while trying to image all of our machines because I didn't clear the GUID before I created the original images, and hundreds of machines ended up with identical GUIDs that just wouldn't seem to go away no matter how many ways I imaged the machines or cleared the ISD (Image Safe Data).

Then I stumbled across this file:
C:\Program Files\Novell\ZENworks\config\DeviceGUID (and DeviceGUID.sav)

If you delete "DeviceGUID", and clear the GUID from your ISD, then restart the computer, your machine will import with a brand new GUID every time!

You can also use that method just before creating an image, and any new machines will then generate their own GUID upon first boot.

It would be awesome if ziswin accepted command line switches... then you could script the whole process.




How did you clear the image safe data on the hunderd machines. I tried it with the old school tool zisclearnt.exe but the tool doesn't work on all desktops.. Gggrrr.

I used this script

echo off


Rem Dereg workstation
zac unr -f -u Username -p password

Rem Workstation guid remove
zac fsg -d


Rem Clear nalcache
del "C:\Program Files\Novell\ZENworks\cache\zmd" /s /q


Rem Remove device guid file
del "C:\Program Files\Novell\ZENworks\conf\deviceguid.*" /s /q

Rem Clears image safedata
z:\zisclearnt.exe
pause


Rem Copy reregistering files with reregister the workstation after the reboot
copy z:\rereg.bat c:\windows\system32
copy z:\autolgnoff.reg c:\windows\system32


Rem Runoce key wich runs after the reboot
regedit /s z:\runonce.reg


Rem Removing the nalview from the run key
regedit /s z:\nalviewweg.reg


Rem Registering the autlogon reg file
regedit /s z:\autolgnon.reg


Rem Killing Nal services
pskill nalwin.exe -accepteula
pskill ZenworksWindowsService.exe
pskill zennotifyicon.exe
pskill ctfmon.exe

Rem Copying a control file
copy z:\fixed.txt c:\windows

Rem Rebooting the workstation
shutdown -r -t 0


After the reboot the runonce key fires


zac register -u username -p password https://server.dns.local

regedit /s c:\windows\\system32\\autolgnoff.reg

shutdown -r -t 0
0 Likes
ipst13 Absent Member.
Absent Member.

Re: New fix for Duplicate GUID and creating an image

Yes but recreating a new object will not migrate all associations made with the old. So you will not have applications with the new object.

You'll need to do that all by hand. Easy with one workstation, but if you have more , well, make some coffee!

You can register the faulty wks with a new guid then, after reboot just reregister it with the old wks object using the zac reg [key]

Cheers!
0 Likes
CycoTron Absent Member.
Absent Member.

Re: New fix for Duplicate GUID and creating an image

adrie_h;1680094 wrote:
How did you clear the image safe data on the hunderd machines. I tried it with the old school tool zisclearnt.exe but the tool doesn't work on all desktops.. Gggrrr.

I used this script

echo off


Rem Dereg workstation
zac unr -f -u Username -p password

Rem Workstation guid remove
zac fsg -d


Rem Clear nalcache
del "C:\Program Files\Novell\ZENworks\cache\zmd" /s /q


Rem Remove device guid file
del "C:\Program Files\Novell\ZENworks\conf\deviceguid.*" /s /q

Rem Clears image safedata
z:\zisclearnt.exe
pause


Rem Copy reregistering files with reregister the workstation after the reboot
copy z:\rereg.bat c:\windows\system32
copy z:\autolgnoff.reg c:\windows\system32


Rem Runoce key wich runs after the reboot
regedit /s z:\runonce.reg


Rem Removing the nalview from the run key
regedit /s z:\nalviewweg.reg


Rem Registering the autlogon reg file
regedit /s z:\autolgnon.reg


Rem Killing Nal services
pskill nalwin.exe -accepteula
pskill ZenworksWindowsService.exe
pskill zennotifyicon.exe
pskill ctfmon.exe

Rem Copying a control file
copy z:\fixed.txt c:\windows

Rem Rebooting the workstation
shutdown -r -t 0


After the reboot the runonce key fires


zac register -u username -p password https://server.dns.local

regedit /s c:\windows\\system32\\autolgnoff.reg

shutdown -r -t 0


For computers with a duplicate GUID, I use the following script:

del "C:\Program Files\Novell\ZENworks\conf\deviceguid" 
del "C:\Program Files\Novell\ZENworks\conf\deviceguid.sav"
"C:\Program Files\Novell\ZENworks\bin\preboot\ZISWIN.EXE"
shutdown -r -t 0


When Ziswin is launched, I clear the GUID from there as well. If you don't do that, the GUID will come right back on the machine.

After running that script, the machine generates a new GUID, and re-registers to the Zenworks server right away. once in a while I will have one that does not register properly and I just register it manually from that point.

I did all of these manually. It is a pain in the neck, but since you can't script the ZISD GUID removal (hence launching ZisWin), I had no choice.

I have all of my bundles assigned to user groups or dynamic workstation groups, which are based on workstation name, so losing bundle assignments is not a concern in my environment.

-Nick Kelnhofer Professional Network Administrator CNA, MCSA, A+, Net+, Security+
0 Likes
ipst13 Absent Member.
Absent Member.

Re: New fix for Duplicate GUID and creating an image

CycoTron;1680421 wrote:

I have all of my bundles assigned to user groups or dynamic workstation groups, which are based on workstation name, so losing bundle assignments is not a concern in my environment.


Just curious, how many bundles, apps groups, dyn groups?

Cheers!
0 Likes
CycoTron Absent Member.
Absent Member.

Re: New fix for Duplicate GUID and creating an image

I've got approximately 325 bundles, 30 bundle groups, and 20 dynamic workstation groups. Almost all of the bundles/bundle groups are assigned to dynamic workstation groups, and there are about 1300 workstations imported to zenworks which are a part of at least 1 dynamic workstation group.

-Nick Kelnhofer Professional Network Administrator CNA, MCSA, A+, Net+, Security+
0 Likes
KAJEREMY Absent Member.
Absent Member.

Re: New fix for Duplicate GUID and creating an image

Thanks! That was a good post. Been wracking my brain til it hurt with the zac command and couldn't get it to work. Nice work!
0 Likes
stevestock Absent Member.
Absent Member.

Re: New fix for Duplicate GUID and creating an image

adrie_h;1680094 wrote:

I used this script

echo off


Rem Dereg workstation
zac unr -f -u Username -p password

Rem Workstation guid remove
zac fsg -d


Rem Clear nalcache
del "C:\Program Files\Novell\ZENworks\cache\zmd" /s /q


Rem Remove device guid file
del "C:\Program Files\Novell\ZENworks\conf\deviceguid.*" /s /q

Rem Clears image safedata
z:\zisclearnt.exe
pause


Rem Copy reregistering files with reregister the workstation after the reboot
copy z:\rereg.bat c:\windows\system32
copy z:\autolgnoff.reg c:\windows\system32


Rem Runoce key wich runs after the reboot
regedit /s z:\runonce.reg


Rem Removing the nalview from the run key
regedit /s z:\nalviewweg.reg


Rem Registering the autlogon reg file
regedit /s z:\autolgnon.reg


Rem Killing Nal services
pskill nalwin.exe -accepteula
pskill ZenworksWindowsService.exe
pskill zennotifyicon.exe
pskill ctfmon.exe

Rem Copying a control file
copy z:\fixed.txt c:\windows

Rem Rebooting the workstation
shutdown -r -t 0


After the reboot the runonce key fires


zac register -u username -p password https://server.dns.local

regedit /s c:\windows\\system32\\autolgnoff.reg

shutdown -r -t 0


Any chance you could provide the contents of the following files that you used: rereg.bat, autolgnoff.reg, runonce.reg, nalviewweg.reg, autolgnon.reg, fixed.txt
0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.