Jump to content




anyweb

How can I capture an image using capture media in ConfigMgr 2012



Recommended Posts

anyweb    399

Normally you would want to automate building your reference image using Configuration Manager or MDT or a mixture of both. So if for example you want to capture a reference image you could do so using a fully automated Build and Capture task sequence in System Center 2012 R2 Configuration Manager.

 

In this post however, I'll explain how you can capture an image manually and Configuration Manager 2012 provides a method of doing just that called Capture Media. This media is created as an ISO file which you burn directly to CD/DVD or mount in a virtual machine and use. But first you need to make sure that the image you want to capture is in the right state, listed below

  • workgroup joined

In order for the image to be captured the computer must be a member of a Workgroup, In other words, the machine you want to capture the image from must not be joined to a domain.

 

Tip: It's recommended that you build your master image without joining a domain as domain join can impact an image and make troubleshooting problems that occur later on, harder. Settings get applied when you join a domain, such as Group Policies are set, software may be installed, registry keys might be changed. Keeping a computer off the domain before capturing it, eliminates these and other potential issues.

 

I'd recommend you use Virtual Machines (Hyperv, Vmware Workstation) or whatever virtual software you like to create the 'image' you want to capture.

 

Step 1. Create the Capture Media

Perform the following on the Configuration Manager server as a SMSadmin.

Open the ConfigMgr console, click on Software Library, Operating Systems, expand Task Sequences. In the ribbon click on Create Task Sequence Media

create task sequence media.png

when the Create Task Sequence Media wizard appears click on Capture Media

capture media.png

click next and browse to the path of where you want to store the ISO file, give it a name like capture_media.iso

capture media file.png

click next, then click on browse beside boot image

boot image.png

select your X86 boot image

 

Note: if you are trying to capture x64 UEFI hardware such as the Microsoft Surface Pro 3, you must use a x64 boot wim.

select a boot image.png

click ok, then click on Browse beside Distribution Point

browse to dp.png

select your distribution point

dp selected now.png

now your selected boot image and distribution point are listed, click next to continue through the wizard

boot image done.png

if you get a UAC prompt accept it

uac prompt.png

finally the media is done !

mdeia done.png

if you need to troubleshoot it's creation look at the CreateTSMedia.log file in your confmgr LOGS dir. (D:\Program Files\Microsoft Configuration Manager\AdminConsole\AdminUILog)

createtsmedia log.png

 

Step 2. Remove the Configuration Manager client if installed

Run

Ccmsetup.exe /uninstall 

from the C:\Windows\CCMsetup folder, you can monitor the CCMSetup.log file to verify it uninstalls successfully as shown below

 

uninstall suceeded.png

 

Once done remove the following:-

 

  • delete any logs and files left behind in the ccmsetup and ccm folders
  • delete c:\windows\smscfg.ini

del stuff.png

  • delete the two SMS certs for the local computer in CertMgr.Msc

del certs.png

 

Step 3. While in Windows, start the ISO/CD/DVD on the Workgroup Computer

Perform the following on the computer which you want to capture an image of as a local administrator.

if you are using virtual hardware (hyperv or vmware) just mount the ISO on your workgroup computer (click on Media, Insert Disc, browse to the ISO location), otherwise burn the ISO to cd/dvd and insert that burned cd/dvd into the computer you need to capture.

While still in Windows (do not try to boot from this ISO/CD/DVD) you should see the following

dvd configuration manager 2012.png

click on Run TSMBAutorun.exe

Welcome to the Image Capture Wizard appears, click next..

welcome to the image capture wizard.png

Enter a path and name for the WIM file, I chose \\sccm\sources\os\captures\captured.wim and then enter the credentials of a user with permissions to write to that location

captured wim details.png

enter some Image Information

image information.png

review the summary

summary image.png

and click finish to start the capture process, notice how it prepares the config manager client

prepare config manager client.png

and then it syspreps

running sysprep command.png

before rebooting into Windows PE to capture the system

rebooting.png

and the capture begins !

capturing.png

success !

capturing 1 of 1.png

all done, the image is captured.

image successfully captured.png

 

