SlideShare a Scribd company logo
1 of 55
Virtual Machine Backup
on Citrix XenServer 5.5

       Thomas Krampe



                          1
Virtual Machine Backup
on Citrix XenServer 5.5

       Thomas Krampe



                          1
Overview

In some cases it might be very usefull to backup your virtual
machines running on a Citrix XenServer.




06/06/10               © 2010 Thomas Krampe
                                                           2
Overview

In some cases it might be very usefull to backup your virtual
machines running on a Citrix XenServer.


There are several ways of backing up virtual machines (VMs).

At a very high-level, there are two major categories for VM backups:




06/06/10                  © 2010 Thomas Krampe
                                                                  2
Overview

In some cases it might be very usefull to backup your virtual
machines running on a Citrix XenServer.


There are several ways of backing up virtual machines (VMs).

At a very high-level, there are two major categories for VM backups:




           Cold Backups                          Hot Backups


             Offline                               Online



06/06/10                  © 2010 Thomas Krampe
                                                                    2
Introduction

Offline and Online backups are supported in Citrix XenServer through
XenCenter as well as through scripting from the command-line
interface (CLI).

The primary focus of this presentation are scheduled hot backups,
whereby virtual machines can be backed up without incurring
downtime.




06/06/10                 © 2010 Thomas Krampe
                                                                3
Introduction

Offline and Online backups are supported in Citrix XenServer through
XenCenter as well as through scripting from the command-line
interface (CLI).

The primary focus of this presentation are scheduled hot backups,
whereby virtual machines can be backed up without incurring
downtime.




06/06/10                 © 2010 Thomas Krampe
                                                                3
What‘s in the Box

There are also a lot of commercial applications and solutions out
there for doing this job (some links for more information at the end).




06/06/10                  © 2010 Thomas Krampe
                                                                  4
What‘s in the Box

There are also a lot of commercial applications and solutions out
there for doing this job (some links for more information at the end).

But let‘s see what Citrix put in the box.




06/06/10                  © 2010 Thomas Krampe
                                                                  4
What‘s in the Box

There are also a lot of commercial applications and solutions out
there for doing this job (some links for more information at the end).

But let‘s see what Citrix put in the box.
 - Manual Exports through XenCenter and CLI
 - Manual snapshots through XenCenter and CLI
 - Scripted snapshots through XenAPI or CLI




06/06/10                  © 2010 Thomas Krampe
                                                                  4
What‘s in the Box

There are also a lot of commercial applications and solutions out
there for doing this job (some links for more information at the end).

But let‘s see what Citrix put in the box.
 - Manual Exports through XenCenter and CLI
 - Manual snapshots through XenCenter and CLI
 - Scripted snapshots through XenAPI or CLI




06/06/10                  © 2010 Thomas Krampe
                                                                  4
Scripted Snapshot

XenServer VM snapshots can be made very simple from either the
XenServer (remote) CLI or through a XenServer API call.


Snapshots created in this way can use the Citrix VSS provider for
Windows VMs, which results in an application-consistent snapshot.




06/06/10                © 2010 Thomas Krampe
                                                             5
Scripted Snapshot

XenServer VM snapshots can be made very simple from either the
XenServer (remote) CLI or through a XenServer API call.


Snapshots created in this way can use the Citrix VSS provider for
Windows VMs, which results in an application-consistent snapshot.

    Pros:
    • Fast
    • Requires minimum of storage space
    • Customizable to specific business needs

    Cons:
    • Requires additional knowledge of CLI or XenAPI
    • More complicated file-level restoration




06/06/10                      © 2010 Thomas Krampe
                                                                     5
Script Placement

There are two possible locations where we can execute our scripts.




06/06/10                  © 2010 Thomas Krampe
                                                                 6
Script Placement

There are two possible locations where we can execute our scripts.

  1. On the Administrator Workstation

      - Windows Workstation with installed XenCenter
      - VB Script for the logic
      - Scheduled Tasks for automation




06/06/10                   © 2010 Thomas Krampe
                                                                 6
Script Placement

There are two possible locations where we can execute our scripts.

  1. On the Administrator Workstation

      - Windows Workstation with installed XenCenter
      - VB Script for the logic
      - Scheduled Tasks for automation


  2. On the XenServer

      - XenServer Domain0
      - Shell or Python Scripts for the logic
      - Linux cron for automation




06/06/10                     © 2010 Thomas Krampe
                                                                 6
Visual Basic Scripts

Advantages

  - Running on Windows
  - Use Visual Basic Script which is easy to use
  - Can create backups in the local files system of the Workstation


Disadvantages

  - Workstation has to be „always on“
  - Network connection to Xenserver and maybe Storage required




06/06/10                  © 2010 Thomas Krampe
                                                                     7
Shell or Python Scripts

Advantages

  -   Running on Domain0 Linux
  -   Very reliably with cron
  -   Server is in most cases „always on“
  -   Network connection to Storage is always there


Disadvantages

  - Linux and Bash or Python knowledge required
  - External Storage mandatory required
  - Need Dom0 ressources while running




06/06/10                    © 2010 Thomas Krampe
                                                                  8
Preparation

Before we can start we have to install an important piece of Software
on our virtual machines running Microsoft Windows.

To perform quiesced snapshots using Microsoft Volume Shadow Copy
Service we have to install the XenServer VSS Provider first.

Citrix provide us this piece of Software in the folder in which the
XenTools are installed, normaly under %SystemDrive%%Program
Files%CitrixXenTools. Just execute the batch script install-
XenProvider.cmd.




06/06/10                  © 2010 Thomas Krampe
                                                                 9
Preparation

Before we can start we have to install an important piece of Software
on our virtual machines running Microsoft Windows.

To perform quiesced snapshots using Microsoft Volume Shadow Copy
Service we have to install the XenServer VSS Provider first.

Citrix provide us this piece of Software in the folder in which the
XenTools are installed, normaly under %SystemDrive%%Program
Files%CitrixXenTools. Just execute the batch script install-
XenProvider.cmd.


           If you uninstall the XenTools quiesced Snapshots are not longer
           available. After re-installing XenTools you have to install the
           XenServer VSS Provider again. For an uninstall of the VSS
           Provider simply execute the uninstall-XenProvider.cmd.



06/06/10                    © 2010 Thomas Krampe
                                                                         9
Preparation

If we use a Windows VM to create snapshots we have to keep in mind
that, by default VMs only have access to their own snapshots.




06/06/10                 © 2010 Thomas Krampe
                                                             10
Preparation

If we use a Windows VM to create snapshots we have to keep in mind
that, by default VMs only have access to their own snapshots.


XenServer does a security check to prevent a VM from importing
another VMs disk without authority. Because in this scenario the VM
must have access to the snapshots of other VMs, we need to modify
the following parameter:




06/06/10                 © 2010 Thomas Krampe
                                                              10
Preparation

If we use a Windows VM to create snapshots we have to keep in mind
that, by default VMs only have access to their own snapshots.


