What you will need
- A reference computer with a Sysprep’ed Windows 7 installation
- A Windows PE boot disk with access to the Imagex tool, such as the one created in the previous post
- A local drive or a network share to store your image
1) Boot your reference computer with the Windows PE boot disk
2) Work out the drive letter of the Windows 7 volume to capture
You can work this out very easily with the diskpart command. Type the following commands at the WinPE command prompt
This will present a table of all volumes and the drive letter associated with it. Identify the Windows 7 volume you want to capture and make a note of its drive letter which you will need later when capturing an image.
Exit diskpart by typing exit at the command prompt before moving onto using imagex.
3) Work out the drive letter of the destination where the image file will be stored
3.1) Storing image on a local drive
If you are using a local hard drive or a USB drive to store your image file then you will need to use diskpart as above to work out the drive letter associated with your local drive or partition before moving onto the actual capture process.
Once the destination drive letter is identified make a note of it. Make sure you don’t confuse it with the drive letter of the Windows 7 volume you want to capture.
3.2) Storing image on a network share
You will need to map your network share to a drive letter to be able to use it in the imagex capture command later on. Here’s the basic format of the net use command to map your network share:
net use n: \\ServerName\ShareName * /user:Username
Use your own network share and a user account which has write permissions to the share. Enter the password when prompted for the user account.
Make a note of the drive letter which you will need when capturing the image using imagex.
4) Capturing the Image
At the Windows PE command prompt type
imagex /capture D:\ F:\win7-image.wim “Windows 7 Enterprise 64bit” /check
To change the product key:
- Swipe in from the right edge of the screen, and then tap Search. Or, if you are using a mouse, point to the lower-right corner of the screen, and then click Search.
- In the search box, type Slui 3.
- Tap or click the Slui 3 icon.
- Type your product key in the Windows Activation window, and then click Activate.
Run the following command at the elevated command prompt:
slmgr.vbs /ipk <Your product key>
Should you find that your log file has gotten to large due to not backing it up frequently you can use the following code to shrink the log file.
ALTER DATABASE database_name SET RECOVERY SIMPLE
DBCC SHRINKFILE (database_name_log, 1)
ALTER DATABASE database_name SET RECOVERY FULL
SQL 2008 returns a table of shrinkfile related results plus the following confirmation:
(1 row(s) affected)
DBCC execution completed. If DBCC printed error
messages, contact your system administrator.
Setting your branch to exactly match the remote branch can be done in two steps:
git fetch origin
git reset --hard origin/master
Sometime we may encounter a VDP checkpoint error as shown by VMware via an alert message, like
VDP:  The most recent checkpoint for the VDP appliance is outdated PafoVM 12-3-2014 11:41:36
This error can occur if the system is booted and/or lost its connecion to the NAS where the disks are mounted.
The error can be investigated and (re)solved by running a check on the appliance via a SSH session to the VDP and executing the check procedure below.
Logon to the VDP using ssh.
- For logistics check VDP status (“dpnctl status“) and used disks (“mount“)
- Stop VDP services , use “dpnctl stop” , allow some time to shutdown the Backup schedules and GSAN environment
- Unmount involved VDP disks (sudo mount /data?? disks where ?? can be 00 thru 06 residing on disk /dev/sd?1 where ? is a character.)
- Run “xfs-check” for each disk unmounted (“sudo xfs_check /dev/sd?1” where ? is a character from b to g)
- Remount automount disks (“sudo mount -a“) and check if disk of item 2 are mounted.
- Restart VDP services (“dpnctl start all“) , wait for checks, MCS GSAN and axionfs restarts.
- Stop the maintenance scheduler (“dpnctl stop maint“)
- Create an AVAmar checkpoint (“avmaint checkpoint –ava“) which generates an XML checkpoint.
- Enforce an integrity check (“avmaint hfscheck –full –ava“) , this can take a while 15 to 60min.
- Use/Check result (“avmaint hfscheckstatus –ava“) to follow result and until “status= Completed“..
- Restart maintenance scheduler (“dpnctl start maint“)
The alarm/error should now have been disappeared from vSphere.
This occurs when a Windows 7 system has been sysprepped three times — KB929828. To overcome this, you will need to do the following:
1) Inside the Sysprep Unattend.xml file located at c:\windows\system32\sysprep, delete skiprearm=1 from the section. In order to edit the Unattend.xml file, you will need to slave the HDD onto a working machine in order to have access to a text editor for editing the file.
2) Under HKEY_LOCAL_MACHINE\SYSTEM\Setup\Status\SysprepStatus\, set GeneralizationState to 7
3) From an administrative command prompt, type the following
4) Under HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform\, change SkipRearm to 1
5) disconnect the ethernet cable
6) Rerun the sysprep