Troubleshooting Tips:

 

  • If there is no CCM client installed, check for the SMSTS.log file in C:\Users\Administrator\AppData\Local\Temp\
  • If you have the CCM client installed and you see an error in SMSTS.log (probably in C:\Windows\CCM\Logs or C:\Windows\SysWow64\CCM\logs) which sates Waiting for CCMExec service to be fully available, locate the SMS Agent Host service in services.msc and start the service.
  • If you get the following error after inputting the Capture path and Network credentials "The network location cannot be reached. For information about network troubleshooting, see Windows Help. (Error: 800704CF; Source: Windows)" then verify you entered the credentials correctly, in addition you can test mapping a network drive using the same path and same credentials, if it fails, reboot the computer and try the wizard again
  • Like 1

Share this post


Link to post
Share on other sites


jonesy5090    1

Thanks for all the effort you've put into these posts - your documentation is far superior to anything Microsoft has to offer, they should take a leaf out of your book!

 

Keep up the good work.

  • Like 1

Share this post


Link to post
Share on other sites
Steph01    0

Hello and thank you very mush for all these good guides.

 

Here my 1st post just because this guide is the only one I have problem with. All other SCCM 2012 guides went with no error.

 

The problem I have is simple. After I create and burn the media, there is nothing that auto-starts. Digging the CD, I found SMS\BIN\I386\TSMBAUTORUN.EXE, but it does nothing when launched. On the root of the media, there is only the SMS folder and VOLUMEID.XML.

 

I tested to boot on it and it does not boot. It's 163MB in size.

 

I don't know what I missed since the log is like yours and states the media creation was a success.

 

Thanks and Regards,

Stephane

Share this post


Link to post
Share on other sites
anyweb    399

sounds to me like your capture iso is faulty, can you try making it again please, how did you burn it to CD ?

Share this post


Link to post
Share on other sites
RUH    1

I have the exact problem as Steph01. I tried burning the iso on a CD as well as USB. Autorun does not appear and when i click on SMS\BIN\I386\TSMBAUTORUN.EXE. nothing opens. I might be missing the sysprep folder in C:\ but it should alteast give me an error.

Are there any other requirements for this?

 

any ideas?

 

Thank you, All of your guides are great

Share this post


Link to post
Share on other sites
anyweb    399

what software did you use to burn the ISO ? have you tried mounting the iso in any virtual machine ?

 

Thank you, All of your guides are great

 

thanks, spread the word !

Share this post


Link to post
Share on other sites
RUH    1

I tried it with Imgburn, I also chose to directly install it to a usb. I tried it on several different computers but no luck. This is how my icons looks like.They dont look like proper application icons. If I try to do it using task sequence. its says it should be running in full OS. How would I start the program from full OS? is it only through capture media?

 

post-15594-0-89964100-1334188263_thumb.png

Share this post


Link to post
Share on other sites
kletsah    0

I tried it with Imgburn, I also chose to directly install it to a usb. I tried it on several different computers but no luck. This is how my icons looks like.They dont look like proper application icons. If I try to do it using task sequence. its says it should be running in full OS. How would I start the program from full OS? is it only through capture media?

 

post-15594-0-89964100-1334188263_thumb.png

 

Is the OS running on a VM in vmware? Then probably autorun is disable in the registry. Renable the autorun functions in the registry and autorun will be available again to autorun the bootmedia.

Share this post


Link to post
Share on other sites
anyweb    399

thanks to Andrew on Technet this may be the answer to your autorun problem

 