XenServer does a security check to prevent a VM from importing
another VMs disk without authority. Because in this scenario the VM
must have access to the snapshots of other VMs, we need to modify
the following parameter:



xe vm-param-set other-config:snapmanager=true uuid=<uuid of VM used for backup>




06/06/10                      © 2010 Thomas Krampe
                                                                          10
How to create a manual backup using XenCenter

Before we start scripting, just a small look on how we can do this
manually.

To create a snapshot in XenCenter just select the VM and go to the
Snapshot Tab. Now click the „Take Snapshot“ Button.




06/06/10                  © 2010 Thomas Krampe
                                                                11
How to create a manual backup using the CLI

Create Snapshot with quiesce
   xe vm-snapshot-with-quiesce vm=<VM UUID> new-name-label=Backup

Create Snapshot without quiesce (normal snapshot)
   xe vm-snapshot vm=<VM UUID> new-name-label=Backup

Remove the Template flag from the snapshot
   xe template-param-set is-a-template=false uuid=<SNAPSHOT UUID>

Export the snapshot to backup share
   xe vm-export uuid=<SNAPSHOT UUID> filename=<SHARE/file.xva>

Delete Snapshot from XenServer Host to safe space on SR
   xe vm-uninstall uuid=<SNAPSHOT UUID> force=true


06/06/10                  © 2010 Thomas Krampe
                                                                 12
Backup automation

Manual backups work great, but we want an scheduled, automated
live VM backup. Before start coding, let‘s take a look at the features
the script should have in addition.




06/06/10                  © 2010 Thomas Krampe
                                                                 13
Backup automation

Manual backups work great, but we want an scheduled, automated
live VM backup. Before start coding, let‘s take a look at the features
the script should have in addition.




06/06/10                  © 2010 Thomas Krampe
                                                                 13
Backup automation

Manual backups work great, but we want an scheduled, automated
live VM backup. Before start coding, let‘s take a look at the features
the script should have in addition.



1. External source for VM‘s to backup
2. Quiesced Snapshots (if possible) otherwise normal
3. Logging capabilities
4. External storage mount / dismount
5. Export snapshots to a network share
6. Clean up used Storage repository



06/06/10                  © 2010 Thomas Krampe
                                                                 13
What to do?

I don‘t want to reinvent the wheel, so I found three great community
created scripts.




06/06/10                 © 2010 Thomas Krampe
                                                               14
What to do?

I don‘t want to reinvent the wheel, so I found three great community
created scripts.




Example 1: Visual Basic Script
Example 2: Bash Shell Script
Example 3: Python Shell Script




06/06/10                  © 2010 Thomas Krampe
                                                               14
Example 1: Visual Basic Script

The first script I found comes from Jeff Riechers and is based on
Visual Basic Script. The script is published in the Citrix Community
Forum.


http://forums.citrix.com/thread.jspa?threadID=250128&tstart=0


The script is very good documented and supports quiesced snapshots
if possible, 64bit Windows and is configureable with parameters.
Make sure that you read the full thread, there are a lot of usefull hints
inside.




06/06/10                   © 2010 Thomas Krampe
                                                                    15
Example 2: Bash Shell Script

The second script comes from Andy Burton and is a bash shell script.
You can find this usefull script on the following website:


http://www.andy-burton.co.uk/blog/


The script is also very good documented and supports quiesced
snapshots if possible and is configureable with a configuration file.
You find a lot of enhancements like mounting / dismounting CIFS
shares and clearing old backups.




06/06/10                 © 2010 Thomas Krampe
                                                               16
Example 3: Python Script

The third script comes from David McArthur and is a Python script.
You can find this script on the following website:


http://community.citrix.com/display/xs/Zero-Downtime+Limited-Space+Backup



The python API is used to gather metadata about the VM, its disks,
and its network interfaces. The metadata is written to plain text
files. To restore, a new VM is created and given the memory and CPUs
settings stored in the metadata.  Then the VIF and disks are restored
with the stored images being written to the new lvm volumes.

Currently, Windows servers are not supported in this version, only
Linux VMs and the XenServer instance, itself.



06/06/10                      © 2010 Thomas Krampe
                                                                            17
My Results




06/06/10   © 2010 Thomas Krampe
                                         18
My Results

All of these three example scripts do their job as expected.




06/06/10                   © 2010 Thomas Krampe
                                                               18
My Results

All of these three example scripts do their job as expected.

1. VB Script
    In my opinion the best way to create backups. If we install a
    virtual Windows machine as a backup appliance with XenCenter
    we can avoid the disadvantages (always on etc.)




06/06/10                   © 2010 Thomas Krampe
                                                               18
My Results

All of these three example scripts do their job as expected.

1. VB Script
    In my opinion the best way to create backups. If we install a
    virtual Windows machine as a backup appliance with XenCenter
    we can avoid the disadvantages (always on etc.)


2. Bash Script
    A very good script with many space for improvements. But scripts
    running in the Dom0 Linux are in my opinion not a good idea.




06/06/10                   © 2010 Thomas Krampe
                                                                18
My Results

All of these three example scripts do their job as expected.

1. VB Script
    In my opinion the best way to create backups. If we install a
    virtual Windows machine as a backup appliance with XenCenter
    we can avoid the disadvantages (always on etc.)


2. Bash Script
    A very good script with many space for improvements. But scripts
    running in the Dom0 Linux are in my opinion not a good idea.

3. Python Script
    Good script but currently no support for Windows VM‘s


06/06/10                   © 2010 Thomas Krampe
                                                                18
Restore




06/06/10   © 2010 Thomas Krampe
                                      19
Restore

Backup is only the first part of the job. Some
times it‘s maybe very usefull to have also
the capabilities to restore a backup if the
original virtual machine is broken.




06/06/10                  © 2010 Thomas Krampe
                                                     19
Restore

Backup is only the first part of the job. Some
times it‘s maybe very usefull to have also
the capabilities to restore a backup if the
original virtual machine is broken.



All backup scripts as well as the manual way with XenCenter or CLI
creates a simple .xva file which can easy re-import.




06/06/10                  © 2010 Thomas Krampe
                                                                 19
Restore

Backup is only the first part of the job. Some
times it‘s maybe very usefull to have also
the capabilities to restore a backup if the
original virtual machine is broken.



All backup scripts as well as the manual way with XenCenter or CLI
creates a simple .xva file which can easy re-import.


In most cases this re-import is being enough. But for a correct
restore you need also a backup of the virtual machine meta data
(MAC-Address or VCPU Settings for example).




06/06/10                  © 2010 Thomas Krampe
                                                                 19
Restore Example




06/06/10   © 2010 Thomas Krampe
                                              20
Restore Example

Before perfoming a restore it‘s a good idea to uninstall the broken
machine first.

xe vm-uninstall uuid=<VM UUID> force=true


Then cleanup the Storage repository.

coalesce-leaf -u <VM UUID>

And restore the virtual machine.

