none
Error creating an image of Drive C:, rc =2

    Question

  • Hello, as mentioned in the subject line above, I get the following error when trying to capture an image of my reference computer:

    Error creating an image of Drive C:, rc =2
    ZTI Error - Non Zero return code by ZTIBackup, rc=2
    ZTI ERROR - Non-zero return code by LiteTouch, rc = -2147467259

    I've looked at other threads and tried suggestions such as adding the "Set Image Folder" / "Set Image Name" into the Task Sequence, but it solved nothing.

    I am running Windows 7 Professional x64 and capturing from a server running MDT 2010.

    Would there be anything else that would cause this?


    • Edited by Rick Castello Wednesday, June 13, 2012 9:31 PM More information
    Wednesday, June 13, 2012 9:28 PM

Answers

  • If you look at the command line that it's attempting to run

    i.e.

    About to run command: cmd /c ""C:\WINDOWS\SYSTEM32\imagex.exe" /capture /compress maximum C: "\.wim" "201206141609CDrive" >> C:\MININT\SMSOSD\OSDLOGS\ZTIBackup_imagex.log 2>&1"

    You will see the file name it's trying to back up to is "\.wim". This of course isn't a valid backup file.

    I would suggest adding the following variables in to your customsettings.ini

    ComputerBackupLocation=%deployroot%\Captures

    BackupFile=MyFile.wim (change this to suit)

    Tuesday, June 19, 2012 3:03 PM

