User Rating: 0 / 5

Star InactiveStar InactiveStar InactiveStar InactiveStar Inactive

When working with Imaging Toolkit, VMware can be a great help, as it allows you to take snapshots (so you can go back and repeat steps more easily), and comes with built-in network connectivity (which makes it easier when creating base images) and does not require any special drivers (again, this helps to keep the base image as "clean" as possible).

I'm going to talk about how to incorporate VMware into the process (and will also be of help when working on any new Imaging Toolkit project). Other virtualisation solutions can also be used, provided you follow the guidelines in this TID, but this TID specifically covers VMware.


I recommend that you use a virtual machine set to BIOS not UEFI - for two good reasons: if you create a base image on a UEFI machine, it can't then be used on a BIOS machine, and also, the later tip about snapshot would require a lot more work with UEFI! 

Creating your base image

Follow the Walkthrough to create an unattended install: this can be either by creating a WinPE ISO (which you can mount to your VMware machine) or you can use an ISO of the Windows Media, and a USB memory stick.

Which ever one you use, when you step through the Deployment Wizard, make sure you uncheck the option Automatically prepare machine for imaging after unattended installation. This will allow you to take a snapshot of a partially-complete base image (more about this later).

To use a memory stick, you need to attach it to your virtual machine, but if you try to do that after it boots, it will be too late, and the Windows Setup program will not see it. So...

  1. Create a VMware virtual machine, and configure it to use the Windows ISO as the CDROM drive.

  2. Power on the virtual machine - choose Boot to firmware or Boot to BIOS (you may wish to set the boot sequence now, so that the Network boot comes first, as this will make it easier to PXE boot later).

  3. Use VMware to attach the USB pen drive to the virtual machine, and select reboot from the firmware menu.

  4. Let the unattended install proceed as usual.

  5. At the end of the unattended install, take a snapshot, and label it something like "pre-sysprep" (this snapshot can be used to speed-up the process of recreating a new base image at some point in the future, so that you can include the updates that are "current" at that time).

  6. Launch c:\ztoolkit\zimageprep.exe - here you may choose to include all, or specific, Windows Updates.

  7. When the process concludes, you will see a messagebox prompting you to shutdown the machine, and to take an image. Click OK to shutdown the machine.

  8. Take another snapshot, and label it something like "post-sysprep". You will be able to use this snapshot as part of a scenario to allow you to test new projects (see later).

  9. Boot the virtual machine into PXE, and use zim to take an image (see the walkthrough).


Adding the VMware machine to the File Library

Follow ENGL TID-2011013: Installing VMware Tools during the build process, this will not only install the VMware tools during a build, but will allow you to create a driver image for VMware, which lets you treat it like any other machine (you cannot automatically add a machine to the images.ini file unless the machine has at least one driver file for the chosen Operating System, and zim will not allow you to deploy a build to a machine if it does not recognise the machine type from images.ini.


Adding a snapshot option to zim.zfg

Follow ENGL TID-2011005:How to use VMware snapshots with Zim and use this option with the snapshot "post-sysprep". You can revert to the snapshot, boot into PXE, and then choose the "snapshot" option when it appears in zim. This will save you time, as you do not need to download the base image when testing settings in a project.