xe vm-import filename=<BACKUP.XVA> preserve=true
If preserve is set to true, the MAC address of the original VM will be preserved.




06/06/10                       © 2010 Thomas Krampe
                                                                              20
Enhancements

Here are some tips for enhancements.




06/06/10                 © 2010 Thomas Krampe
                                                         21
Enhancements

Here are some tips for enhancements.

1. Backup VM meta data
2. Check backup share first (free space, availability)
3. Cleanup backup share (old backups)
4. Create useful log files
5. Notfications (E-Mail, SMS)
           .
           .
           .

x. Your ideas for improvements



06/06/10                    © 2010 Thomas Krampe
                                                             21
What‘s new in 5.6

Live Memory Snapshot and Rollback
    - XenCenter support for live VM snapshot and revert
    - One-click Revert
    - Snapshot branches




06/06/10                   © 2010 Thomas Krampe
                                                               22
What‘s new in 5.6

New snapshot with memory feature
      In addition to saving the VMs memory (storage) and
      metadata, snapshots with memory also save the VMs state
      (RAM).


xe vm-checkpoint vm=<VM UUID> new-name-label=<NAME>




06/06/10                   © 2010 Thomas Krampe
                                                                23
What‘s new in 5.6

New snapshot with memory feature
      In addition to saving the VMs memory (storage) and
      metadata, snapshots with memory also save the VMs state
      (RAM).


xe vm-checkpoint vm=<VM UUID> new-name-label=<NAME>


During the checkpoint creation process, the VM is paused for a brief
period of time, and cannot be used during this period.




06/06/10                   © 2010 Thomas Krampe
                                                                 23
Commercial Products




06/06/10   © 2010 Thomas Krampe
Commercial Products

If you don‘t have time or fun for scripting and in addition have
unlimited budget, here are some commercial products.

QuorumSoft Alike
http://quorumsoft.com



                    PHD Virtual Backup for Citrix XenServer
                    http://www.phdvirtual.com


Symantec Backup Exec System Recovery Server Edition
http://www.symantec.com/de/de/business/backup-
exec-system-recovery-server-edition



06/06/10                 © 2010 Thomas Krampe
                                                                24
Contact Informations

For questions / suggestions after the Pubforum:

              thomas.krampe@visionapp.de
More informations online:

                     www.thomas-krampe.com
    in german only




Slides are available after the Pubforum at:




06/06/10                    © 2010 Thomas Krampe
                                                                   25
Questions




06/06/10   © 2010 Thomas Krampe
                                        26
Questions




06/06/10   © 2010 Thomas Krampe
                                        26
Questions




             Cheers




06/06/10   © 2010 Thomas Krampe
                                        26

More Related Content

What's hot

XenServer, Hyper-V, and ESXi - Architecture, API, and Coding
XenServer, Hyper-V, and ESXi -  Architecture, API, and CodingXenServer, Hyper-V, and ESXi -  Architecture, API, and Coding
XenServer, Hyper-V, and ESXi - Architecture, API, and Coding_Humair_Ahmed_
 
Секреты виртуализации - Windows Server 2012 Hyper-V
Секреты виртуализации - Windows Server 2012 Hyper-VСекреты виртуализации - Windows Server 2012 Hyper-V
Секреты виртуализации - Windows Server 2012 Hyper-VВиталий Стародубцев
 
Hyper-V Best Practices & Tips and Tricks
Hyper-V Best Practices & Tips and TricksHyper-V Best Practices & Tips and Tricks
Hyper-V Best Practices & Tips and TricksAmit Gatenyo
 
VMware Advance Troubleshooting Workshop - Day 4
VMware Advance Troubleshooting Workshop - Day 4VMware Advance Troubleshooting Workshop - Day 4
VMware Advance Troubleshooting Workshop - Day 4Vepsun Technologies
 
Windows Server "10": что нового в кластеризации
Windows Server "10": что нового в кластеризацииWindows Server "10": что нового в кластеризации
Windows Server "10": что нового в кластеризацииВиталий Стародубцев
 
Scaling Xen within Rackspace Cloud Servers
Scaling Xen within Rackspace Cloud ServersScaling Xen within Rackspace Cloud Servers
Scaling Xen within Rackspace Cloud ServersThe Linux Foundation
 
Visão geral sobre Citrix XenServer 6 - Ferramentas e Licenciamento
Visão geral sobre Citrix XenServer 6 - Ferramentas e LicenciamentoVisão geral sobre Citrix XenServer 6 - Ferramentas e Licenciamento
Visão geral sobre Citrix XenServer 6 - Ferramentas e LicenciamentoLorscheider Santiago
 
How to Optimize Microsoft Hyper-V Failover Cluster and Double Performance
How to Optimize Microsoft Hyper-V Failover Cluster and Double PerformanceHow to Optimize Microsoft Hyper-V Failover Cluster and Double Performance
How to Optimize Microsoft Hyper-V Failover Cluster and Double PerformanceStarWind Software
 
Hyper-V vs. vSphere: Understanding the Differences
Hyper-V vs. vSphere: Understanding the DifferencesHyper-V vs. vSphere: Understanding the Differences
Hyper-V vs. vSphere: Understanding the DifferencesSolarWinds
 
VMware Performance Troubleshooting
VMware Performance TroubleshootingVMware Performance Troubleshooting
VMware Performance Troubleshootingglbsolutions
 
Diretrizes para Implementação do Citrix XenServer 6.2.0 em Servidores HP Prol...
Diretrizes para Implementação do Citrix XenServer 6.2.0 em Servidores HP Prol...Diretrizes para Implementação do Citrix XenServer 6.2.0 em Servidores HP Prol...
Diretrizes para Implementação do Citrix XenServer 6.2.0 em Servidores HP Prol...Lorscheider Santiago
 
Esxi troubleshooting
Esxi troubleshootingEsxi troubleshooting
Esxi troubleshootingOvi Chis
 
VMware vSphere Performance Troubleshooting
VMware vSphere Performance TroubleshootingVMware vSphere Performance Troubleshooting
VMware vSphere Performance TroubleshootingDan Brinkmann
 
Upgrading to VMware vSphere 6.0
Upgrading to VMware vSphere 6.0Upgrading to VMware vSphere 6.0
Upgrading to VMware vSphere 6.0Tim Carman
 
Xen and the art of embedded virtualization (ELC 2017)
Xen and the art of embedded virtualization (ELC 2017)Xen and the art of embedded virtualization (ELC 2017)
Xen and the art of embedded virtualization (ELC 2017)Stefano Stabellini
 
Xen, XenServer, and XAPI: What’s the Difference?-XPUS13 Bulpin,Pavlicek
Xen, XenServer, and XAPI: What’s the Difference?-XPUS13 Bulpin,PavlicekXen, XenServer, and XAPI: What’s the Difference?-XPUS13 Bulpin,Pavlicek
Xen, XenServer, and XAPI: What’s the Difference?-XPUS13 Bulpin,PavlicekThe Linux Foundation
 
