Issue
When testing in a VMware environment it is more efficient to revert to a snapshot of a base image than restore the entire image.
This TID details how to bypass restoration of the base image if the client machine is running within a virtual machine.
Requirements
- VMware Workstation
 
- Snapshot of base image
 
Solution
Zim will check to see if the machine is virtual and then prompt what restore type you would like to use.
Procedure
- 
Modify zim.cfg file
- Open the 
zim.cfg file with a text editor
 
- Update the 
zim.cfg file with the following information:
Find the section :If:Var,Ask_COMPUTERNAME,ne,"%COMPUTERNAME%"
Set:COMPUTERNAME,"%Ask_COMPUTERNAME%"
End:
Dialog:Ask,"", "Warning! All hard disk data on this machine will be erased.\n \nContinue?","_YesNo",red
If:Var,_ask,eq,"_No"
Menu:Return
End:
 Add the changes shown below in green text to the file:
If:Var,Ask_COMPUTERNAME,ne,"%COMPUTERNAME%"
Set:COMPUTERNAME,"%Ask_COMPUTERNAME%"
End:
; If machine is a VMWare machine - prompt for base image to restore (allows for snapshot workaround)
If:Var,lookup_section,contains,"vmw"
; Launch a Form to display detected hardware and select machine type
Form:Start,"vmware","Select Base image to use","_OkCancel^_Ok",Blue
Form:Item,"Item1",StaticText,"VMWare Machine detected"
Form:Item,"Item2",Label,"Select Base Image type  :"
Form:Item,"Item3",RadioButtons,"","Restore Image, Snapshot"
Form:Display,"vmware"
If:Var,_Form,Eq,"_Cancel"
Menu:Return
End:
If:var,_vmware_item3,eq,"Snapshot"
set:base_image,""
End:
End:
Dialog:Ask,"", "Warning! All hard disk data on this machine will be erased.\n \nContinue?","_YesNo",red
If:Var,_ask,eq,"_No"
Menu:Return
End:
 
- Save changes to 
zim.cfg and update file on the server.
 
 
- 
Configure VMware machine
 There are two options for configuring the VMware workstation 
- Create the base image on the VMware machine. Prior to creating your image on the server create a snapshot of the virtual machine
 
- Restore an existing base image to the VMware machine. Once this image has been restored create a snapshot of the virtual machine
 
 
- 
Test
- Revert to snapshot on virtual machine
 
- PXE boot virtual machine to ZENworks imaging/Zim environment
 
- Restore project as normal. You will see an additional prompt 
Select Base Image type: Restore Image, Snapshot
 Select Snapshot
 The base image will not restore, saving time (depending on the OS), however the normal project and driver files should restore as normal.
 
- Repeat process selecting 
Restore image. All images should restore as normal
 
- Repeat process on physical hardware, the virtual machine prompt should not appear