The capture media seems to work fine on Windows 7 installations where Autoplay is enabled and the media can launch TSMBAutorun.exe automatically. However, if you have to launch TSMBAutorun.exe by navigating to the SMS\bin\i386 folder (for instance if autoplay isn't working or you extract create/extract to a USB key), then the wizard does not launch. This seems to be because when you use explorer to run TSMBAutorun.exe the current working directory becomes SMS/bin/i386 and TSMBAutorun.exe expects to find TSMBootstrap.exe in <currentworkingdir>\sms\bin\x64 (or x86) - which would resolve, as John as found, to an invalid path of D:\SMS\BIN\i386\SMS\BIN\x64\TSMBootstrap.exe.

 

On newly built systems using MDT2012, I think the Apply GPO Pack step applies a default Windows 7 SP1 local policy that disables autorun - therefore we encounter the issue trying to use the capture media. Simply running gpedit.msc and cancelling the 'Turn off Autoplay' option in 'Computer Configuration/Administrative Templates/Windows Components/AutoPlay Policies' allows the Capture media wizard to run via autoplay.

If you do leave Autoplay turned off, you can workaround the issue simply by opening a command prompt at the root of the capture media drive and running sms\bin\i386 smbautorun.exe.

Share this post


Link to post
Share on other sites
n00blar    2

Great article.

 

Question, what's the recommended way of creating an OS image? Is it this one (create an image with all business-like applications) or the one specified in Part 7 of the SCCM 2012 labs?

 

If I use the captured image (Part 7 lab), I can install all my packaged applications as an OSD task. Later on, if need be, I can upgrade those deployed packaged applications.

I'm wondering if I can, safely, upgrade applications that have been installed in the captured-media image?

Share this post


Link to post
Share on other sites
anyweb    399

the build and capture method is definetly recommended as its 100% automated,

the method above requires manual steps, but achieves the same result

Share this post


Link to post
Share on other sites
RUH    1

If i havent said it already.. Niall you are a genius... running sms\bin\i386 smbautorun.exe from cmd worked. Thanks to Andrew as well

  • Like 1

Share this post


Link to post
Share on other sites
anyweb    399

yes, if you want to capture a 64 bit OS you need a 64 bit boot image, it will complain otherwise.

 

however, you can then deploy that captured image using a 32 bit boot image (x86)

Share this post


Link to post
Share on other sites
nhutminh008    0

I have another question.

I can run the autorun and and completed all steps before the wizard should start capturing.

But when I click Finish to complete "summary", It does nothing.

I wait for a long time and nothing comes then. I tried some times before I gave up...

How can I trouble shooting or check?

Share this post


Link to post
Share on other sites
nhutminh008    0

I have another question.

I can run the autorun and and completed all steps before the wizard should start capturing.

But when I click Finish to complete "summary", It does nothing.

I wait for a long time and nothing comes then. I tried some times before I gave up...

How can I trouble shooting or check?

 

I found the reason why. Maybe is is problem of the image of my company. I built new clean computer and tried again and wow, it run.

I have another simple question.

After I captured the image successfully, all drivers are gone. How can I maintain and keeps all drivers? Because my company is using some models and it takes time to install drivers one more time.

Share this post


Link to post
Share on other sites
anyweb    399

it's best practise to apply drivers as part of the Deploy Task Sequence, you can use WMI queries to detect hardware and apply driver package steps to apply the correct drivers to the correct hardware.

Having drivers in your captured image is not a good idea.

Share this post


Link to post
Share on other sites
nhutminh008    0

Very highly appreciate your helps Niall!

For normal drivers such as NIC, graphic or sound, It is not difficult to create driver package. But for other packs, addin, tools such as power management, Hot Key, finger print...it is hard to create package and deploy as part of TS.

So I need to capture and create 3 image version of lenovo T400, T410 and T420.

Can you share me the link describing your above solution and advise me how to carry out my need?

Share this post


Link to post
Share on other sites
scott0102    0

Here is a strange one, we run a Dell shop. I current inventory consists of Dell 960, 980, and 990 desktops. We have been successful in pulling an image from the 960. On the 980 and 990, after the stand alone media runs and begins its reboot, the select network window pop under it. Its as if the network driver fails. This makes it seem as if the network driver isnt loaded. This is just on the 980 and 990 series. The 960 runs perfectly and we have a generic image on our SCCM server.

 

Has anyone else had issues with the 980 and 990? Driver problems on capturing an image from created media?? Ideas?????

Share this post


Link to post
Share on other sites
davidstonar    0

Hi, Have managed to take an image using the Capture media, however I am now getting an error every time I try. Error 0x80004005. Ive tried looking at the log file smsts.log but cannot find it on the machine Im trying to capture. Any ideas?

Share this post


Link to post
Share on other sites

Thanks For all the great info on your site..

I am attempting to make a USB key with a Stanalone media on a USB key and I am getting problems. I found a command line

 

"C:\Program Files\Microsoft Configuration Manager\AdminConsole\bin\i386\CreateMedia.exe" /K:full /P:"Server.domain" /S:"A2A" /C:"" /D:"server.domain" /L:"Configuration Manager 2012" /A:"A2A00026" /Z:"False" /T:"CD" /M:"44482" /F:"C:\HP8200x64ADMIN.iso"

 

Which was suggested to get around the issue with large size USB sticks.

 

<![LOG[OS image has a size 18242 Mb exceeding max file size 4095 Mb]LOG]!><time="10:15:54.826+420" date="08-07-2012" component="CreateTsMedia" context="" type="3" thread="11868" file="mediagenerator.cpp:341">

<![LOG[uFD media does not support this file size]LOG]!><time="10:15:54.827+420" date="08-07-2012" component="CreateTsMedia" context="" type="3" thread="11868" file="mediagenerator.cpp:344">

<![LOG[Failed to create media (0x80004005)]LOG]!><time="10:15:54.827+420" date="08-07-2012" component="CreateTsMedia" context="" type="3" thread="11868" file="createtsmedia.cpp:331">

<![LOG[CreateTsMedia failed with error 0x80004005, details='']LOG]!><time="10:15:54.827+420" date="08-07-2012" component="CreateTsMedia" context="" type="1" thread="11868" file="createtsmedia.cpp:341">

<![LOG[MediaGenerator::~MediaGenerator()]LOG]!><time="10:15:54.827+420" date="08-07-2012" component="CreateTsMedia" context="" type="1" thread="11868" file="mediagenerator.cpp:214">

<![LOG[Media creation process that was started from Admin Console completed.

]LOG]!><time="10:15:54.867+420" date="08-07-2012" component="CreateTsMedia" context="" type="1" thread="1208" file="createmedia.cpp:1188">

<![LOG[CreateMedia.exe finished with error code 80004005]LOG]!><time="10:15:54.867+420" date="08-07-2012" component="CreateTsMedia" context="" type="2" thread="1208" file="createmedia.cpp:1239">

 

I am new to SCCM 2012 but was familar with 2003. Has this issue been resolved where I can create a stand alone on a 32-64 gig USB key? What should be straight forward is getting very convoluted....

Any insights woul be greatly appreciated.

Share this post


Link to post
Share on other sites
Rocket Man    40

Good stuff...once again these guides are a valuable source for information on SCCM

 

sms\bin\i386 smbautorun.exe.

 

 

Thanks

 

Rocket Man

Share this post


Link to post
Share on other sites
dverbern    2

Hi All,

 

I've had an awful experience with SCCM Capture today. I created capture media without problems, then I unjoined the target machine from domain and joined to workgroup.

I then ran the USB and it eventually triggered a restart, but then failed almost instantly, capture failed error 0x80070032.

 

I had no choice but to restart the machine, but then my nightmare began.

The machine wouldn't boot into Windows, stating that the C:\Windows\System32\Config\System was missing or corrupt.

 

I tried several things to recover:

 

1) Tried copying the missing system file from C:\Windows\Repair to C:\Windows\System32\Config\System

2) Tried copying ALL files from C:\Windows\Repair to C:\Windows\System32\Config

 

Ultimately, all these steps introduced more problems, including errors relating to LSASS.EXE, Windows Activation, etc.

 

I think that ultimately my issue is that the contents of C:\sysprep I placed on the target machine must have been the wrong version or something, because it seems the sysprepping failed and left the machine in this bizarre state.

 

I've resorted to building a replacement machine, but for the time being I'm going to very much shy away from using the SCCM capture until I learn to be less of a noob and more confident in what I'm doing!

 

Let this be a lesson to others :)

 

Daniel

Share this post


Link to post
Share on other sites
anyweb    399

and it's another good reason to use Virtual hardware for this type of exercise as you can snapshot at any time

  • Like 1

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×