VMware Advance Troubleshooting Workshop - Day 5
VMware Advance Troubleshooting Workshop - Day 5VMware Advance Troubleshooting Workshop - Day 5
VMware Advance Troubleshooting Workshop - Day 5Vepsun Technologies
 

What's hot (20)

XenServer, Hyper-V, and ESXi - Architecture, API, and Coding
XenServer, Hyper-V, and ESXi -  Architecture, API, and CodingXenServer, Hyper-V, and ESXi -  Architecture, API, and Coding
XenServer, Hyper-V, and ESXi - Architecture, API, and Coding
 
Секреты виртуализации - Windows Server 2012 Hyper-V
Секреты виртуализации - Windows Server 2012 Hyper-VСекреты виртуализации - Windows Server 2012 Hyper-V
Секреты виртуализации - Windows Server 2012 Hyper-V
 
Hyper-V Best Practices & Tips and Tricks
Hyper-V Best Practices & Tips and TricksHyper-V Best Practices & Tips and Tricks
Hyper-V Best Practices & Tips and Tricks
 
VMware Advance Troubleshooting Workshop - Day 4
VMware Advance Troubleshooting Workshop - Day 4VMware Advance Troubleshooting Workshop - Day 4
VMware Advance Troubleshooting Workshop - Day 4
 
Windows Server "10": что нового в кластеризации
Windows Server "10": что нового в кластеризацииWindows Server "10": что нового в кластеризации
Windows Server "10": что нового в кластеризации
 
Scaling Xen within Rackspace Cloud Servers
Scaling Xen within Rackspace Cloud ServersScaling Xen within Rackspace Cloud Servers
Scaling Xen within Rackspace Cloud Servers
 
Visão geral sobre Citrix XenServer 6 - Ferramentas e Licenciamento
Visão geral sobre Citrix XenServer 6 - Ferramentas e LicenciamentoVisão geral sobre Citrix XenServer 6 - Ferramentas e Licenciamento
Visão geral sobre Citrix XenServer 6 - Ferramentas e Licenciamento
 
How to Optimize Microsoft Hyper-V Failover Cluster and Double Performance
How to Optimize Microsoft Hyper-V Failover Cluster and Double PerformanceHow to Optimize Microsoft Hyper-V Failover Cluster and Double Performance
How to Optimize Microsoft Hyper-V Failover Cluster and Double Performance
 
Hyper-V vs. vSphere: Understanding the Differences
Hyper-V vs. vSphere: Understanding the DifferencesHyper-V vs. vSphere: Understanding the Differences
Hyper-V vs. vSphere: Understanding the Differences
 
Why xen slides
Why xen slidesWhy xen slides
Why xen slides
 
vSphere
vSpherevSphere
vSphere
 
VMware Performance Troubleshooting
VMware Performance TroubleshootingVMware Performance Troubleshooting
VMware Performance Troubleshooting
 
Diretrizes para Implementação do Citrix XenServer 6.2.0 em Servidores HP Prol...
Diretrizes para Implementação do Citrix XenServer 6.2.0 em Servidores HP Prol...Diretrizes para Implementação do Citrix XenServer 6.2.0 em Servidores HP Prol...
Diretrizes para Implementação do Citrix XenServer 6.2.0 em Servidores HP Prol...
 
Esxi troubleshooting
Esxi troubleshootingEsxi troubleshooting
Esxi troubleshooting
 
VMware vSphere Performance Troubleshooting
VMware vSphere Performance TroubleshootingVMware vSphere Performance Troubleshooting
VMware vSphere Performance Troubleshooting
 
Upgrading to VMware vSphere 6.0
Upgrading to VMware vSphere 6.0Upgrading to VMware vSphere 6.0
Upgrading to VMware vSphere 6.0
 
Xen and the art of embedded virtualization (ELC 2017)
Xen and the art of embedded virtualization (ELC 2017)Xen and the art of embedded virtualization (ELC 2017)
Xen and the art of embedded virtualization (ELC 2017)
 
Xen, XenServer, and XAPI: What’s the Difference?-XPUS13 Bulpin,Pavlicek
Xen, XenServer, and XAPI: What’s the Difference?-XPUS13 Bulpin,PavlicekXen, XenServer, and XAPI: What’s the Difference?-XPUS13 Bulpin,Pavlicek
Xen, XenServer, and XAPI: What’s the Difference?-XPUS13 Bulpin,Pavlicek
 
Ian Pratt Nsdi Keynote Apr2008
Ian Pratt Nsdi Keynote Apr2008Ian Pratt Nsdi Keynote Apr2008
Ian Pratt Nsdi Keynote Apr2008
 
VMware Advance Troubleshooting Workshop - Day 5
VMware Advance Troubleshooting Workshop - Day 5VMware Advance Troubleshooting Workshop - Day 5
VMware Advance Troubleshooting Workshop - Day 5
 

Similar to Backup virtual machines with XenServer 5.x

20090911 virtualizationandcloud
20090911 virtualizationandcloud20090911 virtualizationandcloud
20090911 virtualizationandcloudSupratik Ghatak
 
20090911 virtualizationandcloud
20090911 virtualizationandcloud20090911 virtualizationandcloud
20090911 virtualizationandcloudMeenal Joshi
 
virtualization and cloud
virtualization and cloudvirtualization and cloud
virtualization and cloudsankarimsc
 
Run windows vm on bluemix
Run windows vm on bluemixRun windows vm on bluemix
Run windows vm on bluemixJoseph Chang
 
SYN 219 Getting Up Close and Personal With MCS and PVS
SYN 219  Getting Up Close and Personal With MCS and PVS SYN 219  Getting Up Close and Personal With MCS and PVS
SYN 219 Getting Up Close and Personal With MCS and PVS Citrix
 
Using the tivoli storage manager hsm client for windows redp4126
Using the tivoli storage manager hsm client for windows redp4126Using the tivoli storage manager hsm client for windows redp4126
Using the tivoli storage manager hsm client for windows redp4126Banking at Ho Chi Minh city
 
Private Cloud Academy: Backup and DPM 2010
Private Cloud Academy: Backup and DPM 2010Private Cloud Academy: Backup and DPM 2010
Private Cloud Academy: Backup and DPM 2010Aidan Finn
 
Fulcrum Group Virtualization How does It Fit
Fulcrum Group Virtualization How does It FitFulcrum Group Virtualization How does It Fit
Fulcrum Group Virtualization How does It FitSteve Meek
 
SYN 103: Learn What’s New with XenServer
SYN 103: Learn What’s New with XenServerSYN 103: Learn What’s New with XenServer
SYN 103: Learn What’s New with XenServerCitrix
 
Presentation citrix xen desktopxenapp 7.6 - technical update
Presentation   citrix xen desktopxenapp 7.6 - technical updatePresentation   citrix xen desktopxenapp 7.6 - technical update
Presentation citrix xen desktopxenapp 7.6 - technical updatexKinAnx
 
Citrix Portfolio Updates
Citrix Portfolio UpdatesCitrix Portfolio Updates
Citrix Portfolio UpdatesPawel Serwan
 
