As PC users & developers, we are faced with situations where we want to save the current state of the operating system along with its applications. One such situation is when developers have to reproduce a bug in the system/application that is hard to recreate or that occurs only occasionally. The Snapshot feature in Hyper-V is a developer’s dream in this regard- capable of saving the current state of the OS and its applications. Later, a dev can choose to restore to the saved state as many times as possible to work on the hard-to-create OS/Application state.
PC users & developers can now play with installing different applications, tweaking some system settings, editing the registry and easily go back to the previous state of the OS with the cool snapshot feature.
Here are a few scenarios where snapshots are quite handy for Windows Embedded Standard 2011 Developers:
- Debug the failing OS Installation
This is not a tip for debugging itself, but helps save some time with debugging the failing OS installation. If the OS installation fails after the first reboot or during the OOBE phase, a significant amount of time has already been spent. Create a snapshot after the last successful reboot and try to debug the failure rather than installing the OS again and again to recreate the failure.
Play with Windows Embedded Standard 2011 Packages
- Launch Hyper-V
- Boot into WinPE image
- Install the Windows Embedded Standard 2011 Operating System with the required set of packages (IBW / Unattend Setup)
- Create a Snapshot for the current State of OS
- Install any application
- If the installation fails, use Dependency Walker, procmon, procexp or other tools to find the missing dependencies and corresponding package
- Use the DISM tool to install the package and restart the machine if needed
- Install the 3rd Party application again, and if installation succeeds, create a second snapshot to mark the new milestone
- If something strange happens recover to the previous state (with the saved snapshot)
- Debug an application which fails only at first launch after installation
There are some applications which show an error only the first time the application is launched after installation. This problem can be solved by uninstalling and reinstalling the application. If the application is huge or has settings spread all across the registry, uninstall – reinstall is not the recommended approach; Rather, snapshots are the easiest way to get to the failure point. Install the OS and install the application that has a failure. Create a snapshot first, then launch the application. If you lose track while debugging, you can easily get to the same state with the saved snapshot.
- Debug hard-to-create scenarios
Windows Embedded Standard 2009 developers may have faced hard-to-recreate bugs that take many hours to reproduce. . Snapshots provide a great solution for this situation. Once the reproduction happens, save the state of OS. Developers now have infinite number of chances to start debugging the problem from the same state.
- Save the special state of a database
Sometimes an application requires setting up a database server with test data. The application can then execute scripts on the test data or change the test data during the development cycle. By taking a snapshot of the database server after loading the initial test data, the test cycle can easily start testing with the original data. The same technique is also useful in advanced applications with a lot of configurations settings. It is recommended that you take a snapshot after successful configuration settings. This snapshot provides a handy backup if the application configuration fails in the future.
There are many scenarios where snapshots would be a good time saver, and all it takes to use this snapshot feature is just a click of a button in the toolbar. Hopefully we can save you time with Snapshots.