Home > Server Virtualization Tips > Managing virtual environments > Creating snapshots in Xen with Linux commands
Server Virtualization Tips:
EMAIL THIS
 TIPS & NEWSLETTERS TOPICS 

MANAGING VIRTUAL ENVIRONMENTS

Creating snapshots in Xen with Linux commands


Sander van Vugt
04.11.2008
Rating: -3.50- (out of 5)


Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   


A virtual machine snapshot is a great feature, freezing the current state of a virtual machine. Unfortunately, open source Xen doesn't offer support for snapshots -- but Linux does. Since open source Xen always uses Linux as its privileged domain, you can use Linux commands to create snapshots.

Byte-by-byte snapshot
One way of making snapshots in Xen is by using Linux dd after saving the current state of a virtual machine. This would involve the following steps:

The major disadvantage of this solution is time. The dd command makes a byte-by-byte copy of the virtual machine disk file and that can take an incredibly long time. Therefore, this option may not be very practical.

The LVM method
In Linux, the Logical Volume Manager (LVM) can also be used for creating a snapshot, one that takes significantly less time than the previous disk file method. This method implies that your virtual machine uses an LVM logical volume as its storage back-end, as opposed to using a virtual disk file. For this logical volum


Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   




e, you next need to create a snapshot. This snapshot is a kind of backup that contains metadata and blocks that have changed from the moment that you took the snapshot only. The trick is that when you use dd to make a copy of the snapshot via the metadata, you'll always make a snapshot of the original blocks on the original volume without the need to de-activate the original volume as well. By working this way, you can reduce the time it takes to create a snapshot of the virtual machine drastically. The procedure is as follows:

While no Linux distribution offers a solution in the open source Xen stack to create a virtual machine snapshot as of yet, you've read how you can do it anyway by using standard Linux tools such as LVM and dd.

About the author: Sander van Vugt is an author and independent technical trainer, specializing in Linux since 1994. Vugt is also a technical consultant for high availability (HA) clustering and performance optimization, as well as an expert on SUSE Linux Enterprise Desktop 10 (SLED 10) administration.


Rate this Tip
To rate tips, you must be a member of SearchServerVirtualization.com.
Register now to start rating these tips. Log in if you are already a member.




DISCLAIMER: Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.



Search More Tips on Virtual Implementation and Virtualization Platforms

Citrix - Application, Desktop and Server Virtualization Center

HomeNewsTopicsITKnowledge ExchangeTipsBlogsAsk the ExpertsMultimediaWhite PapersEvents
About Us  |  Contact Us  |  For Advertisers  |  For Business Partners  |  Site Index  |  RSS
SEARCH 
TechTarget provides technology professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective purchase decisions and managing their organizations' technology projects - with its network of technology-specific websites, events and online magazines.

TechTarget Corporate Web Site  |  Media Kits  |  Site Map




All Rights Reserved, Copyright 2006 - 2009, TechTarget | Read our Privacy Policy
  TechTarget - The IT Media ROI Experts