Back a while ago, I wrote a little article on virtualization and how it can be applied in both home and business environments. If you read over the article, you’ll see the many benefits of doing so. In particular, one of the main reason why I myself is using this technology is to test the many software (malicious or non-malicious) that I come across. In the article I mentioned about Sun’s VirtualBox application in which to install your guest operating system. What I failed to mention is its ability to take snapshots of your operating system’s current state and reverting back to them when your system is in trouble.
Snapshots
With virtual snapshots, it’s pretty much the same. The big difference is how much easier it is to create and restore the snapshots in a virtual environment compared to a real, physical system.
The Why’s
If you read my previous blog entries on backup, you should have a good idea as to why creating snapshots and images is so crucial and important. Many people like to think that creating them isn’t necessary in a home environment and is only ever used in the business world. Well, they couldn’t be any more wrong. While I’m not going to explain everything in detail, you can read over the previous article I’ve linked to if you want more information on computer images. Here, I’ll explain why it’s recommended to be creating snapshots in VirtualBox.
Creating a virtual machine with a guest operating system allows you to do many things and one of them is software testing. Once again, I’m not going to go into details about the benefits of virtualization. You can read my virtualization article linked in the beginning for more information. Testing software in a virtual environment allows us to monitor its behavior or in a more simple scenario, see if it breaks or conflicts with the system. If it doesn’t, then we’ll install it on our production machines. We can do all this without it affecting our host operating system so therefore, it’s relatively safe to do software testing in a virtualized environment. Now, one of the main concerns with doing so is the hassle of installing and uninstalling the software. For example, let’s say I first installed a Windows XP virtual machine using VirtualBox. I update and patch it, install only the necessary programs and then create a snapshot of it. Now let’s say I install a program in the virtual machine, however, after installation it’s giving me tons of error messages or tons of advertising popup messages. Clearly, this is most likely some type of spyware/adware program that I have just installed. Now, we could go into Control Panel and manually remove the program but the problem with this, contrary to many people’s belief, is that there can still be many remnants and traces of the program left in your registry and other folders on the hard drive. Therefore, you didn’t completely get rid of the program, only parts of it. This could come back to hunt you in the future, especially if what you’ve installed was a malicious program. Now because we have created a baseline snapshot *before* we installed the program, we can simply revert back to the snapshot and the virtual machine will never be the wiser that we tried to install a malicious program earlier. Your registry will be unaltered and those pesky folders won’t be there anymore. As you can see, this is very similar to how computer images work. To bring the point home, I will of course show you how to utilize this snapshot feature and you’ll be surprised at how easy it is to implement it! Basically, it requires only a couple of button clicks!
Utilizing Snapshots in VirtualBox
1. First things first, you need to configure your virtual machine operating system to a state where you’re comfortable returning into when you need to revert back. In my example, you could see my XP machine is pretty much barebones. I got updates installed, a antivirus product, Firefox and some data files. There is no right or wrong answer to how you setup your snapshot but keep in mind that if you already have malware and viruses in the system right now, the snapshots you create thereafter will also have those malware in them as well. Also, you are not limited to just one snapshot. You can create more down the road to suit your needs.
2. Once we have the system configured the way we want, it’s time to actually create the snapshot in VirtualBox. Select the Machine option drop-down menu at the top and select the Take Snapshot option.

3. Now you give your snapshot a name and a description. Remember, you can create more than one snapshot for a given virtual machine so if you don’t label them as you go along, it could be confusing when you do need to revert back in the future but not sure what’s the difference is with each snapshot! Once done, all you have to do is hit the OK button and just like that you have created your first snapshot!
4. Alright so now I’m going to PURPOSEFULLY install some type of adware on my system. This is to show you how the snapshot feature works in VirtualBox.
So as you can see in the above picture, I don’t want that on my virtual machine anymore so, I’m going to revert back to my snapshot created in step 3.
5. First I’m going to shutdown my current virtual machine. Then I’m going to open up VirtualBox, select my virtual machine and click on the Snapshots tab.
In it, you should see the snapshots you have created. In my case, I only have one titled Baseline XP Configuration, which I’ve created in step 3. Under your snapshots, you should also see the ‘Current State’ snapshot. If you have created more than one snapshot, you can view their description (if you have entered them) by selecting the snapshot and clicking on the Show Details button or by hitting Ctrl+Space. Once you have decided to revert back to a snapshot, simply select the Current State and hit the Revert to Current Snapshot button or hit Ctrl+Shift+R.
Simply start your virtual machine and that should be it! VirtualBox will do its thing and revert your system back. As you can see in the picture below, I no longer have the malware installed and the picture looks exactly like how it did in step 1. That means we have accomplished our goal by reverting the system back.
In the End…
As you can see, snapshots is a very powerful feature to have in a virtualized environment. With this, you can safely test software that is unknown to you to see if it has any side-effects or if it harms your computer or not. Once you are done doing whatever it is that needs to be done with that installed software, simply revert your virtual machine’s snapshot and you’re as good as new. I’m glad I forgot to mention this feature in my first virtualization article because it’s such an awesome feature that it deserves its own blog entry!
On a side note, I want to conclude by saying that VMware, the market leader today in virtualization technology, also has the snapshot feature in their VMware Workstation product. The VMware Workstation is similar to that of VirtualBox in that it allows us to create and manage our virtual machines. Obviously the VMware product has more features as it’s not a free product but one of the most important one, the ability to create snapshots, can also be done with the freely available VirtualBox! I strongly urge everyone interested to play around with this stuff because it can help you out a great deal.

The Ultimate PC Troubleshooting CD
Restricting Amount of Log On Hours Per Day
Mobilize your WordPress Blog in Minutes
Using F.lux to Better Work at Night
Kindle Fire In-Depth Review
Recent Comments
January 29, 2012
January 28, 2012
January 26, 2012
Archive
Category
Amazon Backups Blogging Book Highlight Browsers Computer Talk Did You Know? Emails Firefox Addon Freewares Google Group Policy Hard Drive Hardware Reviews Hardwares How-To iPhone Linux Malware Misc. Tips & Tricks Miscellaneous Multimedia Networking Online Service Productivity Security Troubleshooting Virtualization Window 7 Windows 8 WordPress
Advertisement
Support
quotes Simon likes