One of the advantages that MDT gives over the traditional ghosting is the ability to backup your volumes during the task sequence. This, like everything requires planning. Backup, Capture and P2V can use some the some of the same settings so it makes sense to explain them together.
There’s a task sequence script that takes care of this in MDT called ZTIBackup.wsf. As a starting point for most situations use the following default settings in your customsettings.ini.
ComputerBackupLocation=AUTO BackupShare=\\Server\Share$ BackupDir=Captures BackupFile=%OSDComputerName%.wim
ComputerBackupLocation=AUTO will use the network locations provided if the image can’t be backed up locally. You can change this to NETWORK to always backup to the network or NONE to disable backups.
ZTIBackup.wsf will target disk 0 partition 1 by default. You can change this behaviour like in this example to backup all local volumes:
You can also target a specific volume by selecting it’s letter eg:
To Capture a WIM file
Use the default starting point settings described above in the following scenarios:
Standard Client Task Sequence – When build and capturing a reference image the above settings will capture the WIM file to the network using the settings specified in the BackupShare, BackupDir and BackupFile lines. DoCapture=YES must be used as a property in the customsettings.ini, a task sequence variable or capture selected manually during the Lite-Touch wizard panes. The flags are set automatically during the capture sequence. Also if the same WIM file is targeted then the original is appended not overwritten.
Sysprep and Capture – In this situation the WIM file will be captured to the network in the same way as above.
Performing P2V Migrations
As before the settings specified in the BackupShare, BackupDir and BackupFile lines will need to be set first(as above). Then for each scenario follow these instructions below:
Standard Client Task Sequence(with P2V) A P2V migration will use the script ZTIRetro.wsf and will capture in a VHD format so the BackupFile setting will need to have a .vhd suffix like this:
Replace Computer (inc P2V) – The image will be backed up to the network just as above.
Restoring a P2V image – When returning a captured VHD to a new machine, edit command line of the RESTORE VHD task sequene to include the following
If this is not set, the task will look for the VHD in the locations specified in the UserDataLocation and ComputerBackupLocation variables. You should add the task sequence variable ComputerBackupLocation=NONE to the task sequence used for your VHD restores.
The best approach I find to get all the scenarios working together is to use common backup locations and set task sequence variables when the default settings don’t suit my purpose.