All replies

  • Can you upload your ZTIBackup.log? The answer should be in there.
    Wednesday, June 13, 2012 9:32 PM
  • Can you upload your ZTIBackup.log? The answer should be in there.
    I went through the scripts folder, but I didn't see that file, nor is it located anywhere in the DeploymentShare. Would it be elsewhere or generated a different way?
    Wednesday, June 13, 2012 9:53 PM
  • Look in c:\windows\temp\deploymentlogs
    Wednesday, June 13, 2012 9:55 PM
  • Also upload the ZTIBackup_Imagex.log file, which will show the detailed ImageX messages.


    Thanks, -Michael Niehaus Senior Program Manager, Microsoft Deployment Toolkit mniehaus@microsoft.com http://blogs.technet.com/mniehaus

    Thursday, June 14, 2012 2:33 AM
  • It looks like it's backing up OK. It shouldnt backup the C: drive in this case as that will be the BCD drive. It detects the corect drive to capture dynamically so doesnt need your input to calculate it.

    I can't imagine where the error regarding capturing the C: drive is coming from since ZTIBackup is the only script that should be doing that and it's (apparently) working just fine.

    Sorry I can't be more help, hopefully someone else will have some input though.

    Thursday, June 14, 2012 3:26 PM
  • Actually, reading this, I noticed this log is reflecting February 17th, 2012 and that it's not reflecting the current DeploymentShare on the server. It should be \\Imaging.tsd\DeploymentShare.... \\PC172\DeploymentShare was an old one.

    Any idea why it would still be showing the old one, much less not showing a current log?
    Thursday, June 14, 2012 3:36 PM
  • It may be that the last deployment didnt clean up the files as it should, this might also be the reason for your current errors.

    To resolve...boot into PE, dont start a deployment, press F8, type the following commands

    diskpart

    select disk 0

    clean

    exit

     

    Then reboot the machine and start a build from scratch and we'll see how it turns out.

    • Proposed as answer by bline79 Monday, March 10, 2014 4:04 PM
    Thursday, June 14, 2012 4:00 PM
  • I found out there was actually a second log! The one I posted previously was an old one...very strange. Here is the CURRENT ZTIBackup.log:

    <![LOG[Property LogPath is now = C:\MININT\SMSOSD\OSDLOGS]LOG]!><time="16:09:54.000+000" date="06-14-2012" component="ZTIBackup" context="" type="1" thread="" file="ZTIBackup">
    <![LOG[Microsoft Deployment Toolkit version: 5.1.1642.01]LOG]!><time="16:09:54.000+000" date="06-14-2012" component="ZTIBackup" context="" type="1" thread="" file="ZTIBackup">
    <![LOG[Property Debug is now = FALSE]LOG]!><time="16:09:54.000+000" date="06-14-2012" component="ZTIBackup" context="" type="1" thread="" file="ZTIBackup">
    <![LOG[Property DestinationDisk is now = 0]LOG]!><time="16:09:54.000+000" date="06-14-2012" component="ZTIBackup" context="" type="1" thread="" file="ZTIBackup">
    <![LOG[Property DestinationPartition is now = 1]LOG]!><time="16:09:54.000+000" date="06-14-2012" component="ZTIBackup" context="" type="1" thread="" file="ZTIBackup">
    <![LOG[Property DestinationLogicalDrive is now = C:]LOG]!><time="16:09:54.000+000" date="06-14-2012" component="ZTIBackup" context="" type="1" thread="" file="ZTIBackup">
    <![LOG[Drive C: 29305520]LOG]!><time="16:09:54.000+000" date="06-14-2012" component="ZTIBackup" context="" type="1" thread="" file="ZTIBackup">
    <![LOG[Local store path = C:\MININT\StateStore]LOG]!><time="16:09:54.000+000" date="06-14-2012" component="ZTIBackup" context="" type="1" thread="" file="ZTIBackup">
    <![LOG[Total used space: 29305520]LOG]!><time="16:09:54.000+000" date="06-14-2012" component="ZTIBackup" context="" type="1" thread="" file="ZTIBackup">
    <![LOG[Available space at C:\MININT\StateStore: 11652164]LOG]!><time="16:09:54.000+000" date="06-14-2012" component="ZTIBackup" context="" type="1" thread="" file="ZTIBackup">
    <![LOG[Computer backup will use network path (ComputerBackupLocation=AUTO)]LOG]!><time="16:09:54.000+000" date="06-14-2012" component="ZTIBackup" context="" type="1" thread="" file="ZTIBackup">
    <![LOG[Property OSDComputerName is now = ]LOG]!><time="16:09:54.000+000" date="06-14-2012" component="ZTIBackup" context="" type="1" thread="" file="ZTIBackup">
    <![LOG[WARNING - Unable to validation connection because a blank UNC was specified.]LOG]!><time="16:09:54.000+000" date="06-14-2012" component="ZTIBackup" context="" type="2" thread="" file="ZTIBackup">
    <![LOG[Beginning backup of drive C:]LOG]!><time="16:09:54.000+000" date="06-14-2012" component="ZTIBackup" context="" type="1" thread="" file="ZTIBackup">
    <![LOG[About to run command: cmd /c ""C:\WINDOWS\SYSTEM32\imagex.exe" /capture /compress maximum C: "\.wim" "201206141609CDrive" >> C:\MININT\SMSOSD\OSDLOGS\ZTIBackup_imagex.log 2>&1"]LOG]!><time="16:09:54.000+000" date="06-14-2012" component="ZTIBackup" context="" type="1" thread="" file="ZTIBackup">
    <![LOG[Return code from command = 2]LOG]!><time="16:09:56.000+000" date="06-14-2012" component="ZTIBackup" context="" type="1" thread="" file="ZTIBackup">
    <![LOG[Error creating an image of drive C:, rc = 2]LOG]!><time="16:09:56.000+000" date="06-14-2012" component="ZTIBackup" context="" type="3" thread="" file="ZTIBackup">
    <![LOG[ZTIBackup COMPLETED.  Return Value = 2]LOG]!><time="16:09:56.000+000" date="06-14-2012" component="ZTIBackup" context="" type="1" thread="" file="ZTIBackup">
    <![LOG[Property BackupScriptComplete is now = YES]LOG]!><time="16:09:56.000+000" date="06-14-2012" component="ZTIBackup" context="" type="1" thread="" file="ZTIBackup">
    <![LOG[ZTI ERROR - Non-zero return code by ZTIBackup, rc = 2]LOG]!><time="16:09:56.000+000" date="06-14-2012" component="ZTIBackup" context="" type="3" thread="" file="ZTIBackup">
    Friday, June 15, 2012 2:23 PM
  • Also upload the ZTIBackup_Imagex.log file, which will show the detailed ImageX messages.


    Thanks, -Michael Niehaus Senior Program Manager, Microsoft Deployment Toolkit mniehaus@microsoft.com http://blogs.technet.com/mniehaus

    Here is the CURRENT ZTIBackup_imagex.log:



    ImageX Tool for Windows

    Copyright (C) Microsoft Corp. All rights reserved.




    Files/folders excluded from image capture by default:

     \WINDOWS\CSC
     \RECYCLER
     \$Recycle.Bin\*
     \System Volume Information
     \pagefile.sys
     \hiberfil.sys
     \$ntfs.log



    [Error: 32] C:\Documents and Settings\Administrator\Local Settings\Application Data\Microsoft\Windows\UsrClass.dat



    Error imaging drive [C:\]
    The process cannot access the file because it is being used by another process.

    Friday, June 15, 2012 2:26 PM
  • Is anyone able to analyze these logs to pinpoint the problem? Any help is appreciated greatly.
    Monday, June 18, 2012 1:41 PM
  • It may be that the last deployment didnt clean up the files as it should, this might also be the reason for your current errors.

    To resolve...boot into PE, dont start a deployment, press F8, type the following commands

    diskpart

    select disk 0

    clean

    exit

     

    Then reboot the machine and start a build from scratch and we'll see how it turns out.

    I posted the correct logs yesterday so no need for that, although if you still recommend it, I'll start a whole new process.


    Tuesday, June 19, 2012 2:52 PM
  • If you look at the command line that it's attempting to run

    i.e.

    About to run command: cmd /c ""C:\WINDOWS\SYSTEM32\imagex.exe" /capture /compress maximum C: "\.wim" "201206141609CDrive" >> C:\MININT\SMSOSD\OSDLOGS\ZTIBackup_imagex.log 2>&1"

    You will see the file name it's trying to back up to is "\.wim". This of course isn't a valid backup file.

    I would suggest adding the following variables in to your customsettings.ini

    ComputerBackupLocation=%deployroot%\Captures

    BackupFile=MyFile.wim (change this to suit)

    Tuesday, June 19, 2012 3:03 PM
  • It's because you have already captured an image Wim with the same name like the new one you attempt to capture
    • Proposed as answer by dsaydon Saturday, December 12, 2015 12:01 PM
    Tuesday, January 06, 2015 2:35 PM
  • Was having the same exact error (VmWare vm), and started from scratch twice...before I realized there wasn't enough storage on the deploymentshare the wim was being captured too. Cleaned up some old images that weren't needed anymore, so i had more space...and voila. No problems. 
    Wednesday, December 09, 2015 4:54 PM
  • I had the same issue.

    What I did was I gave full permission on deployment share on network.

    Also it might me the issue wen running litetouch vbs script.

    When you run change the name of the WIM file.

    It worked for me.

    Thursday, November 03, 2016 5:02 PM