Sysprep and Page Files

Status
Not open for further replies.

Osiris

Golden Master
Messages
36,817
Location
Kentucky
Sysprep and Page Files
Sysprep is a great tool, to create an image that can be pushed out to client machines. With Sysprep, you can install the OS and any applications, create the Sysprep image and then push it to other client or server machines. Within minutes you can have the other systems up and running with all the require applications, service packs and hotfixes already installed and configured. This is a great tool if you use Virtual Server 2005 in a lab enviroment.


One issue you may encounter is keeping the image size manageable. The base OS install, service packs, hotfixes, and all the drivers and applications you load can make the image 4+ GB in size. One thing you can do to reduce the size of the image is to get rid of the page file. Depending on the memory configuration of the base machine this can save a lot of space. Problem is you can't just delete it, it is a system file after all.

Regedit to the rescue. There is a value that you can set in the registry to delete the page file on shutdown. By setting this value, the page file will be deleted and a temporary page file will be created. This temporary page file is under 20MB. When the system restarts a new page file will be created based on the memory configuration of the new machine and the registry setting will be restored to default.

Open regedit and drill down to

HKEY_LocalMachine\System\CurrentControlSet\Control\Session Manager\Memory Management

Change the setting of the PagingFile Multi-String Value to

C:\pagefile.sys 0 0

The first part of the string is the location of the pagefile, which by default is located at the root of the C:\ drive. The next two parts are the minimum and maximum size of the page file in MB. For example if your setting was E:\pagefile.sys 1024 2048, your pagefile would be located at the root of the E:\ drive, have a minimum value of 1024MB (1GB) and a maximum of 2048MB (2GB).

With the value changed you can run Sysprep and when the machine is shutdown the pagefile will be deleted and the image file will be smaller.

http://thelazyadmin.com/index.php?/archives/284-Sysprep-and-Page-Files.html#extended
 
Status
Not open for further replies.
Back
Top Bottom