/build/static/layout/Breadcrumb_cap_w.png

WIM Storage: Freeing up space on your K2000 if you are using WIMs K2000 version 3.6

I have in the past posted blogs on storing your Wim files at locations other then the KBox to save deployment time and allow more machines to image at the same time.  The method with 3.6 is the same, just the needed files are no longer on the kbox.  You can create these file yourself with notepad.

The only glitch I have run into doing this is the 3.6 task engine identifies mid level batch files as exe and breaks the chain.  If you do not use any mid level batch files you are fine.  If you do you can convert that batch file to run as an exe by calling the batch file via a vbs script. See my answer to this question http://www.itninja.com/question/number-of-autologins-required-has-changed-from-1-to-3-since-3-6-upgrade that starts with "Ok to make it part of the kbox."

Here is the trick to save network bandwidth and K2000 diskspace.  Store the Wim's on Windows servers, Wim files are not restricted to K2000 file system.

I had the server crew create storage space on all the sites and I store my Wims at each site.  They created a share on the main storage server at each site named images$ and I have a K2000 domain user that has rights to these shares.  I created a subdirectory called imagestore in each share (required).

I used the KBE manipulator to create custom pxe boot environements that map the T: and W: drive to each of my storage spaces.  When I capture a sysprepped image I choose the proper boot to map the server I want it to go to.

When staff deploys an image, they pxe boot to the K2000, the machine gets it deployment orders from the k2000 and starts.  I remap the W drive as my first preinstall task to the needed storage to access the WIM.

The deployment starts on the K2000 and then it switches over to the storage server to copy the wim portion then switches back to the K2000 for the remainder of it's mid level and post tasks.

All the workload of deploying the image files is placed on the storage servers instead of the K2000.  I have had 120 images deploying from a single K2000 this way and I am still able to capture an image even when they are deploying.

I have had to image over a T1 when the microwave link went down.  Still managed to use the K2000 to do full classrooms by putting the wim file on a local server.

The server crew can easily backup my wims to commvault also.

You will need to follow the process for both 32 and 64 bit and also if you are using pe 3 and 4 for both of those also.

For this blog I am using WinPE 3 32bit

First step is to create an empty WIM capture to use as the deployment master.  Boot with pxe to the kbox and capture an empty formatted C:drive as a Wim capture.

 (use diskpart to clean and create a partition and then format as ntfs)

 

You will need an HTA screen to capture and a VBS script to deploy with

Copy and paste below into notepad and save as capture_wim.hta:

 

'<head>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

  <link rel="stylesheet" type="text/css" href="deployment_client.css" />

 

<title>WIM Capture</title>

<HTA:APPLICATION

     APPLICATIONNAME="ImageX Capture"

     SCROLL="no"

     SINGLEINSTANCE="yes"

</head>

 

<script language="VBScript">

'Resize window

Sub Window_onLoad

        window.resizeTo 500,380

End Sub

   

'Verify t:\imagestore exists

Sub StartCapture

 

Dim imgForm

Set imgForm = Document.forms("imgForm")

 

   Set objFSO = CreateObject("Scripting.FileSystemObject")

   If objFSO.FolderExists ("t:\imagestore") Then

   Else

     Set objFolder = objFSO.CreateFolder("t:\imagestore")

   End if

 

