ZCM 11 imaging megapost – part 1 (base image & sysprep)
March 6, 2013 5 Comments
As touched on a few posts earlier the primary challenge for the early part of 2013 has been to set up an automated Windows 7 imaging process using Novell ZENWorks 11 (single-base with layered add-ons for drivers, software etc). Initially I thought this would be fairly simple, having done something very similar with SCCM but after getting further into the detail I’ve found it’s more involved than first anticipated. Part of this is due to the fact we want to move from ZDM 7 to ZCM 11 as a clean break – no migration of previous content or device info… more on that in a minute. As there’s so much to write up I’ve decided to split the post into sections, probably 3 but will see how it goes 😉
So before I start delving into the technical detail let’s examine what I wanted to achieve:
- hardware-independent imaging of a variety of desktop PCs
- semi-automatic naming of machines based on their asset number and location
- automatic installation of management agents, antivirus software etc
- pre-installation of common software dependent on machine role (office \ classroom)
- keep technician interaction to a minimum (due to the large number of machines to be imaged)
- ensure control over the process at all times to ensure the right machines are imaged at the right time
- output status of the imaging tasks as each stage progresses
Layered image approach and sysprep
The order of the post is going to jump around a bit due to the way the solution has built up as we figured out each step but this seems as good a place as any to start. Currently XP uses one image per machine type, which for that OS is probably the best method. With Windows 7 this isn’t required and we can build from the ground up.
As a result the base image was built in a VMWare virtual machine, reason being that we can easily back-up and snapshot the machine along the way, making it easy to revert changes e.g. after sysprep. I’ve never been a fan of re-using a base image after it’s ran through a sysprep cycle and the VM method served me well last year so made sense to go that route again. For testing the base was a plain Windows 7 installation with only Google Chrome added on as a marker. The real thing will have Office installed as it goes out everywhere anyway and saves time vs waiting for it to install as an add-on.
The next step was to create a suitable sysprep unattend.xml file and run the capture. We used this very useful guide from Cool Solutions http://www.novell.com/communities/node/12320/windows-7-automated-imaging-and-zcm-registration so no point in repeating the content again as it’s pretty straightforward. A less easy to find but very useful set of documents are also worth reading for some background information on what each part of the sysprep file does…
If you read both guides you’ll notice the ATT lab runs the driver installation section (DPInst) as part of sysprep. I’ve avoided this and stuck with it as part of the Powershell script in the Cool Solutions method as it gives me more control over the output and also means I don’t have to edit the base image if I want to make changes later on. That aside the process is pretty consistent across both guides.
Once we have the base image we can then apply various add-on images to build up the overall package. I’ve used 5-6 add-on images for scripts, drivers and software then used ZCM bundles for everything else. Your mileage may vary depending on your specific needs.
Capturing your base image
Once you’re happy with your base image (.NET, Windows Updates etc) copy the unattend.xml file into the correct location (C:\Windows\System32\sysprep) and fire off the command line to run sysprep and shut down the machine so it’s ready for capture. Remember to snapshot before running sysprep so you can revert later on if you want to make any changes to the base!
Tip: when trying to run the capture CD in VMWare the vSphere Client had a nasty habit of disconnecting the ISO when the VM was reset. This caught me first time round as Windows booted up instead of booting from the capture CD, I wasn’t best pleased! The solution is a bit round-the-houses but has worked every time since:
- ensure you right-run and select Run as Administrator when launching the vSphere Client
- right-click your base VM > Edit Settings > Options > Boot Options
- set Power On Boot Delay to 10000 (milliseconds)
- when the VM boots it’ll sit on the POST screen for 10 seconds, in this time hit Esc to bring up a Boot Menu
- at this point mount your ZCM capture ISO (from your local HDD etc)
- use CTRL+ALT+INS to reboot the VM – this is important, don’t use Reset!
- press Esc again to get to the Boot Menu
- select CD-ROM drive from the menu
- the VM will now boot from CD
Tip 2: the ZCM capture CD ISO can be found by navigating to http://yourzcmserver/zenworks-setup then going to Imaging Tools and download \ run the file named something like novell-zenworks-zmgbootcd-188.8.131.5291.msi. The extracted ISO file can then be found in the C:\Novell\ZENWorks\bin\preboot folder
Tip 3: It’s best to install your management tools (Image Explorer, WAIK, Capture CD etc) on a 32-bit machine as x64 seems to throw a spanner in the works.
That’s enough for part 1, next post will cover creating add-on images, a spot of Powershell scripting and how to install the Novell Client & ZCM Agent silently as part of the image installation process