Open Mic - IBM Sametime Proxy Clustering
Open Mic - IBM Sametime Proxy ClusteringOpen Mic - IBM Sametime Proxy Clustering
Open Mic - IBM Sametime Proxy Clusteringjayeshpar2006
 
Presentation integration vmware with emc storage
Presentation   integration vmware with emc storagePresentation   integration vmware with emc storage
Presentation integration vmware with emc storagesolarisyourep
 
WIndows 7 Migration tools for Nashville AITP
WIndows 7 Migration tools for Nashville AITPWIndows 7 Migration tools for Nashville AITP
WIndows 7 Migration tools for Nashville AITPDavid Strom
 
20090911 virtualizationandcloud
20090911 virtualizationandcloud20090911 virtualizationandcloud
20090911 virtualizationandcloudDebabrata Debnath
 
XenServer 5.5 - Czy można zaoszczędzić na wirtualizacji serwerów? Darmowy Xen...
XenServer 5.5 - Czy można zaoszczędzić na wirtualizacji serwerów? Darmowy Xen...XenServer 5.5 - Czy można zaoszczędzić na wirtualizacji serwerów? Darmowy Xen...
XenServer 5.5 - Czy można zaoszczędzić na wirtualizacji serwerów? Darmowy Xen...Peter Ocasek
 
Build Once, Deliver Anywhere, No Objective C Required
Build Once, Deliver Anywhere, No Objective C RequiredBuild Once, Deliver Anywhere, No Objective C Required
Build Once, Deliver Anywhere, No Objective C Requiredchrisfleck
 
Jump Start your XenApp 7.5 Deployment
Jump Start your XenApp 7.5 DeploymentJump Start your XenApp 7.5 Deployment
Jump Start your XenApp 7.5 DeploymentDavid McGeough
 
XenDesktop Master Class - Live Installation of XenDesktop/XenApp 7.6
XenDesktop Master Class - Live Installation of XenDesktop/XenApp 7.6XenDesktop Master Class - Live Installation of XenDesktop/XenApp 7.6
XenDesktop Master Class - Live Installation of XenDesktop/XenApp 7.6Lee Bushen
 

Similar to Backup virtual machines with XenServer 5.x (20)

20090911 virtualizationandcloud
20090911 virtualizationandcloud20090911 virtualizationandcloud
20090911 virtualizationandcloud
 
20090911 virtualizationandcloud
20090911 virtualizationandcloud20090911 virtualizationandcloud
20090911 virtualizationandcloud
 
virtualization and cloud
virtualization and cloudvirtualization and cloud
virtualization and cloud
 
Run windows vm on bluemix
Run windows vm on bluemixRun windows vm on bluemix
Run windows vm on bluemix
 
SYN 219 Getting Up Close and Personal With MCS and PVS
SYN 219  Getting Up Close and Personal With MCS and PVS SYN 219  Getting Up Close and Personal With MCS and PVS
SYN 219 Getting Up Close and Personal With MCS and PVS
 
Using the tivoli storage manager hsm client for windows redp4126
Using the tivoli storage manager hsm client for windows redp4126Using the tivoli storage manager hsm client for windows redp4126
Using the tivoli storage manager hsm client for windows redp4126
 
Private Cloud Academy: Backup and DPM 2010
Private Cloud Academy: Backup and DPM 2010Private Cloud Academy: Backup and DPM 2010
Private Cloud Academy: Backup and DPM 2010
 
Fulcrum Group Virtualization How does It Fit
Fulcrum Group Virtualization How does It FitFulcrum Group Virtualization How does It Fit
Fulcrum Group Virtualization How does It Fit
 
SYN 103: Learn What’s New with XenServer
SYN 103: Learn What’s New with XenServerSYN 103: Learn What’s New with XenServer
SYN 103: Learn What’s New with XenServer
 
Lecture 1.pptx
Lecture 1.pptxLecture 1.pptx
Lecture 1.pptx
 
Presentation citrix xen desktopxenapp 7.6 - technical update
Presentation   citrix xen desktopxenapp 7.6 - technical updatePresentation   citrix xen desktopxenapp 7.6 - technical update
Presentation citrix xen desktopxenapp 7.6 - technical update
 
Citrix Portfolio Updates
Citrix Portfolio UpdatesCitrix Portfolio Updates
Citrix Portfolio Updates
 
Open Mic - IBM Sametime Proxy Clustering
Open Mic - IBM Sametime Proxy ClusteringOpen Mic - IBM Sametime Proxy Clustering
Open Mic - IBM Sametime Proxy Clustering
 
Presentation integration vmware with emc storage
Presentation   integration vmware with emc storagePresentation   integration vmware with emc storage
Presentation integration vmware with emc storage
 
WIndows 7 Migration tools for Nashville AITP
WIndows 7 Migration tools for Nashville AITPWIndows 7 Migration tools for Nashville AITP
WIndows 7 Migration tools for Nashville AITP
 
20090911 virtualizationandcloud
20090911 virtualizationandcloud20090911 virtualizationandcloud
20090911 virtualizationandcloud
 
XenServer 5.5 - Czy można zaoszczędzić na wirtualizacji serwerów? Darmowy Xen...
XenServer 5.5 - Czy można zaoszczędzić na wirtualizacji serwerów? Darmowy Xen...XenServer 5.5 - Czy można zaoszczędzić na wirtualizacji serwerów? Darmowy Xen...
XenServer 5.5 - Czy można zaoszczędzić na wirtualizacji serwerów? Darmowy Xen...
 
Build Once, Deliver Anywhere, No Objective C Required
Build Once, Deliver Anywhere, No Objective C RequiredBuild Once, Deliver Anywhere, No Objective C Required
Build Once, Deliver Anywhere, No Objective C Required
 
Jump Start your XenApp 7.5 Deployment
Jump Start your XenApp 7.5 DeploymentJump Start your XenApp 7.5 Deployment
Jump Start your XenApp 7.5 Deployment
 
XenDesktop Master Class - Live Installation of XenDesktop/XenApp 7.6
XenDesktop Master Class - Live Installation of XenDesktop/XenApp 7.6XenDesktop Master Class - Live Installation of XenDesktop/XenApp 7.6
XenDesktop Master Class - Live Installation of XenDesktop/XenApp 7.6
 

Recently uploaded

Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clashcharlottematthew16
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Wonjun Hwang
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfRankYa
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piececharlottematthew16
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 

Recently uploaded (20)

Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clash
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdf
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piece
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 

