Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
VirtualBox 3.1: Beginner's Guide

You're reading from   VirtualBox 3.1: Beginner's Guide Deploy and manage a cost-effective virtual environment using VirtualBox

Arrow left icon
Product type Paperback
Published in Apr 2010
Publisher Packt
ISBN-13 9781847199140
Length 348 pages
Edition 1st Edition
Arrow right icon
Authors (2):
Arrow left icon
Alfonso Vidal Romero Alfonso Vidal Romero
Author Profile Icon Alfonso Vidal Romero
Alfonso Vidal Romero
Alfonso Vidal Romero Elizondo Alfonso Vidal Romero Elizondo
Author Profile Icon Alfonso Vidal Romero Elizondo
Alfonso Vidal Romero Elizondo
Arrow right icon
View More author details
Toc

Table of Contents (16) Chapters Close

VirtualBox 3.1: Beginner's Guide
Credits
About the Author
About the Reviewer
Preface
1. Getting to Work with VirtualBox FREE CHAPTER 2. Creating Your First Virtual Machine: Ubuntu Linux 3. Creating Your Second Virtual Machine: Windows 7 4. Installing Guest Additions and Advanced Settings 5. Storing Data in VirtualBox 6. Networking with Virtual Machines 7. Using Virtual Appliances 8. Managing your Virtual Machines from a Remote Computer Using Snapshots Pop Quiz Answers Index

Time for action – saving the state of your Ubuntu virtual machine by taking a snapshot


In this exercise, I'll show you how to use the Snapshots feature to save the state of a Linux Ubuntu virtual machine by taking a snapshot, deleting some important system files so it can't boot anymore, and then reverting those changes back to the state before deleting those system files so it can boot again, like nothing ever happened!

  1. Start your UbuntuVB virtual machine and select Machine | Take Snapshot from the VirtualBox menu.

  2. The Take Snapshot of Virtual Machine dialog will show up. Type Before deleting bin folder in the Snapshot Name field, and This snapshot is to test if VirtualBox can revert the virtual machine back to the state before deleting the bin folder in the Snapshot Description field, as shown below:

  3. Click on OK to continue. VirtualBox will start to take the snapshot and the following dialog will show up during the process:

  4. Once VirtualBox finishes taking a snapshot of your Ubuntu virtual machine, open a terminal window (select Applications | Accessories | Terminal from the Ubuntu menu bar), type sudo rm –rf /bin to remove the bin folder from your Ubuntu virtual machine and hit Enter (if Ubuntu asks for the sudo password, type it so you can remove the folder):

  5. Type exit, and then press Enter to close the terminal window and restart your Ubuntu virtual machine.

  6. The Ubuntu virtual machine will not be able to restart and a System is restarting, please wait … message will show up, or it will hang indefinitely, depending on your Ubuntu guest version:

  7. Select Machine | Close from your virtual machine's main menu to continue.

  8. The Close Virtual Machine dialog will appear next. Select the Power off the machine option, enable the Restore current snapshot 'Before deleting bin folder' check box, and click on OK to shut down your virtual machine:

  9. Wait until VirtualBox finishes restoring the current snapshot. You'll be taken to the VirtualBox main screen. Select your UbuntuVB virtual machine and then select the Snapshots(1) tab from the right panel. The Before deleting bin folder line will appear between parenthesis to indicate your VM will start to the state it had before deleting the bin folder. Click on Start to continue.

  10. After a few seconds, VirtualBox will revert your virtual machine to the state before deleting the bin folder. Select Places | Computer from Ubuntu's main menu to continue.

  11. The Computer – File Browser window will open up. Double-click on the Filesystem icon to browse in your Ubuntu virtual machine's filesystem:

  12. Voila! As you can see in the following screenshot, the bin folder is intact:

  13. Close your UbuntuVB virtual machine for the next exercise.

What just happened?

Whew! I bet you got nervous during the last steps of the exercise, didn't you? How did you like that little magic trick with the snapshot? You can take a snapshot of your virtual machine right after a clean operating system installation and then do whatever you want with your virtual machine because if you don't like what you see, just go back to your saved snapshot and presto! I'm pretty sure your boss will knock his socks off if you dare to perform this little magic trick on his virtual machine! Too bad you can't use snapshots to revert some big mistakes in real life…

Have a go hero – using several Snapshots in your virtual machines

Practice taking several snapshots of your virtual machines, every time you install a new software application, for example. You can use snapshots as a backup solution for your virtual machine's data, too.

Pop quiz – using the folder sharing feature

  1. This morning your boss came crying to your office because some file he downloaded in his Windows XP virtual machine had a virus and now he can't start it up. You:

    1. Go to your boss's office, select the snapshot you took last night from his Windows virtual machine and his problem is solved.

    2. Tell him that all work is lost, that you'll need to delete his entire virtual machine and reinstall it again.

    3. Tell him to go and jump out of a bridge.

  2. Snapshots are useful when you need to:

    1. Enhance mouse pointer integration in your virtual machine.

    2. Install some experimental software and you don't want to lose important information in your virtual machine.

    3. 3D games on your Windows virtual machine.

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image