'Verify image is not already on T:\imagestore

     Set objFSO = CreateObject("Scripting.FileSystemObject")

     If objFSO.FileExists("t:\imagestore\" & imgForm.imgName.value & ".wim") Then

           MsgBox("The WIM image already exists. Please use a different name")

     ElseIf imgForm.imgName.value = "" Then

           MsgBox("A blank name is not allowed.")

     Else

'Start Image Capture

     strCommand = "%systemdrive%\windows\system32\imagex.exe /capture /verify /compress" & " " & imgForm.comPrs.value & " " & imgForm.srcDrive.value & ":" & " " & "t:\imagestore\" & imgForm.imgName.value & ".wim" & " " & "'" & imgForm.imgName.value & "'" & " " & "/logfile" & " " & "t:\imagestore\" & imgForm.imgName.value & ".log"

     Set wshShell = CreateObject("WScript.Shell")

     WshShell.run strCommand

     'MsgBox("Process Complete. Check T:\imagestore\" &  imgForm.imgName.value & ".log for errors" )

     Set WshShell = nothing

     End If

End Sub

 

</script>

 

 

<body>

<h1>WIM Capture</h1>

 

<form id="imgForm" action="">

<div class="list">Image Name: <input type="text" name="imgName" id="imgName" size="20" maxlength="10">.wim</div>

<div class="list">Source Drive: <input type="text" name="srcDrive" id="srcDrive" size="1" maxlength="1">:</div<br/>

</div>

 

<table><tr><td VALIGN="baseline">

<div class="list">Compression: </div>

</td>

<td VALIGN="baseline">

<select name="comPrs" id="comPrs">---

<option value="fast">Fast</option>

<option value="maximum">Maximum</option>

<option value="none">None</option>

</select>

</form>

</td>

</tr>

</table>

<br>

<div class="text"><em>Note: Images will be sent to t:\imagestore\.</em></div<br/>

<br>

<br>

<input type="button" value="Start Capture" name="StartCapture" onClick="StartCapture">

 

<span id = "DataArea"></span>

 

 

</body>

 

Copy and paste below into notepad and save as apply_wim.vbs:

 

'Verify t:\imagestore exists

 

Set objFSO = CreateObject("Scripting.FileSystemObject")

If objFSO.FolderExists ("t:\imagestore") Then

  

Else

  MsgBox ("Missing t:\imagestore directory. No WIM images found.")

 

End If

'Deploy imageX Image

 

If WScript.Arguments.Count < 3 or WScript.Arguments.Count > 4 Then

  WScript.Quit

 

Else

 

imgName = WScript.Arguments.item(0)

imgNum = WScript.Arguments.item(1)

trgDrive = WScript.Arguments.item(2)

 

End if

 

Set wshShell = WScript.CreateObject ("WSCript.shell")

wshshell.run "%systemdrive%\windows\system32\imagex.exe /apply" & " " & "t:\imagestore\" & imgName & ".wim" & " " & imgNum & " " & trgDrive & ":" & " " & "/logfile t:\" & compName & ".log", 1, true

set wshshell = nothing

 

'  apply_wim.vbs <imagename> <imagenumber> <targetdrive> <default logfile=computername.log>

 

On the windows servers my shares are all \\server\images$.  I place the capture_wim.hta file on the root of all my windows image stores, under that I create a subdir named imagestore.

 

For deployment I used the KBE Manipulator to create a custom KBE that maps to the windows server we use the most. Then have mid level tasks to remap to the other servers.  For the capture I used the KBE manipulator to create custom capture KBE’s for each server.

Deployment KBE:

Use the KBE Man and fill in the 4 steps on screen 1

 

Click on “create KBE” on screen 2, and you will see this popup

 

 

Say yes and enter the following commands to remap the drives for external share access:

 

Say yes again to custom DOS command and enter:

Echo off

Say yes again to custom DOS command and enter:

net use t: \\server\images$  Password  /user:UserWithShareRights

 

Say yes again to custom DOS command and enter:

Echo on

say no this time and step thru and let the KBE build

 

To map to other servers simply create a mid level task that remap to the other servers. place it as the first midlevel task.

 

 

For the Capture KBEs I created one for each bit type for every storage server.

Use the KBE manipulator just like you did to create deploy KBE’s but add 2 additional lines

 

 

Say yes again to custom DOS command and enter:

Echo off

Say yes again to custom DOS command and enter:

net use t: \\server\images$  Password  /user:UserWithShareRights

Say yes again to custom DOS command and enter:

 

Echo on

Say yes again to custom DOS command and enter:

T:\capture_wim.hta

Say yes again to custom DOS command and enter:

exit

say no this time and step thru and let the KBE build

If you do not want to build special capture KBE’s you can also use a deploy KBE that maps to the server and open a command window under recovery and type t:\capture_wim.hta to run the capture.

 

To deploy images you need to create a mid level task to disperse your WIM to the target machine, duplicate and use the shell Wim capture you created.

 

 

 

Ok to make it part of the kbox.

Comments

  • I'm totally lost lol... good grief... - knuckle66 7 years ago
  • Ok so I followed you all the way down to where we finished making the KBE's. I don't understand what you want me to do after this. you have an apply_tmccwim.vbs and I don't know what this is. Is this the apply_wim.vbs that you had us create? Also why do we need to upload a blank formatted C? - knuckle66 7 years ago
    • You need to capture the blank drive as a internal wim capture, so the kbox database thinks it is deploying a wim image. I captured one for 32 and one for 64 bit and then I duplicate and rename those and add the tasks to that copy. That file is only 1.7k in size - SMal.tmcc 7 years ago
    • sounds like all you need to do is create a mid task to place the wim on the drive and create a depolyment shell to put the task in. - SMal.tmcc 7 years ago
  • ok, and then the apply_wim.vbs tells it to go look to the file server for the actual deployment? - knuckle66 7 years ago
    • it looks at the w: drive to find the actual wim file
      this is the part to the code:
      /apply" & " " & "w:\imagestore\" & imgName & ".wim"
      so where ever you map w: to is where it looks - SMal.tmcc 7 years ago
  • The apply_wim.vbs is the dependency app you upload to the kbox task. If you look at the picture above of the Post Install task you will see it listed as the attached file. Mine has the college name also, but it is the same file. That is the file cscript calls to deploy the real wim to the HDD - SMal.tmcc 7 years ago
  • Ok this is where I'm going to sound stupid and I'm sorry, I only received the basic training on the device and I'm being hammered to try and make this process faster. I apologize again and thanks for helping me with this I know you are not getting paid to help me here.

    I now have my shell image, I created my deployment kbe (for right now I'm going to use command line in recovery to capture), I've uploaded apply_wim.bs to my post installation task, I'm ready begin but I don't know what I'm supposed to do beyond this point.

    I'm sorry but I'm as new as it comes to this, I basically only knew how to make images and deploy software up to this point, 3.6 really messed me up and now that I recovered from that everyone keeps telling me it's too slow and this is what lead me to this. - knuckle66 7 years ago
  • wait I'm and idiot I see what you are doing, let me test and I'll let you know. Thanks!!! - knuckle66 7 years ago
    • if you have gmail you can reach that way and we can use chat to walk you thru any hangups. - SMal.tmcc 7 years ago
      • I just wanted to thank you again for all of your help!! - knuckle66 7 years ago
  • We don't have servers at our remote locations. Could the WIMs just be copied to a Windows 7 computer at the location? - jfrasier 6 years ago
    • Yes the only problem you will run into is win7 has a connection limit

      http://social.technet.microsoft.com/Forums/windows/en-US/7f2ab78b-eec0-43e0-af7f-f1ddf21a704a/windows-7-what-constitutes-a-connection-under-the-20-connection-limit?forum=w7itpronetworking

      http://www.tomshardware.com/forum/14441-63-user-maximum-connection-limit-windows-ultimate

      http://scottiestech.info/2009/08/22/how-to-increase-the-10-connection-limit-on-a-windows-lan/

      also you would want to put this machine on a gig port if possible - SMal.tmcc 6 years ago
  • Why do we need the index number? ie, Doesn't seem like I'll need to change it from '1'.

    I found this info: "The command to apply an image to a volume is simply imagex /apply image.wim 1, where 1 tells ImageX to apply the image from the file image.wim that has the index number 1." Source: technet.microsoft.com/en-us/library/cc507842.aspx

    That seems to say that one file named "image.wim" could have multiple images inside with varying index numbers. I'll stick with keeping them separate myself, but am curious how the index number comes into play.

    Thanks! - murbot 6 years ago
    • for what you do it will always be one but it is there for exaclty what you said, complicated wims there can multiple - SMal.tmcc 6 years ago
      • Cool. Doubt I'll need to change that number.

        My offboard image with an onboard 1.7kb shell deployed fine to another desktop of the same model. But when I try deploying to a laptop (e6440), it fails at the Apply Image task with an unknown error (3221225477). I tried a couple times on different wall ports just to be safe, but same result.

        I dupped the shell I created and also dupped the mid-level (post install) task to call the VB script and edited the cmd argument to grab the new image name. Then used the new dupped task in the dupped shell. I checked the xml and it's calling the correct stuff. My new image name ends with the digit "1" (ImgMASTER1), but my first image was IMG-MASTER so I was think maybe the digit might be causing a problem.

        Any ideas what might cause it to fail before it gets to the drivers? - murbot 6 years ago
      • is the bios in legacy mode on the laptop? make sure the drive t: is mapped to the external source - SMal.tmcc 6 years ago
  • Ah Phooey. I never saw your reply here. I'm testing it now...moments after another similar post. Will report back. - murbot 6 years ago
    • No luck changing the BIOS from Legacy to UEFI. I have an identical 7010 as the one I captured and I get the same failure when attempting to deploy to the same model as the original. After it fails, while still on that Task Error page, I opened a cmd prompt and can see the files on T:. - murbot 6 years ago
  • Can I create the deploy KBE to re-map the drives, duplicate an existing WIM and insert the Mid task (apply_wim.vbs) in the duplicated WIM and then deploy the duplicate, or do you always have to create the "shell" WIM? - gochjj 6 years ago
    • I don't have it all working yet, but I'm very close and have gotten quite familiar with the creation of the capture and deploy KBEs.
      The answer is no, you don't have to create the empty 1.7kb shell every time. It can be dupped. And a dup can be dupped. As you noted you'll just need to edit the new copy of the "WIM Deploy xxx" so the first argument after the Apply_wim.vbs is the wim file name. I've been tossing failed images and instead of dupping the mid tasks, I just edit it for the new test image until I get a fully functional image the way I want.

      Then you must go to your system images on the K2k and either dup and edit or just edit an exiting shell.
      If you have a machine you're imaging already booted to the KBE imaging screen, after you edit the task and image on the k2k, go over to the machine that is booted to the KBE and click back to the main menu, then back into Imaging and the new Image will be there. No need to reboot into the KBE until you already kicked of an image and it failed.

      So, for me, I've focused on 2 steps when I create a new image. Dup and edit the mid level task and dup and edit the image under System Images.
      Hope this helps. - murbot 6 years ago
  • Do I have to create the Shell WIM image at all? Can I dupe an existing WIM and add the Mid task to that? - gochjj 6 years ago
    • yes you can but a shell image will deploy in less then a minute. - SMal.tmcc 6 years ago
  • has anyone figured out how to make profile capturing work with this method? - knuckle66 6 years ago
    • as in migration files? - SMal.tmcc 6 years ago
  • yeah, we are migrating from XP to Win 7 and we've been using Windows Easy Transfer. But I know Kace can do the same thing. However I don't know how to make it work with the files being stored on the file server.
    We had posted here http://www.itninja.com/question/k2000-deployuserstates-vbs-using-network-drive-instead-of-system-drive-not-working?utm_source=itn_email&utm_medium=answer_alert&utm_campaign=notifications&utm_content=question_permalink but I don't think the one guy understood what we are doing. - knuckle66 6 years ago
    • http://blog.kace.com/2013/02/20/k2000-kloser-look-capturing-profiles-to-an-external-store/ - SMal.tmcc 6 years ago
    • http://www.itninja.com/blog/view/using-user-state-migration-tool-with-a-kace-k2000-remote-site-appliance - SMal.tmcc 6 years ago
      • Thanks SMal!!! I'll take a look at these and let you know. - knuckle66 6 years ago
  • Does the 3.7.11 update break this process? - knuckle66 6 years ago
    • My Current Version: 3.7.110284 and still use this technique with some improvements. With the new KBE_Man it is much easier to create the capture boots and I am now using AutoIT to do some tasks.

      I am working on a new blog for 3.7 with 3.7KBEM and AutoIT, on hold till Spring classroom patching\MI and reimaging is completed. - SMal.tmcc 6 years ago
      • That's great news!! In your opinion it's ok for me to upgrade since it doesn't change the current process. Then when your new KB comes out I can apply the some of the improvements that you are talking about. - knuckle66 6 years ago
      • 3.7 is more of a GUI upgrade then anything else. The background processes run the same as they did in 3.6 - SMal.tmcc 6 years ago
  • So I'm diving into the 64 bit world here and I'm having a problem. I keep getting BOOTMGR is missing.
    This is what I've done:
    1. Created new 64 bit image from scripted installations using uploaded media.
    2. syspreped and uploaded using the 64 kbe created from above, selected C. and uploaded a 3GB file to the imagestore.
    3. created a x64 image shell by following the steps above.
    4. created the mid level task for my image as stated above.
    Pre-install tasks.
    Create Single Partition
    Format C: as NTFS
    install vista /2008/7/8/2012 MBR

    Mid level tasks
    64wim7base.

    This is the same as my 32 bit, I've tried it with and without the MBR. I'm not sure what I'm doing wrong or what I need to change to make this work. - knuckle66 5 years ago
    • you can install the Kswim and use the templates from that for this also - SMal.tmcc 5 years ago
      • hey Smal.tmcc, do you mind if I hit you up on hangouts? - knuckle66 5 years ago
      • you can reach at my gmail listed in my profile - SMal.tmcc 5 years ago
      • ok so I figured it out, but I feel like this is more complicated than it needs to be. How do I make it so that it works like my current 32 bit installs? - knuckle66 5 years ago
      • let me create a new blog this week using the kswim templates to make it easier. You can use those images as templates and just add 2 midlevel tasks in place of the deploy one that is there. One to remap and the other to deploy.

        http://www.itninja.com/blog/view/kace-streaming-wim-toolkit-kswim - SMal.tmcc 5 years ago
      • http://www.itninja.com/blog/view/wim-storage-k2000-version-3-7-freeing-up-space-on-your-k2000-if-you-are-using-wims-and-speed-up-deployment-using-network-windows-shares - SMal.tmcc 5 years ago
  • So I followed this website to fix it and it worked. Does anyone see a problem with doing it this way? http://blogs.msdn.com/b/matthew_van_eerde/archive/2009/08/21/forcing-windows-to-install-on-a-single-partition.aspx - knuckle66 5 years ago
    • was the capture 2 parttions? - SMal.tmcc 5 years ago
      • I'm not sure, but I think it was. - knuckle66 5 years ago
      • that is what is sounds like and you probably did not capture the system partition. So you would need to do a repair like you mentioned above - SMal.tmcc 5 years ago
    • should work, The kswim templates include templates for 2 partition images also - SMal.tmcc 5 years ago
      • maybe once I get things really going I can mess with it. We haven't really been using Kace to image with but now we are finally moving that way. Because we still do not have dhcp setup yet I can't do a full scale deployment like I want to do. But we will get there. I already have 1 RSA setup and another ready to go. We just need dhcp. - knuckle66 5 years ago
      • I only use RSA's for MAC netboot images, I have 1 k2000 for 4k machines, we reimage 3k each year. This also made setting up dhcp for PXE much easier. Same settings on all subnets - SMal.tmcc 5 years ago
  • Hi I see this is pretty old ......3.7 and we will update after we change out a number of our older RSA's.
    My question would this work to automate the imaging with the use of the "Schedule to run later"? We image around 8000 computers but they are on different sub nets. - TimHR 4 years ago
This post is locked
 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