Backup virtual machines with XenServer 5.x

  • 1. Virtual Machine Backup on Citrix XenServer 5.5 Thomas Krampe 1
  • 2. Virtual Machine Backup on Citrix XenServer 5.5 Thomas Krampe 1
  • 3. Overview In some cases it might be very usefull to backup your virtual machines running on a Citrix XenServer. 06/06/10 © 2010 Thomas Krampe 2
  • 4. Overview In some cases it might be very usefull to backup your virtual machines running on a Citrix XenServer. There are several ways of backing up virtual machines (VMs). At a very high-level, there are two major categories for VM backups: 06/06/10 © 2010 Thomas Krampe 2
  • 5. Overview In some cases it might be very usefull to backup your virtual machines running on a Citrix XenServer. There are several ways of backing up virtual machines (VMs). At a very high-level, there are two major categories for VM backups: Cold Backups Hot Backups Offline Online 06/06/10 © 2010 Thomas Krampe 2
  • 6. Introduction Offline and Online backups are supported in Citrix XenServer through XenCenter as well as through scripting from the command-line interface (CLI). The primary focus of this presentation are scheduled hot backups, whereby virtual machines can be backed up without incurring downtime. 06/06/10 © 2010 Thomas Krampe 3
  • 7. Introduction Offline and Online backups are supported in Citrix XenServer through XenCenter as well as through scripting from the command-line interface (CLI). The primary focus of this presentation are scheduled hot backups, whereby virtual machines can be backed up without incurring downtime. 06/06/10 © 2010 Thomas Krampe 3
  • 8. What‘s in the Box There are also a lot of commercial applications and solutions out there for doing this job (some links for more information at the end). 06/06/10 © 2010 Thomas Krampe 4
  • 9. What‘s in the Box There are also a lot of commercial applications and solutions out there for doing this job (some links for more information at the end). But let‘s see what Citrix put in the box. 06/06/10 © 2010 Thomas Krampe 4
  • 10. What‘s in the Box There are also a lot of commercial applications and solutions out there for doing this job (some links for more information at the end). But let‘s see what Citrix put in the box. - Manual Exports through XenCenter and CLI - Manual snapshots through XenCenter and CLI - Scripted snapshots through XenAPI or CLI 06/06/10 © 2010 Thomas Krampe 4
  • 11. What‘s in the Box There are also a lot of commercial applications and solutions out there for doing this job (some links for more information at the end). But let‘s see what Citrix put in the box. - Manual Exports through XenCenter and CLI - Manual snapshots through XenCenter and CLI - Scripted snapshots through XenAPI or CLI 06/06/10 © 2010 Thomas Krampe 4
  • 12. Scripted Snapshot XenServer VM snapshots can be made very simple from either the XenServer (remote) CLI or through a XenServer API call. Snapshots created in this way can use the Citrix VSS provider for Windows VMs, which results in an application-consistent snapshot. 06/06/10 © 2010 Thomas Krampe 5
  • 13. Scripted Snapshot XenServer VM snapshots can be made very simple from either the XenServer (remote) CLI or through a XenServer API call. Snapshots created in this way can use the Citrix VSS provider for Windows VMs, which results in an application-consistent snapshot. Pros: • Fast • Requires minimum of storage space • Customizable to specific business needs Cons: • Requires additional knowledge of CLI or XenAPI • More complicated file-level restoration 06/06/10 © 2010 Thomas Krampe 5
  • 14. Script Placement There are two possible locations where we can execute our scripts. 06/06/10 © 2010 Thomas Krampe 6
  • 15. Script Placement There are two possible locations where we can execute our scripts. 1. On the Administrator Workstation - Windows Workstation with installed XenCenter - VB Script for the logic - Scheduled Tasks for automation 06/06/10 © 2010 Thomas Krampe 6
  • 16. Script Placement There are two possible locations where we can execute our scripts. 1. On the Administrator Workstation - Windows Workstation with installed XenCenter - VB Script for the logic - Scheduled Tasks for automation 2. On the XenServer - XenServer Domain0 - Shell or Python Scripts for the logic - Linux cron for automation 06/06/10 © 2010 Thomas Krampe 6
  • 17. Visual Basic Scripts Advantages - Running on Windows - Use Visual Basic Script which is easy to use - Can create backups in the local files system of the Workstation Disadvantages - Workstation has to be „always on“ - Network connection to Xenserver and maybe Storage required 06/06/10 © 2010 Thomas Krampe 7
  • 18. Shell or Python Scripts Advantages - Running on Domain0 Linux - Very reliably with cron - Server is in most cases „always on“ - Network connection to Storage is always there Disadvantages - Linux and Bash or Python knowledge required - External Storage mandatory required - Need Dom0 ressources while running 06/06/10 © 2010 Thomas Krampe 8
  • 19. Preparation Before we can start we have to install an important piece of Software on our virtual machines running Microsoft Windows. To perform quiesced snapshots using Microsoft Volume Shadow Copy Service we have to install the XenServer VSS Provider first. Citrix provide us this piece of Software in the folder in which the XenTools are installed, normaly under %SystemDrive%%Program Files%CitrixXenTools. Just execute the batch script install- XenProvider.cmd. 06/06/10 © 2010 Thomas Krampe 9
  • 20. Preparation Before we can start we have to install an important piece of Software on our virtual machines running Microsoft Windows. To perform quiesced snapshots using Microsoft Volume Shadow Copy Service we have to install the XenServer VSS Provider first. Citrix provide us this piece of Software in the folder in which the XenTools are installed, normaly under %SystemDrive%%Program Files%CitrixXenTools. Just execute the batch script install- XenProvider.cmd. If you uninstall the XenTools quiesced Snapshots are not longer available. After re-installing XenTools you have to install the XenServer VSS Provider again. For an uninstall of the VSS Provider simply execute the uninstall-XenProvider.cmd. 06/06/10 © 2010 Thomas Krampe 9
  • 21. Preparation If we use a Windows VM to create snapshots we have to keep in mind that, by default VMs only have access to their own snapshots. 06/06/10 © 2010 Thomas Krampe 10
  • 22. Preparation If we use a Windows VM to create snapshots we have to keep in mind that, by default VMs only have access to their own snapshots. XenServer does a security check to prevent a VM from importing another VMs disk without authority. Because in this scenario the VM must have access to the snapshots of other VMs, we need to modify the following parameter: 06/06/10 © 2010 Thomas Krampe 10
  • 23. Preparation If we use a Windows VM to create snapshots we have to keep in mind that, by default VMs only have access to their own snapshots. XenServer does a security check to prevent a VM from importing another VMs disk without authority. Because in this scenario the VM must have access to the snapshots of other VMs, we need to modify the following parameter: xe vm-param-set other-config:snapmanager=true uuid=<uuid of VM used for backup> 06/06/10 © 2010 Thomas Krampe 10
  • 24. How to create a manual backup using XenCenter Before we start scripting, just a small look on how we can do this manually. To create a snapshot in XenCenter just select the VM and go to the Snapshot Tab. Now click the „Take Snapshot“ Button. 06/06/10 © 2010 Thomas Krampe 11
  • 25. How to create a manual backup using the CLI Create Snapshot with quiesce xe vm-snapshot-with-quiesce vm=<VM UUID> new-name-label=Backup Create Snapshot without quiesce (normal snapshot) xe vm-snapshot vm=<VM UUID> new-name-label=Backup Remove the Template flag from the snapshot xe template-param-set is-a-template=false uuid=<SNAPSHOT UUID> Export the snapshot to backup share xe vm-export uuid=<SNAPSHOT UUID> filename=<SHARE/file.xva> Delete Snapshot from XenServer Host to safe space on SR xe vm-uninstall uuid=<SNAPSHOT UUID> force=true 06/06/10 © 2010 Thomas Krampe 12
  • 26. Backup automation Manual backups work great, but we want an scheduled, automated live VM backup. Before start coding, let‘s take a look at the features the script should have in addition. 06/06/10 © 2010 Thomas Krampe 13
  • 27. Backup automation Manual backups work great, but we want an scheduled, automated live VM backup. Before start coding, let‘s take a look at the features the script should have in addition. 06/06/10 © 2010 Thomas Krampe 13
  • 28. Backup automation Manual backups work great, but we want an scheduled, automated live VM backup. Before start coding, let‘s take a look at the features the script should have in addition. 1. External source for VM‘s to backup 2. Quiesced Snapshots (if possible) otherwise normal 3. Logging capabilities 4. External storage mount / dismount 5. Export snapshots to a network share 6. Clean up used Storage repository 06/06/10 © 2010 Thomas Krampe 13
  • 29. What to do? I don‘t want to reinvent the wheel, so I found three great community created scripts. 06/06/10 © 2010 Thomas Krampe 14
  • 30. What to do? I don‘t want to reinvent the wheel, so I found three great community created scripts. Example 1: Visual Basic Script Example 2: Bash Shell Script Example 3: Python Shell Script 06/06/10 © 2010 Thomas Krampe 14
  • 31. Example 1: Visual Basic Script The first script I found comes from Jeff Riechers and is based on Visual Basic Script. The script is published in the Citrix Community Forum. http://forums.citrix.com/thread.jspa?threadID=250128&tstart=0 The script is very good documented and supports quiesced snapshots if possible, 64bit Windows and is configureable with parameters. Make sure that you read the full thread, there are a lot of usefull hints inside. 06/06/10 © 2010 Thomas Krampe 15
  • 32. Example 2: Bash Shell Script The second script comes from Andy Burton and is a bash shell script. You can find this usefull script on the following website: http://www.andy-burton.co.uk/blog/ The script is also very good documented and supports quiesced snapshots if possible and is configureable with a configuration file. You find a lot of enhancements like mounting / dismounting CIFS shares and clearing old backups. 06/06/10 © 2010 Thomas Krampe 16
  • 33. Example 3: Python Script The third script comes from David McArthur and is a Python script. You can find this script on the following website: http://community.citrix.com/display/xs/Zero-Downtime+Limited-Space+Backup The python API is used to gather metadata about the VM, its disks, and its network interfaces. The metadata is written to plain text files. To restore, a new VM is created and given the memory and CPUs settings stored in the metadata.  Then the VIF and disks are restored with the stored images being written to the new lvm volumes. Currently, Windows servers are not supported in this version, only Linux VMs and the XenServer instance, itself. 06/06/10 © 2010 Thomas Krampe 17
  • 34. My Results 06/06/10 © 2010 Thomas Krampe 18
  • 35. My Results All of these three example scripts do their job as expected. 06/06/10 © 2010 Thomas Krampe 18
  • 36. My Results All of these three example scripts do their job as expected. 1. VB Script In my opinion the best way to create backups. If we install a virtual Windows machine as a backup appliance with XenCenter we can avoid the disadvantages (always on etc.) 06/06/10 © 2010 Thomas Krampe 18
  • 37. My Results All of these three example scripts do their job as expected. 1. VB Script In my opinion the best way to create backups. If we install a virtual Windows machine as a backup appliance with XenCenter we can avoid the disadvantages (always on etc.) 2. Bash Script A very good script with many space for improvements. But scripts running in the Dom0 Linux are in my opinion not a good idea. 06/06/10 © 2010 Thomas Krampe 18
  • 38. My Results All of these three example scripts do their job as expected. 1. VB Script In my opinion the best way to create backups. If we install a virtual Windows machine as a backup appliance with XenCenter we can avoid the disadvantages (always on etc.) 2. Bash Script A very good script with many space for improvements. But scripts running in the Dom0 Linux are in my opinion not a good idea. 3. Python Script Good script but currently no support for Windows VM‘s 06/06/10 © 2010 Thomas Krampe 18
  • 39. Restore 06/06/10 © 2010 Thomas Krampe 19
  • 40. Restore Backup is only the first part of the job. Some times it‘s maybe very usefull to have also the capabilities to restore a backup if the original virtual machine is broken. 06/06/10 © 2010 Thomas Krampe 19
  • 41. Restore Backup is only the first part of the job. Some times it‘s maybe very usefull to have also the capabilities to restore a backup if the original virtual machine is broken. All backup scripts as well as the manual way with XenCenter or CLI creates a simple .xva file which can easy re-import. 06/06/10 © 2010 Thomas Krampe 19
  • 42. Restore Backup is only the first part of the job. Some times it‘s maybe very usefull to have also the capabilities to restore a backup if the original virtual machine is broken. All backup scripts as well as the manual way with XenCenter or CLI creates a simple .xva file which can easy re-import. In most cases this re-import is being enough. But for a correct restore you need also a backup of the virtual machine meta data (MAC-Address or VCPU Settings for example). 06/06/10 © 2010 Thomas Krampe 19
  • 43. Restore Example 06/06/10 © 2010 Thomas Krampe 20
  • 44. Restore Example Before perfoming a restore it‘s a good idea to uninstall the broken machine first. xe vm-uninstall uuid=<VM UUID> force=true Then cleanup the Storage repository. coalesce-leaf -u <VM UUID> And restore the virtual machine. xe vm-import filename=<BACKUP.XVA> preserve=true If preserve is set to true, the MAC address of the original VM will be preserved. 06/06/10 © 2010 Thomas Krampe 20
  • 45. Enhancements Here are some tips for enhancements. 06/06/10 © 2010 Thomas Krampe 21
  • 46. Enhancements Here are some tips for enhancements. 1. Backup VM meta data 2. Check backup share first (free space, availability) 3. Cleanup backup share (old backups) 4. Create useful log files 5. Notfications (E-Mail, SMS) . . . x. Your ideas for improvements 06/06/10 © 2010 Thomas Krampe 21
  • 47. What‘s new in 5.6 Live Memory Snapshot and Rollback - XenCenter support for live VM snapshot and revert - One-click Revert - Snapshot branches 06/06/10 © 2010 Thomas Krampe 22
  • 48. What‘s new in 5.6 New snapshot with memory feature In addition to saving the VMs memory (storage) and metadata, snapshots with memory also save the VMs state (RAM). xe vm-checkpoint vm=<VM UUID> new-name-label=<NAME> 06/06/10 © 2010 Thomas Krampe 23
  • 49. What‘s new in 5.6 New snapshot with memory feature In addition to saving the VMs memory (storage) and metadata, snapshots with memory also save the VMs state (RAM). xe vm-checkpoint vm=<VM UUID> new-name-label=<NAME> During the checkpoint creation process, the VM is paused for a brief period of time, and cannot be used during this period. 06/06/10 © 2010 Thomas Krampe 23
  • 50. Commercial Products 06/06/10 © 2010 Thomas Krampe
  • 51. Commercial Products If you don‘t have time or fun for scripting and in addition have unlimited budget, here are some commercial products. QuorumSoft Alike http://quorumsoft.com PHD Virtual Backup for Citrix XenServer http://www.phdvirtual.com Symantec Backup Exec System Recovery Server Edition http://www.symantec.com/de/de/business/backup- exec-system-recovery-server-edition 06/06/10 © 2010 Thomas Krampe 24
  • 52. Contact Informations For questions / suggestions after the Pubforum: thomas.krampe@visionapp.de More informations online: www.thomas-krampe.com in german only Slides are available after the Pubforum at: 06/06/10 © 2010 Thomas Krampe 25
  • 53. Questions 06/06/10 © 2010 Thomas Krampe 26
  • 54. Questions 06/06/10 © 2010 Thomas Krampe 26
  • 55. Questions Cheers 06/06/10 © 2010 Thomas Krampe 26

