Video Screencast Help

How to retain current computer name before reimaging

Created: 10 Dec 2013 • Updated: 19 Dec 2013 | 13 comments
This issue has been solved. See solution.

I have been struggling with this isssue for weeks. I'm currently want to reimage a whole lab of 30 computers with Altiris 7.1.

All I want to achieve is retaining current computer names before reimaging and renaming all computers with these names after reimaging. For example, I got Lab1-01, then I deploy the image on it. After that, use Altiris to rename it back to Lab1-01.

I created a client job which contains:

1. Reboot to PXE

2. Deploy Image

3. Reboot to Production

4. Apply configuration (Rename computers and join them to the domian)

5. Reboot

I selected "Generate sysprep file using inventory data" in the deploy task, and I selected "Restore system configuration using inventory data" in the Apply Configuration task. It didn't work. The computers got the same name as the image instead of their previous names.

I also tried to select" Use a predefined system configuration" in the Apply Configuration task, and put the token"%compname%"in the computer name field. It didn't work as well.

All the jobs failed on the Apply Configuration task.

Anyone had the same problem or got any idea about this problem? I would appreciate it if anyone can share your experience and help me figure this out.

Thanks

Operating Systems:

Comments 13 CommentsJump to latest comment

Klim_Belchev's picture

We have the exact same issue.

Our current workaround is simply not renaming the computer.

We just reimage using:

Sysprep Configuration
Generate Sysprep configuration file using inventory data

This will keep the previous computer name.

After imaging we use Appy System Configuration to just join domain and move to proper OU.

"Restore system configuration using inventory data" does not work for us as well. I had a case open with support for the same issue. Closed it as I could not spent any more time on it, hoping this is fixed in 7.5.

Hope this helps.

kzhang's picture

Hi Klim,

Thanks for your workaround suggestion.

Apparently, a lot of people got the same issue with Altiris 7. Hopefully Symantec will fix this issue in the coming update.

I will test out your advice this afternoon and update this thread. Cheers.

kzhang's picture

Hi Klim, I tried out your workaround suggestion, it didn't work for me. I selected "Generate sysprep configuration file using inventory data" in the deploy task, and smply created a client job like this:

1. Reboot to PXE

2. Deploy image

3. Reboot to production

After reimage, the computer got the same name as the image instead of its own previous name. For example, I'm reimaging Lab1-01 with the image (image name is Lab1-09),. After reimage, the lab1-01 is renamed as lab1-09. It doesn't keep the previous computer name.

Any ideas?

JuniorDS's picture

Is the Firm.exe file in the task handler folder on the site server?  I remember having an issue similar to this.  The firm.exe file was not there and when i copied it there, naming started working again.  It disappeared after an upgrade.

kzhang's picture

Hi JuniorDS, I have copied "firm.exe" into the task handler folder on the site server, it doesn't help. I heard some lucky guys got renaming worked after copying the file into task handler, but it seems that I'm not that lucky. Any other ideas?

JSpur's picture

OK guys don't shot me on this if Im wrong. Its been a little while since I had to reimage a system.

1. The computer name in the console should be the name of the computer on the other end. This is achieved by using the token @CompName in the sysprep file.

2. When a computer boots into WinPE that already exists in the DB, it should not change the objects name. Only when it boots into production will it change the name in the console.

3. If the above does not work or you're not using sysprep. I have known Admins to script a SQL query to pull the computer name while in WinPE and write it to the system before it boots into production. If I remember right, its two or three registry keys.

Klim_Belchev's picture

Maybe your image did not sysprep properly for some reason.

Did you run Prepare for Image Capture before capturing the image?

Also do you see SysPrep running after your Reboot to Production job?

kzhang's picture

Hi Klim,

I have a feeling for that too. I included the "Prepare for image capture" task in the capture job, and Altiris said it was completed successfully. But I don't really know what values need to be configured in that task. I just ran it along with the other tasks in the job, and the job was completed without any error.

After the "Reboot to production" task, I didn't see any window showing Sysprep is running. Do you see any message or window telling you Sysprep is running? If you do, at what point you see that?

kzhang's picture

I'm using "Generate sysprep file using inventory data" in the deploy task, and "Restore system configuration using inventory data" in the Apply Configuration task.

As far as I can see from the log viewer on the site server, @compname CAN capture the target computer's previous name, but it CANNOT restore it back to the target computer after reimage.

Thus I have a feeling that there might be something went wrong AFTER reimaging. Altiris can deploy the image successfully. There was nothing wrong during the deploy.

I also tested out the answer file unattend.xml. I put @compname as the computername variable, and I put my domain info in the file as well. I selected to use the answer file in the deploy task. Apparently, the answer file was not being read at all as the target computer is exactly the same as the image (computer name, domain, etc.) after reimage.

Another thing I want to point out is that the configuration task will work if I set a static name or define a specific name range to the target computer.

Any ideas guys?

jpellet2's picture

Have you tried creating or grappbing a good unattend.xml file and copying it in to place after deploying the image? We have had a lot of success with this however we have had to customize the entire imaging job and have basically thrown out the built-in one in favor of managing each piece of the image job by itself because we wanted to use UNC paths for storing images rather than storing them all on the server. You could copy an unattend.xml with a token in it to the computer and then run a VBScript to replace your chosen token with the real computer name. Then once you reboot you'll be in good shape if Sysprep worked in the first place.

Klim_Belchev's picture

Sometimes SysPrep might fail because it has been run too many times - might be worth reading through the logs in c:\windows\panther

Also doublecheck your keys and version of Windows in the job.

I would:

 - rebuild the image

 - run Prepare for Image Capture again

 -  capture the image again

 - make sure Sysprep runs after imaging and rebooting into production

 

Just as a test you could build your computer using SOI (Scripted OS Install) and see if computername is correct.

Also make sure your OS is activated before sysprep.

SOLUTION
kzhang's picture

Thanks everybody for your input.

I managed to get the computers renamed as their previous names. The reason why I had that issue is because I put "reboot to PXE" task in the very first place in the whole capture job. The job contains the following tasks:

1. Reboot to PXE
2. Prepare for Image Capture
3. Create Image
4. Reboot to Production

The "Reboot to PXE" task is not supposed to be in this capture job as the "Prepare for Image Capture" task only works in Windows environment instead of WinPE. Thus I removed the "Reboot to PXE" task from the job, and then I tried to capture the image again and deploy it with no problem.

Thanks again for the help from you guys.