Editor's Notes

  1. Today I would like to talk about backup of virtual machines under Xenserver 5.5.
  2. Since the first customer asked me for a backup solution, my first thoughts have been - for what. We have unattend setups, OS Rollout Tools, Provisioning Services and some other nice tools to re-deploy a crashed server. So a backup only for the VM&amp;#x2018;s might be useless. But this customer have a lot of P2V Machines which are not easy to recover and in addition it&amp;#x2018;s it might be faster to restore a backup then rebuild the machine from the scratch. So that are valid arguments and today I like to share my new thoughts.
  3. Since the first customer asked me for a backup solution, my first thoughts have been - for what. We have unattend setups, OS Rollout Tools, Provisioning Services and some other nice tools to re-deploy a crashed server. So a backup only for the VM&amp;#x2018;s might be useless. But this customer have a lot of P2V Machines which are not easy to recover and in addition it&amp;#x2018;s it might be faster to restore a backup then rebuild the machine from the scratch. So that are valid arguments and today I like to share my new thoughts.
  4. Since the first customer asked me for a backup solution, my first thoughts have been - for what. We have unattend setups, OS Rollout Tools, Provisioning Services and some other nice tools to re-deploy a crashed server. So a backup only for the VM&amp;#x2018;s might be useless. But this customer have a lot of P2V Machines which are not easy to recover and in addition it&amp;#x2018;s it might be faster to restore a backup then rebuild the machine from the scratch. So that are valid arguments and today I like to share my new thoughts.
  5. Since the first customer asked me for a backup solution, my first thoughts have been - for what. We have unattend setups, OS Rollout Tools, Provisioning Services and some other nice tools to re-deploy a crashed server. So a backup only for the VM&amp;#x2018;s might be useless. But this customer have a lot of P2V Machines which are not easy to recover and in addition it&amp;#x2018;s it might be faster to restore a backup then rebuild the machine from the scratch. So that are valid arguments and today I like to share my new thoughts.
  6. Since the first customer asked me for a backup solution, my first thoughts have been - for what. We have unattend setups, OS Rollout Tools, Provisioning Services and some other nice tools to re-deploy a crashed server. So a backup only for the VM&amp;#x2018;s might be useless. But this customer have a lot of P2V Machines which are not easy to recover and in addition it&amp;#x2018;s it might be faster to restore a backup then rebuild the machine from the scratch. So that are valid arguments and today I like to share my new thoughts.
  7. Manual backups are very easy to create. But I like to implement something which can run automaticly without any manual task. And in addition I don&amp;#x2018;t want to shutdown the VM&amp;#x2018;s before running the backup.
  8. To draw up a solution for this customer I got a big budget - which was near ZERO or fewer. So I first take a look on what Citrix put me in the Box. I put all the commercial solutions at the end of the queue and take a look at everythig free of charge first. Manual Backup are not an option, so I focused only automated backups via scripting.
  9. To draw up a solution for this customer I got a big budget - which was near ZERO or fewer. So I first take a look on what Citrix put me in the Box. I put all the commercial solutions at the end of the queue and take a look at everythig free of charge first. Manual Backup are not an option, so I focused only automated backups via scripting.
  10. To draw up a solution for this customer I got a big budget - which was near ZERO or fewer. So I first take a look on what Citrix put me in the Box. I put all the commercial solutions at the end of the queue and take a look at everythig free of charge first. Manual Backup are not an option, so I focused only automated backups via scripting.
  11. To draw up a solution for this customer I got a big budget - which was near ZERO or fewer. So I first take a look on what Citrix put me in the Box. I put all the commercial solutions at the end of the queue and take a look at everythig free of charge first. Manual Backup are not an option, so I focused only automated backups via scripting.
  12. For Windows VM&amp;#x2018;s it&amp;#x2018;s possible to use the Microsoft Volume Shadow Copy Service. In XS 5.5 the snapshot function has no &amp;#x201E;revert from Snapshot&amp;#x201C; option, so the restore is is not a One-Click restore.
  13. For Windows VM&amp;#x2018;s it&amp;#x2018;s possible to use the Microsoft Volume Shadow Copy Service. In XS 5.5 the snapshot function has no &amp;#x201E;revert from Snapshot&amp;#x201C; option, so the restore is is not a One-Click restore.
  14. The next descission is the placement of a script, which also appoint the scripting language and the way the script should work.
  15. The next descission is the placement of a script, which also appoint the scripting language and the way the script should work.
  16. The next descission is the placement of a script, which also appoint the scripting language and the way the script should work.
  17. The next descission is the placement of a script, which also appoint the scripting language and the way the script should work.
  18. Very easy.We can then create a new VM from snapshot (Template), we can create a Template from snapshot, we can export the snapshot as a template and we can delete the snapshot. In some cases we have to reclaim the disk space from deleted snapshot by using the coalesce-leaf command. -&gt; CTX123400
  19. If your VM doesn&amp;#x2018;t support Snapshots with quiesce there will be an error message VM_SNAPSHOT_FAILED &amp;#x201E;Quiesce snapshots not supported&amp;#x201C; After you run successful a vm-snapshot... command you get the &lt;SNAPSHOT UUID&gt; as output which can be used after in the template-param-set command. Never export the snapshot to the filesystem of Dom0
  20. But sometimes I&amp;#x2018;m lazy and before I start writing code I try Google (Google is your friend).
  21. But sometimes I&amp;#x2018;m lazy and before I start writing code I try Google (Google is your friend).
  22. But sometimes I&amp;#x2018;m lazy and before I start writing code I try Google (Google is your friend).
  23. You don&amp;#x2018;t have to write off the Links from the following slides. At the end of this presentation I have a special link where you can find all the necessary informations and links to the introduced scripts.