Download SDKs

February 18, 2010 in citrix, virtualization, xen by admin

Page edited by Vishal Ganeriwala

Overview

XenServer includes a XML-RPC based API, providing programmatic access to the extensive set of XenServer management features and tools. The XenServer API can be called from a remote system as well as local to the XenServer host. Remote calls are generally made securely over HTTPS, using port 443.

There are five SDKs available, one for each of C, C#, Java, PowerShell, and Python. These are provided under an open-source license (LGPL or GPL with the common linking exception). This allows use (unmodified) in both closed-and open-source applications.

There are also several example code samples also provided for download. Some of the code samples demonstrate creating a VM, running VM power operations, and watching for events.

The XenServer 5.5 SDKs are suitable not just for 5.5, but for use with XenServer 4.0, 4.1 and 5.0 servers too, making it possible to address multiple XenServer versions with a single binary. There are, of course, features missing on the older versions, and client programs are expected to check host.software_version["product_version"] to gracefully fall back when appropriate.

XenServer 5.5


  XenServer.NET: The XenServer SDK for C#.NET
       Download XenServer.NET binaries
       Download XenServer.NET samples
       Download XenServer.NET source

  XenServerJava: The XenServer SDK for Java
       Download XenServerJava binaries
       Download XenServerJava samples
       Download XenServerJava source

  libxenserver: The XenServer SDK for C
       Download libxenserver binaries
       Download libxenserver samples and source

  XenServerPSSnapIn: The XenServer SDK for PowerShell
       Download XS-PS Windows installer
       Download XS-PS source

  XenAPI.py: The XenServer Python module
       Download XenAPI.py
       Browse XenServer API examples using Python

  API Reference
       PDF
       HTML
       Javadoc (zip)

  XenServerConsole: A Java client for XenServer consoles
       Download XenServerConsole source


XenServer SDK VM


We also publish an appliance-style virtual machine, ready to be imported into a XenServer host. This contains the SDKs above, plus a XenServer simulator, and a complete Linux-based development environment.

  Download SDK VM: Version 5.5.0. 328 MB.
  XenServer SDK Guide
       PDF
       HTML


Citrix StorageLink SDK


What is Citrix StorageLink?
Citrix StorageLink lets users automate the configuration and provisioning of the virtual machine storage, taking advantage of advanced features of the attached storage array. StorageLink enables the user to create virtual machines from logical vendor-specific storage repositories that support advanced capabilities such as snapshots, cloning, thin provisioning, and data deduplication. StorageLink also uses advanced storage capabilities to rapidly create virtual machines, increase storage utilization, and provide improved business continuity while lowering total cost of ownership.

Citrix StorageLink seamlessly integrates with storage arrays using either the standards-based SMI-S interface or via a custom vendor-specific StorageLink Storage Adapter.


Citrix StorageLink Gateway SDK (v2.0)

  • Documentation for Web Services/SOAP interface for Citrix StorageLink Gateway.


Citrix StorageLink Storage Adapter SDK (v2.0)

  • Citrix StorageLink SDK for storage partners.


Citrix StorageLink Gateway SDK (v2.1)

  • Documentation for Web Services/SOAP interface for Citrix StorageLink Gateway.


Citrix StorageLink Storage Adapter SDK (v2.1)

  • Citrix StorageLink SDK for storage partners.


Further Resources


XenServer Documentation Index

XenServer SDK Forum

Browse and Share Scripts and Samples on the CDN Script Exchange

xvp: An open-source web interface for XenServer, developed at Durham University



Older Releases


Note that the XenServer 5.5 SDKs are also suitable for use with XenServer 4.0, 4.1 and 5.0 servers. These older releases are here for historical purposes only.

XenServer SDK Archive





Changes between revision 51 and revision 52:

 *Overview*
  
 XenServer includes a XML-RPC based API, providing programmatic access to the extensive set of XenServer management features and tools. The XenServer API can be called from a remote system as well as local to the XenServer host. Remote calls are generally made securely over HTTPS, using port 443.
  
 There are five SDKs available, one for each of C, C#, Java, PowerShell, and Python. These are provided under an open-source license (LGPL or GPL with the common linking exception). This allows use (unmodified) in both closed-and open-source applications.
  
 There are also several example code samples also provided for download. Some of the code samples demonstrate creating a VM, running VM power operations, and watching for events.
  
 The XenServer 5.5 SDKs are suitable not just for 5.5, but for use with XenServer 4.0, 4.1 and 5.0 servers too, making it possible to address multiple XenServer versions with a single binary. There are, of course, features missing on the older versions, and client programs are expected to check host.software_version\["product_version"\] to gracefully fall back when appropriate.
  
 {div:style=padding:3px;background-color:#EEEEEE; layer-background-color:#EEEEEE}
 h3. XenServer 5.5
 {div}
 \\
  
 !btn_search.png!  *XenServer.NET*: The XenServer SDK for C#.NET
        [Download XenServer.NET binaries|^XenServer.NET-5.5.0-1.zip]
        [Download XenServer.NET samples|^XenServer.NET-5.5.0-1-samples.zip]
        [Download XenServer.NET source|^XenServer.NET-5.5.0-1-src.zip]
  
 !btn_search.png!  *XenServerJava*: The XenServer SDK for Java
        [Download XenServerJava binaries|^XenServerJava-5.5.0-1.zip]
        [Download XenServerJava samples|^XenServerJava-5.5.0-1-samples.zip]
        [Download XenServerJava source|^XenServerJava-5.5.0-1-src.zip]
  
 !btn_search.png!  *libxenserver*: The XenServer SDK for C
        [Download libxenserver binaries|^libxenserver-5.5.0-1.tar.bz2]
        [Download libxenserver samples and source|^libxenserver-5.5.0-1-src.tar.bz2]
  
 !btn_search.png!  *XenServerPSSnapIn*: The XenServer SDK for PowerShell
        [Download XS-PS Windows installer|^XenServerPSSnapIn-5.5.0-1.msi]
        [Download XS-PS source|^XenServerPSSnapIn-5.5.0-1-src.zip]
  
 !btn_search.png!  *XenAPI.py*: The XenServer Python module
        [Download XenAPI.py|XenServer Python API Samples^XenAPI.py]
        [Browse XenServer API examples using Python|XenServer Python API Samples]
  
 !btn_search.png!  *API Reference*
        [PDF|^xenenterpriseapi.pdf]
        [HTML|http://docs.vmd.citrix.com/XenServer/5.5.0/1.0/en_gb/api/docs/html/browser.html]
        [Javadoc (zip)|^XenServerJavadoc-5.5.0.zip]
  
 !btn_search.png!  *XenServerConsole*: A Java client for XenServer consoles
        [Download XenServerConsole source|^XenServerConsole-src.zip]
  
 \\
 {div:style=padding:3px;background-color:#EEEEEE; layer-background-color:#EEEEEE}
 h3. XenServer SDK VM
 {div}
 \\
  
 We also publish an appliance-style virtual machine, ready to be imported into a XenServer host. This contains the SDKs above, plus a XenServer simulator, and a complete Linux-based development environment.
  
 !btn_search.png!  [*Download SDK VM*|http://www.citrix.com/lang/English/lp/lp_1688621.asp]: Version 5.5.0. 328 MB.
 !btn_search.png!  *XenServer SDK Guide*
        [PDF|http://docs.vmd.citrix.com/XenServer/5.5.0/1.0/en_gb/sdk-1.0-5.5.0-en_gb.pdf]
        [HTML|http://docs.vmd.citrix.com/XenServer/5.5.0/1.0/en_gb/sdk.html]
  
 \\
 {div:style=padding:3px;background-color:#EEEEEE; layer-background-color:#EEEEEE}
 h3. Citrix StorageLink SDK
 {div}
 \\
  
 What is Citrix StorageLink?
 Citrix StorageLink lets users automate the configuration and provisioning of the virtual machine storage, taking advantage of advanced features of the attached storage array. StorageLink enables the user to create virtual machines from logical vendor-specific storage repositories that support advanced capabilities such as snapshots, cloning, thin provisioning, and data deduplication. StorageLink also uses advanced storage capabilities to rapidly create virtual machines, increase storage utilization, and provide improved business continuity while lowering total cost of ownership.
  
 Citrix StorageLink seamlessly integrates with storage arrays using either the standards-based SMI-S interface or via a custom vendor-specific StorageLink Storage Adapter.
  
 \\
 !btn_search.png! [*Citrix StorageLink Gateway SDK (v2.0)*|http://community.citrix.com/download/attachments/38633496/storagelink_gateway_sdk_v2.0.zip|]
 * Documentation for Web Services/SOAP interface for Citrix StorageLink Gateway.
  
 \\
 !btn_search.png! [*Citrix StorageLink Storage Adapter SDK (v2.0)*|http://community.citrix.com/download/attachments/38633496/storagelink_adapter_sdk_v2.0.zip|]
 * Citrix StorageLink SDK for storage partners.
  
 \\
  !btn_search.png! [*Citrix StorageLink Gateway SDK (v2.1)*|http://community.citrix.com/download/attachments/38633496/storagelink_gateway_sdk_v2.1.zip|]
 * Documentation for Web Services/SOAP interface for Citrix StorageLink Gateway.
  
 \\
 !btn_search.png! [*Citrix StorageLink Storage Adapter SDK (v2.1)*|http://community.citrix.com/download/attachments/38633496/storagelink_adapter_sdk_v2.1.zip|]
 * Citrix StorageLink SDK for storage partners.
  
  
 \\
 {div:style=padding:3px;background-color:#EEEEEE; layer-background-color:#EEEEEE}
 h3. Further Resources
 {div}
 \\
 !btn_search.png! [*XenServer Documentation Index*|http://docs.vmd.citrix.com/XenServer/5.5.0/]
  
 !btn_search.png! [*XenServer SDK Forum*|http://forums.citrix.com/forum.jspa?forumID=175&start=0]
  
 !btn_search.png! [*Browse and Share Scripts and Samples on the CDN Script Exchange*|http://community.citrix.com/cdn/script-exchange/]
  
 !btn_search.png! [*xvp*|xvp]: An open-source web interface for XenServer, developed at Durham University
  
 \\
 \\
 {div:style=padding:3px;background-color:#EEEEEE; layer-background-color:#EEEEEE}
 h3. Older Releases
 {div}
 \\
  
 Note that the XenServer 5.5 SDKs are also suitable for use with XenServer 4.0, 4.1 and 5.0 servers. These older releases are here for historical purposes only.
  
 [XenServer SDK Archive]
  
 \\
 \\
 \\
 \\

Debian Lenny

February 1, 2010 in citrix, virtualization, xen by admin

Page edited by ian campbell

Introduction

From version 5.5 onwards XenServer supports Debian GNU/Linux 5 AKA "Lenny" as a guest Virtual Machine. This includes installation of Lenny from a standard Debian network mirror as well as installation from CD/DVD image.

Note that XenServer 5.5 only supports 32 bit installations of Lenny.

Installation From DVD/CD

Unfortunately at the time of release the Official Debian installation CD and DVD ISO images did not contain a XenServer-compatible kernel and therefore cannot be used with XenServer. To remedy this Citrix has made available a custom built Unofficial DVD image containing a XenServer-compatible kernel.

Downloading A XenServer-compatible installation ISO

Citrix has made the DVD image available using the Jigdo(Jigsaw Download) utility. Jigdo allows ISO images to be downloaded quickly and efficiently by retrieving the majority of the data from a nearby mirror only obtaining a minimal template from the centralised download site.

If you have an existing Debian installation the obtaining jigdo is as simple as running

# aptitude install jigdo-file

If you do not have an existing Debian installation then jigdo can be download from its website. Jigdo is available for both Linux and Windows machines.

Once you have installed jigdo you should select a mirror from the Debian Mirror List. Choose a mirror which is geographically near to your location and which includes the i386 architecture. e.g ftp://ftp.XX.debian.org/debian/

After you have installed jigdo and selected a mirror you are ready to begin downloading the ISO from Citrix. Drop to a shell prompt or command line console. On Windows you will need to change to the directory where you unpacked jigdo.

Note: You must download the image from the URL given. The images available on Debian mirrors are not compatible with XenServer.

# jigdo-lite http://ca.downloads.xensource.com/debian/lenny/debian-504-i386-source-xen-DVD-1.jigdo

Jigdo will automatically download the template file (around 40M in size) and then will prompt you for a location to scan for existing packages. This can be useful if you have already downloaded Official Lenny images since you can reuse many of the packages on Official CDs. To do this simply mount or insert the Official CD/DVD and enter the path to it.
Next jigdo will prompt for a mirror to use, enter the mirror you selected above.

Jigdo will then begin downloading packages. If it complains about missing packages you should select another mirror and try again, this will not redownload any packages which were successfully retrieved.

When jigdo has completed it will leave debian-50-i386-source-xen-DVD-1.iso in the current directory.

Adding Additional CD/DVD Images

The custom XenServer-compatible DVD image contains a subset of the Debian software repository.

In order to access the remainder after installation you can either make use of a Debian network mirror in the normal way or you can add additional CD/DVD images using the Official images. To do this simply insert a CD/DVD into the virtual machine's CD drive and on the guest console run

# apt-cdrom add

Repeat this for as many CD/DVD images as you are interested in.

Support

If you have an issue specifically relating to the download of the custom ISO image then please comment below.

If you have any other issue relating to Debian Lenny please use the regular forums and other support channels which exist for this purpose.

Changes between revision 11 and revision 12:

 h1. Introduction
  
 From version 5.5 onwards XenServer supports [Debian GNU/Linux 5|http://www.debian.org/releases/lenny/] AKA "Lenny" as a guest Virtual Machine. This includes installation of Lenny from a standard Debian network mirror as well as installation from CD/DVD image.
  
 Note that XenServer 5.5 only supports 32 bit installations of Lenny.
  
 h1. Installation From DVD/CD
  
 Unfortunately at the time of release the Official Debian installation CD and DVD ISO images did not contain a XenServer-compatible kernel and therefore cannot be used with XenServer. To remedy this Citrix has made available a custom built Unofficial DVD image containing a XenServer-compatible kernel.
  
 h2.  Downloading A XenServer-compatible installation ISO
  h2. Downloading A XenServer-compatible installation ISO
  
 Citrix has made the DVD image available using the [Jigdo|http://atterer.net/jigdo/](Jigsaw Download) utility. Jigdo allows ISO images to be downloaded quickly and efficiently by retrieving the majority of the data from a nearby mirror only obtaining a minimal template from the centralised download site.
  
 If you have an existing Debian installation the obtaining jigdo is as simple as running
 {noformat}
 # aptitude install jigdo-file
 {noformat}
 If you do not have an existing Debian installation then jigdo can be download from its [website|http://atterer.net/jigdo/]. Jigdo is available for both Linux and Windows machines.
  
 Once you have installed jigdo you should select a mirror from the [Debian Mirror List|http://www.debian.org/mirror/list]. Choose a mirror which is geographically near to your location and which includes the i386 architecture. e.g {{[ftp://ftp.XX.debian.org/debian/]}}
  
 After you have installed jigdo and selected a mirror you are ready to begin downloading the ISO from Citrix. Drop to a shell prompt or command line console. On Windows you will need to change to the directory where you unpacked jigdo.
  
 (!) *Note*: You must download the image from the URL given. The images available on Debian mirrors are not compatible with XenServer. (!)
 {noformat}
 # jigdo-lite http://ca.downloads.xensource.com/debian/lenny/debian-504-i386-source-xen-DVD-1.jigdo
 {noformat}
 Jigdo will automatically download the template file (around 40M in size) and then will prompt you for a location to scan for existing packages. This can be useful if you have already downloaded Official Lenny images since you can reuse many of the packages on Official CDs. To do this simply mount or insert the Official CD/DVD and enter the path to it.
 Next jigdo will prompt for a mirror to use, enter the mirror you selected above.
  
 Jigdo will then begin downloading packages. If it complains about missing packages you should select another mirror and try again, this will not redownload any packages which were successfully retrieved.
  
 When jigdo has completed it will leave debian-50-i386-source-xen-DVD-1.iso in the current directory.
  
 h2. Adding Additional CD/DVD Images
  
 The custom XenServer-compatible DVD image contains a subset of the Debian software repository.
  
 In order to access the remainder after installation you can either make use of a Debian network mirror in the normal way or you can add additional CD/DVD images using the Official images. To do this simply insert a CD/DVD into the virtual machine's CD drive and on the guest console run
 {code}
 # apt-cdrom add
 {code}
 Repeat this for as many CD/DVD images as you are interested in.
 \\
 \\
  
 h1. Support
  
 If you have an issue specifically relating to the download of the custom ISO image then please comment below.
  
 If you have any other issue relating to Debian Lenny please use the regular forums and other support channels which exist for this purpose.

VM backup script for offline backups on XenServer 5.0

December 18, 2009 in citrix, virtualization, xen by admin

Page edited by Peter Barganski

Description

These scripts allow you to take automated offline backups of your XenServer 5.0 Virtual Machines, shutting them down and restarting them after backup.

Script Name                                    Usage
vmbackup-single-guest.pl                 Single VM backup specified by command line argument
vmbackup-from-vm-guest-list.pl        Selective VM backup from a list
vmbackup-all-guests.pl                     Complete VM backup within resource pool

Use these scripts if you can't perform snapshot based backups and need to shutdown your VM's to perfom a 'VM Export' based backup. This is the only type of full VM back available if you are using XenServer 5.0.

I wrote/modified these scripts so that we could backup our VM's before upgrading to XenServer 5.5.

This script is based on jeremy tirrell's "0 downtime snapshot based XENServer 5.5 backup script"

Download

Download All

http://community.citrix.com/download/attachments/102236496/vmbackup-single-guest.pl
http://community.citrix.com/download/attachments/102236496/vmbackup-from-vm-guest-list.pl
http://community.citrix.com/download/attachments/102236496/vmbackup-all-guests.pl

Change Log/Enhancements

* Replaced snapshot creation with vm-shutdown and vm-export for offline backups
* Added power-state checks
* Added automatic vm restart upon backup completion
* Added Status Bar Progress using CPAN Smart::Comments and some debug information
* Added POD documentation

Code Snippet

print("Shuting down: ".$VMName ."\n");					#Shuting down the VM
  $vm_shutdown_cmd = "xe vm-shutdown power-state=running uuid=$guest"; ### [<now>] Shutting down running VM...
  $status = `$vm_shutdown_cmd`;

	if ($?) {													#checking if shutdown was successfull
		print("Error shuting down " .$VMName." using command [$cmd]\n");
	} else {

		print($VMName.": was shutdown\n");
		$Message .= $VMName." was shutdown\n";
	}

  $fdate = `date +%d%m%y`;									#get the current date in a format we can write
  print("Exporting: ".$VMName."\n");						#export the VM
  $Message .= "Exporting: ".$VMName."\n";
  $exportstring = $backupdir.$VMName.".xva-".$fdate;
  $status= `xe vm-export vm=$guest filename=$exportstring`; ### [<now>] Performing VM export...
  print($status."\n");
  $Message .= $status."\n";

  $restartStatus= `xe vm-start power-state=halted vm=$guest`; ### [<now>] Restarting VM...
  print($restartStatus."\n");
  $restartMessage .= $restartStatus."\n";

POD Documentation (run perldoc vmbackup.pl)

__END__
# Perldoc documentation
=pod
=head1 NAME
Xen Virtual Machine Backup Script

=head1 SYNOPSIS

At the DOM0 console type I<perl -w backup-offline.pl>.

=head1 DESCRIPTION

This script will create a list of all available virtual machines running on the XenHost it is run except DOM0. It will then attempt to firstly, shutdown each vm in turn, export the vm to a .xva disk file.

After attempting the export the script will restart each vm it had previously shutdown.

Disclaimer

These software applications are provided to you as is with no representations, warranties or conditions of any kind. You may use and distribute it at your own risk. CITRIX DISCLAIMS ALL WARRANTIES WHATSOEVER, EXPRESS, IMPLIED, WRITTEN, ORAL OR STATUTORY, INCLUDING WITHOUT LIMITATION WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NONINFRINGEMENT. Without limiting the generality of the foregoing, you acknowledge and agree that (a) the software application may exhibit errors, design flaws or other problems, possibly resulting in loss of data or damage to property; (b) it may not be possible to make the software application fully functional; and (c) Citrix may, without notice or liability to you, cease to make available the current version and/or any future versions of the software application. In no event should the code be used to support of ultra-hazardous activities, including but not limited to life support or blasting activities. NEITHER CITRIX NOR ITS AFFILIATES OR AGENTS WILL BE LIABLE, UNDER BREACH OF CONTRACT OR ANY OTHER THEORY OF LIABILITY, FOR ANY DAMAGES WHATSOEVER ARISING FROM USE OF THE SOFTWARE APPLICATION, INCLUDING WITHOUT LIMITATION DIRECT, SPECIAL, INCIDENTAL, PUNITIVE, CONSEQUENTIAL OR OTHER DAMAGES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. You agree to indemnify and defend Citrix against any and all claims arising from your use, modification or distribution of the code.

Changes between revision 15 and revision 16:

 h2. Description
  
 These scripts allow you to take automated offline backups of your XenServer 5.0 Virtual Machines, shutting them down and restarting them after backup.
  
 *Script Name* &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; *Usage*
 vmbackup-single-guest.pl&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Single VM backup specified by command line argument
 vmbackup-from-vm-guest-list.pl&nbsp; &nbsp; &nbsp;&nbsp;&nbsp; Selective VM backup from a list
 vmbackup-all-guests.pl&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&nbsp; Complete VM backup within resource pool
  
 Use these scripts if you can't perform snapshot based backups and need to shutdown your VM's to perfom a 'VM Export' based backup. This is the only type of full VM back available if you are using XenServer 5.0.
  
 I wrote/modified these scripts so that we could backup our VM's *{+}before{+}* upgrading to XenServer 5.5.
  
 This script is based on [jeremy tirrell's|http://community.citrix.com/display/~jtirrell] "[0 downtime snapshot based XENServer 5.5 backup script|http://community.citrix.com/display/xs/0+downtime+snapshot+based+XENServer+5.5+backup+script.?showComments=true&showCommentArea=true#addcomment]"
 \\
  
 h2. Download
  
  [Download All|http://community.citrix.com/pages/downloadallattachments.action?pageId=102236496]
  
  
 [http://community.citrix.com/download/attachments/102236496/vmbackup-single-guest.pl]
 [http://community.citrix.com/download/attachments/102236496/vmbackup-from-vm-guest-list.pl]
 [http://community.citrix.com/download/attachments/102236496/vmbackup-all-guests.pl]
  
 h2. Change Log/Enhancements
  
 \* Replaced snapshot creation with vm-shutdown and vm-export for offline backups
 \* Added power-state checks
 \* Added automatic vm restart upon backup completion
 \* Added Status Bar Progress using CPAN Smart::Comments and some debug information
 \* Added POD documentation
  
 h2. Code Snippet
  
 {code}
 print("Shuting down: ".$VMName ."\n"); #Shuting down the VM
  $vm_shutdown_cmd = "xe vm-shutdown power-state=running uuid=$guest"; ### [<now>] Shutting down running VM...
  $status = `$vm_shutdown_cmd`;
  
  if ($?) { #checking if shutdown was successfull
  print("Error shuting down " .$VMName." using command [$cmd]\n");
  } else {
  
  print($VMName.": was shutdown\n");
  $Message .= $VMName." was shutdown\n";
  }
  
  $fdate = `date +%d%m%y`; #get the current date in a format we can write
  print("Exporting: ".$VMName."\n"); #export the VM
  $Message .= "Exporting: ".$VMName."\n";
  $exportstring = $backupdir.$VMName.".xva-".$fdate;
  $status= `xe vm-export vm=$guest filename=$exportstring`; ### [<now>] Performing VM export...
  print($status."\n");
  $Message .= $status."\n";
  
  $restartStatus= `xe vm-start power-state=halted vm=$guest`; ### [<now>] Restarting VM...
  print($restartStatus."\n");
  $restartMessage .= $restartStatus."\n";
 {code}
 POD Documentation (run perldoc vmbackup.pl)
 {code}
 __END__
 # Perldoc documentation
 =pod
 =head1 NAME
 Xen Virtual Machine Backup Script
  
 =head1 SYNOPSIS
  
 At the DOM0 console type I<perl -w backup-offline.pl>.
  
 =head1 DESCRIPTION
  
 This script will create a list of all available virtual machines running on the XenHost it is run except DOM0. It will then attempt to firstly, shutdown each vm in turn, export the vm to a .xva disk file.
  
 After attempting the export the script will restart each vm it had previously shutdown.
 {code}
  
 h2. Disclaimer
  
 These software applications are provided to you as is with no representations, warranties or conditions of any kind. You may use and distribute it at your own risk. CITRIX DISCLAIMS ALL WARRANTIES WHATSOEVER, EXPRESS, IMPLIED, WRITTEN, ORAL OR STATUTORY, INCLUDING WITHOUT LIMITATION WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NONINFRINGEMENT. Without limiting the generality of the foregoing, you acknowledge and agree that (a) the software application may exhibit errors, design flaws or other problems, possibly resulting in loss of data or damage to property; (b) it may not be possible to make the software application fully functional; and (c) Citrix may, without notice or liability to you, cease to make available the current version and/or any future versions of the software application. In no event should the code be used to support of ultra-hazardous activities, including but not limited to life support or blasting activities. NEITHER CITRIX NOR ITS AFFILIATES OR AGENTS WILL BE LIABLE, UNDER BREACH OF CONTRACT OR ANY OTHER THEORY OF LIABILITY, FOR ANY DAMAGES WHATSOEVER ARISING FROM USE OF THE SOFTWARE APPLICATION, INCLUDING WITHOUT LIMITATION DIRECT, SPECIAL, INCIDENTAL, PUNITIVE, CONSEQUENTIAL OR OTHER DAMAGES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. You agree to indemnify and defend Citrix against any and all claims arising from your use, modification or distribution of the code.

XenServer 5.0 & 5.5 Uber Backup Script

December 9, 2009 in citrix, virtualization, xen by admin

Page added by Jeff O'Brien

Description

I wanted to upload my script to share and get some ideas from the community.  I chose the good ole fashion BASH for the language.  The script does a lot of stuff for you and includes 4 major functions: install, buildlist, backup and restore.  The script takes one argument of the listed previously.  I have also implemented a retention policy which is useful when you have only so much space on one of those USB drives or dont want to fill your file server with more GB than it can handle.

Install does what you think it does.  Installs the program to the location of /root/vm-backup by default, it does prompt you for an alternate location which at the moment might not work so just hit enter and use the default.  Install also creates the log file in /var/log and sets the logrotate settings for you.

Buildlist builds a backup list of vm uuids and strips out the dom0 uuid for you

Backup does the magic and in a loop, snaps the VM, exports it to the mount location you specify in the variable section and then deletes the snapshot which then moves onto the next.  If the xenserver is not 5.5 it will halt the machine and export it.  So this wont be XenServer 6.0 safe till it comes out .

Restore is a little function that finds all exported .xva files in the mounted backup location and lists them out for you to pick which to restore.  Input the location to the xva file you want to restore and it will be imported into xenserver.  This will NOT power it on for you just in case another version of that vm is running or you want to change networks etc.

Cut and past this into a file on xenserver called vmbackup, then chmod +x vmbackup.  Run sh vmbackup install.  You will have to create your own crontab entry for scheduling.  You may want to change the variables at the top of the script for your backup device and backup mount point. Sorry no email alerting at the moment.

Download

http://virtually-engineered.blogspot.com/2009/10/damn-good-xenserver-backup-script.html

Code Snippet

Full code is in the download section.  This is just the basics here.  The future version will be in PowerShell for you windows users and not require any command line editing which will run on your dedicated management server.  Here is a snippet of the restore function.

restore function:

echo "RESTORE: Please select an image to restore:"
find $BACKUP_DIR -name *.xva
echo ""
echo -n "Image:"
read IMAGE

echo -n $IMAGE "was selected for restore, continue? [Y/N]:"
read YN

case "$YN" in

Y)
echo $IMAGE "Image is being restored, restoring..."
xe vm-import filename=$IMAGE
;;
y)
echo $IMAGE "Image is being restored, restoring..."
xe vm-import filename=$IMAGE
;;
N)
echo $IMAGE "is not being restored, exiting."
exit 1
;;
n)
echo $IMAGE "is not bein restored, exiting."
exit 1
;;
*)
echo "Uh ah, you didnt say the magic word."
exit 1

 Backup function:

echo "INFO: SnapShotting Virtual machine " $VMNAME >> $LOGFILE
SNAPSHOT_UUID="`xe vm-snapshot vm=$VMNAME new-name-label="$VMNAME"_snap`"
xe template-param-set is-a-template=false ha-always-run=false

uuid=$SNAPSHOT_UUID
echo "INFO: Exporting Virtual Machine:" $VMNAME >> $LOGFILE
xe vm-export vm="$VMNAME"_snap filename=$BACKUP_DIR/$VMNAME/$BKFILENAME
echo "INFO: Export Complete, removing backup snapshot"
xe vm-uninstall uuid=$SNAPSHOT_UUID force=true

Disclaimer

These software applications are provided to you as is with no representations, warranties or conditions of any kind. You may use and distribute it at your own risk. CITRIX DISCLAIMS ALL WARRANTIES WHATSOEVER, EXPRESS, IMPLIED, WRITTEN, ORAL OR STATUTORY, INCLUDING WITHOUT LIMITATION WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NONINFRINGEMENT. Without limiting the generality of the foregoing, you acknowledge and agree that (a) the software application may exhibit errors, design flaws or other problems, possibly resulting in loss of data or damage to property; (b) it may not be possible to make the software application fully functional; and (c) Citrix may, without notice or liability to you, cease to make available the current version and/or any future versions of the software application. In no event should the code be used to support of ultra-hazardous activities, including but not limited to life support or blasting activities. NEITHER CITRIX NOR ITS AFFILIATES OR AGENTS WILL BE LIABLE, UNDER BREACH OF CONTRACT OR ANY OTHER THEORY OF LIABILITY, FOR ANY DAMAGES WHATSOEVER ARISING FROM USE OF THE SOFTWARE APPLICATION, INCLUDING WITHOUT LIMITATION DIRECT, SPECIAL, INCIDENTAL, PUNITIVE, CONSEQUENTIAL OR OTHER DAMAGES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. You agree to indemnify and defend Citrix against any and all claims arising from your use, modification or distribution of the code.

XenCenter

December 4, 2009 in citrix, virtualization, xen by admin

Page edited by Ewan Mellor


   Permanent URL
http://community.citrix.com/xencenter     


   XenCenter Features

Citrix XenCenter is the Windows-native graphical user interface for managing Citrix XenServer.

Features include:

  • Full virtual machine installation, configuration and lifecycle management.
  • New in XenCenter 5.5: Debian GNU/Linux 5.0 (Lenny) support.
  • New in XenCenter 5.5: SUSE Linux Enterprise Server 11 support.
  • Access to VM consoles: VNC for installation-time, Xvnc for graphical displays on Linux, and Remote Desktop for Windows.



  • Remote storage configuration, including NetApp and DellEqualLogic StorageLink, and HBA (Fibre Channel and hardware iSCSI) support.
  • Host networking management, including VLANs and internal networks, bonded and dedicated NICs.



  • XenSearch: searching, sorting, filtering, and grouping, using tags and custom fields.
  • New in XenCenter 5.5: Folders and the Folder View
  • New in XenCenter 5.5: Simplified "Search for" in the XenSearch Query panel.



  • Complete resource pool management.
  • High availability configuration.
  • New in XenCenter 5.5: Active Directory integration, for user authentication and revocation.



  • New in XenCenter 5.5: VM snapshot management.



  • New in XenCenter 5.5: Workload Balancing, for pool-wide load balancing recommendations.
  • New in XenCenter 5.5: Workload Reports, giving performance views over time and across the datacenter.



  • Performance metrics display.
  • Long term metrics gathering and analysis.




   XenCenter Versions

The current version is XenCenter 5.5. It is capable of managing all versions between XenServer 4.1 and 5.5.

Also included in the installer is an older version of XenCenter, should you need to manage XenServer 4.0.


   Getting XenCenter

XenCenter is available as a Windows Installer package (.msi) from three places:

  the XenServer product CDs, in the client_install directory;
  on HP and Dell embedded editions of XenServer, from XenServer itself, at http://<server>/XenCenter.msi;
  from http://www.citrix.com/xenserver/download.


   XenCenter Plugins Technology Preview

In XenCenter 5.5 it is possible to add custom menu items or even whole tabs to the main window. You might do this as an ISV to integrate your own product with XenCenter, or as an end-user to integrate with your company's existing inventory management, for example.

A menu item can run a Microsoft PowerShell script or even an arbitrary executable on the client machine. Tabs are populated with a web page, and can call out to other services on your network or to your VMs.

This is a technology preview for XenCenter 5.5, and will be fully supported in future releases. We welcome your feedback of course, and would love to hear of any use cases that you have.

The plugin specification and some tutorials can be found on the XenCenter Plugins page. Please leave your comments there too.

   More Information

Debian Lenny: Now supported in XenCenter 5.5.
XenServer Support Forums
XenServer 5.5 Knowledge Center


   Web Interface

Looking for a web-based alternative to XenCenter? Take a look at xvp, an open-source web interface for XenServer, developed at Durham University in the UK.


Changes between revision 31 and revision 32:

 {section}
 {column:width=75%}
 \\
 {column}
 {column}
 {tip:title=   Permanent URL}
 {pre}[http://community.citrix.com/xencenter] &nbsp;&nbsp;&nbsp;&nbsp;
 {pre}
 {tip}
 {column}
 {column:width=5%}
 \\
 {column}
 {section}
 {div:style=padding:3px;background-color:#EEEEEE; layer-background-color:#EEEEEE}
  
 h3. {color:#003366}&nbsp;&nbsp;&nbsp;XenCenter Features{color}
  
 {div}
 Citrix XenCenter is the Windows-native graphical user interface for managing Citrix XenServer.
  
 Features include:
  
 !main-console.png|align=right,thumbnail=true,hspace=60!
 * Full virtual machine installation, configuration and lifecycle management.
 * *New in XenCenter 5.5*: Debian GNU/Linux 5.0 (Lenny) support.
 * *New in XenCenter 5.5*: SUSE Linux Enterprise Server 11 support.
 * Access to VM consoles: VNC for installation-time, Xvnc for graphical displays on Linux, and Remote Desktop for Windows.
  
 \\
 \\
  
 !new-sr-wizard-1.png|align=right,thumbnail=true,hspace=60!
 * Remote storage configuration, including NetApp and DellEqualLogic StorageLink, and HBA (Fibre Channel and hardware iSCSI) support.
 * Host networking management, including VLANs and internal networks, bonded and dedicated NICs.
  
 \\
 \\
  
 !main-search-menu.png|align=right,thumbnail=true,hspace=60!
 * XenSearch: searching, sorting, filtering, and grouping, using tags and custom fields.
 * *New in XenCenter 5.5*: Folders and the Folder View
 * *New in XenCenter 5.5*: Simplified "Search for" in the XenSearch Query panel.
  
 \\
 \\
  
 !logged-in-users.png|align=right,thumbnail=true,hspace=60!
 * Complete resource pool management.
 * High availability configuration.
 * *New in XenCenter 5.5*: Active Directory integration, for user authentication and revocation.
  
 \\
 \\
  
 !main-snapshot.png|align=right,thumbnail=true,hspace=60!
 * *New in XenCenter 5.5*: VM snapshot management.
  
 \\
 \\
  
 !main-wlb.png|align=right,thumbnail=true,hspace=60!
 * *New in XenCenter 5.5*: Workload Balancing, for pool-wide load balancing recommendations.
 * *New in XenCenter 5.5*: Workload Reports, giving performance views over time and across the datacenter.
  
 \\
 \\
  
 !main-graphs.png|align=right,thumbnail=true,hspace=60!
 * Performance metrics display.
 * Long term metrics gathering and analysis.
  
 \\
 \\
 \\
 {div:style=padding:3px;background-color:#EEEEEE; layer-background-color:#EEEEEE}
  
 h3. {color:#003366}&nbsp;&nbsp;&nbsp;XenCenter Versions{color}
  
 {div}
 The current version is XenCenter 5.5. It is capable of managing all versions between XenServer 4.1 and 5.5.
  
 Also included in the installer is an older version of XenCenter, should you need to manage XenServer 4.0.
  
 \\
 {div:style=padding:3px;background-color:#EEEEEE; layer-background-color:#EEEEEE}
  
 h3. {color:#003366}&nbsp;&nbsp;&nbsp;Getting XenCenter{color}
 {div}
  
 XenCenter is available as a Windows Installer package (.msi) from three places:
  
 !Download SDKs^btn_search.png!&nbsp; the XenServer product CDs, in the {{client_install}} directory;
 !Download SDKs^btn_search.png!&nbsp; on HP and Dell embedded editions of XenServer, from XenServer itself, at {{http://<server>/XenCenter.msi}};
 !Download SDKs^btn_search.png!&nbsp; from [http://www.citrix.com/xenserver/download].
  
 \\
 {div:style=padding:3px;background-color:#EEEEEE; layer-background-color:#EEEEEE}
  
 h3. {color:#003366}&nbsp;&nbsp;&nbsp;XenCenter Plugins Technology Preview{color}
 {div}
 In XenCenter 5.5 it is possible to add custom menu items or even whole tabs to the main window. You might do this as an ISV to integrate your own product with XenCenter, or as an end-user to integrate with your company's existing inventory management, for example.
  
 A menu item can run a Microsoft PowerShell script or even an arbitrary executable on the client machine. Tabs are populated with a web page, and can call out to other services on your network or to your VMs.
  
 This is a technology preview for XenCenter 5.5, and will be fully supported in future releases. We welcome your feedback of course, and would love to hear of any use cases that you have.
  
 The plugin specification and some tutorials can be found on the [XenCenter Plugins] page. Please leave your comments there too.
 \\
 {div:style=padding:3px;background-color:#EEEEEE; layer-background-color:#EEEEEE}
  
 h3. {color:#003366}&nbsp;&nbsp;&nbsp;More Information{color}
 {div}
 [*Debian Lenny*|Debian Lenny]: Now supported in XenCenter 5.5.
 [*XenServer Support Forums*|http://forums.citrix.com/category.jspa?categoryID=101]
 [*XenServer 5.5 Knowledge Center*|http://support.citrix.com/product/xens/v5.5/]
  
 \\
   
 {div:style=padding:3px;background-color:#EEEEEE; layer-background-color:#EEEEEE}
 h3. {color:#003366}&nbsp;&nbsp;&nbsp;Web Interface{color}
 {div}
  
 Looking for a web-based alternative to XenCenter? Take a look at [xvp], an open-source web interface for XenServer, developed at Durham University in the UK.
  
 \\

VM export backup script for offline backups on XenServer 5.0

November 27, 2009 in citrix, virtualization, xen by admin

Page edited by Peter Barganski

Description

This script allows you to take an automated offline backups of all your XenServer 5.0 Virtual Machines, restarting them after backup.

Use this script if you haven't upgraded yet (and before you upgrade to) XenServer 5.5 can't utilize hardware supported snapshots for backup because you don't have NetApp Filer or Equalogic SAN's.

This script is based on jeremy tirrell's "0 downtime snapshot based XENServer 5.5 backup script"

Download

http://community.citrix.com/download/attachments/102236496/vmbackup.pl

Change Log/Enhancements

* Replaced snapshot creation with vm-shutdown and vm-export for offline backups
* Added power-state checks
* Added automatic vm restart upon backup completion
* Added Status Bar Progress using CPAN Smart::Comments and some debug information
* Added POD documentation

Code Snippet

print("Shuting down: ".$VMName ."\n");					#Shuting down the VM
  $vm_shutdown_cmd = "xe vm-shutdown power-state=running uuid=$guest"; ### [<now>] Shutting down running VM...
  $status = `$vm_shutdown_cmd`;

	if ($?) {													#checking if shutdown was successfull
		print("Error shuting down " .$VMName." using command [$cmd]\n");
	} else {

		print($VMName.": was shutdown\n");
		$Message .= $VMName." was shutdown\n";
	}

  $fdate = `date +%d%m%y`;									#get the current date in a format we can write
  print("Exporting: ".$VMName."\n");						#export the VM
  $Message .= "Exporting: ".$VMName."\n";
  $exportstring = $backupdir.$VMName.".xva-".$fdate;
  $status= `xe vm-export vm=$guest filename=$exportstring`; ### [<now>] Performing VM export...
  print($status."\n");
  $Message .= $status."\n";

  $restartStatus= `xe vm-start power-state=halted vm=$guest`; ### [<now>] Restarting VM...
  print($restartStatus."\n");
  $restartMessage .= $restartStatus."\n";

POD Documentation (run perldoc vmbackup.pl)

__END__
# Perldoc documentation
=pod
=head1 NAME
Xen Virtual Machine Backup Script

=head1 SYNOPSIS

At the DOM0 console type I<perl -w backup-offline.pl>.

=head1 DESCRIPTION

This script will create a list of all available virtual machines running on the XenHost it is run except DOM0. It will then attempt to firstly, shutdown each vm in turn, export the vm to a .xva disk file.

After attempting the export the script will restart each vm it had previously shutdown.

Disclaimer

These software applications are provided to you as is with no representations, warranties or conditions of any kind. You may use and distribute it at your own risk. CITRIX DISCLAIMS ALL WARRANTIES WHATSOEVER, EXPRESS, IMPLIED, WRITTEN, ORAL OR STATUTORY, INCLUDING WITHOUT LIMITATION WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NONINFRINGEMENT. Without limiting the generality of the foregoing, you acknowledge and agree that (a) the software application may exhibit errors, design flaws or other problems, possibly resulting in loss of data or damage to property; (b) it may not be possible to make the software application fully functional; and (c) Citrix may, without notice or liability to you, cease to make available the current version and/or any future versions of the software application. In no event should the code be used to support of ultra-hazardous activities, including but not limited to life support or blasting activities. NEITHER CITRIX NOR ITS AFFILIATES OR AGENTS WILL BE LIABLE, UNDER BREACH OF CONTRACT OR ANY OTHER THEORY OF LIABILITY, FOR ANY DAMAGES WHATSOEVER ARISING FROM USE OF THE SOFTWARE APPLICATION, INCLUDING WITHOUT LIMITATION DIRECT, SPECIAL, INCIDENTAL, PUNITIVE, CONSEQUENTIAL OR OTHER DAMAGES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. You agree to indemnify and defend Citrix against any and all claims arising from your use, modification or distribution of the code.

Changes between revision 9 and revision 10:

 h2. Description
  
 This script allows you to take an automated offline backups of *{_}{+}all{+}{_}* your XenServer 5.0 Virtual Machines, restarting them after backup.
  
 Use this script if you haven't upgraded yet (and *{+}before{+}* you upgrade to) XenServer 5.5 can't utilize hardware supported snapshots for backup because you don't have NetApp Filer or Equalogic SAN's.
  
 This script is based on [jeremy tirrell's|http://community.citrix.com/display/~jtirrell] "[0 downtime snapshot based XENServer 5.5 backup script|http://community.citrix.com/display/xs/0+downtime+snapshot+based+XENServer+5.5+backup+script.?showComments=true&showCommentArea=true#addcomment]"
 \\
  
 h2. Download
  
 [http://community.citrix.com/download/attachments/102236496/vmbackup.pl]
  
 h2. Change Log/Enhancements
  
 \* Replaced snapshot creation with vm-shutdown and vm-export for offline backups
 \* Added power-state checks
 \* Added automatic vm restart upon backup completion
 \* Added Status Bar Progress using CPAN Smart::Comments and some debug information
 \* Added POD documentation
  
 h2. Code Snippet
  
 {code}
 print("Shuting down: ".$VMName ."\n"); #Shuting down the VM
  $vm_shutdown_cmd = "xe vm-shutdown power-state=running uuid=$guest"; ### [<now>] Shutting down running VM...
  $status = `$vm_shutdown_cmd`;
  
  if ($?) { #checking if shutdown was successfull
  print("Error shuting down " .$VMName." using command [$cmd]\n");
  } else {
  
  print($VMName.": was shutdown\n");
  $Message .= $VMName." was shutdown\n";
  }
  
  $fdate = `date +%d%m%y`; #get the current date in a format we can write
  print("Exporting: ".$VMName."\n"); #export the VM
  $Message .= "Exporting: ".$VMName."\n";
  $exportstring = $backupdir.$VMName.".xva-".$fdate;
  $status= `xe vm-export vm=$guest filename=$exportstring`; ### [<now>] Performing VM export...
  print($status."\n");
  $Message .= $status."\n";
  
  $restartStatus= `xe vm-start power-state=halted vm=$guest`; ### [<now>] Restarting VM...
  print($restartStatus."\n");
  $restartMessage .= $restartStatus."\n";
 {code}
 POD Documentation (run perldoc vmbackup.pl)
 {code}
 __END__
 # Perldoc documentation
 =pod
 =head1 NAME
 Xen Virtual Machine Backup Script
  
 =head1 SYNOPSIS
  
 At the DOM0 console type I<perl -w backup-offline.pl>.
  
 =head1 DESCRIPTION
  
 This script will create a list of all available virtual machines running on the XenHost it is run except DOM0. It will then attempt to firstly, shutdown each vm in turn, export the vm to a .xva disk file.
  
 After attempting the export the script will restart each vm it had previously shutdown.
 {code}
  
 h2. Disclaimer
  
 These software applications are provided to you as is with no representations, warranties or conditions of any kind. You may use and distribute it at your own risk. CITRIX DISCLAIMS ALL WARRANTIES WHATSOEVER, EXPRESS, IMPLIED, WRITTEN, ORAL OR STATUTORY, INCLUDING WITHOUT LIMITATION WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NONINFRINGEMENT. Without limiting the generality of the foregoing, you acknowledge and agree that (a) the software application may exhibit errors, design flaws or other problems, possibly resulting in loss of data or damage to property; (b) it may not be possible to make the software application fully functional; and (c) Citrix may, without notice or liability to you, cease to make available the current version and/or any future versions of the software application. In no event should the code be used to support of ultra-hazardous activities, including but not limited to life support or blasting activities. NEITHER CITRIX NOR ITS AFFILIATES OR AGENTS WILL BE LIABLE, UNDER BREACH OF CONTRACT OR ANY OTHER THEORY OF LIABILITY, FOR ANY DAMAGES WHATSOEVER ARISING FROM USE OF THE SOFTWARE APPLICATION, INCLUDING WITHOUT LIMITATION DIRECT, SPECIAL, INCIDENTAL, PUNITIVE, CONSEQUENTIAL OR OTHER DAMAGES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. You agree to indemnify and defend Citrix against any and all claims arising from your use, modification or distribution of the code.

Offline backup script for XENServer 5.0

November 24, 2009 in citrix, virtualization, xen by admin

Page edited by Peter Barganski

Description

This script allows you to take an automated offline backups of all your XenServer 5.0 Virtual Machines, restarting them after backup.

Use this script if you haven't upgraded yet (and before you upgrade to) XenServer 5.5 and don't have SAN's NetApp Filer or Equalogic SAN's and therefore, can't utilize hardware support for snapshot based backups from Xen.

This script is based on jeremy tirrell's "0 downtime snapshot based XENServer 5.5 backup script"

Download

http://community.citrix.com/download/attachments/102236496/vmbackup.pl

Change Log/Enhancements

* Replaced snapshot creation with vm-shutdown for offline backups
* Added power-state checks
* Added automatic vm restart upon export completion
* Added CPAN Smart::Comments status bar and debug information
* Added POD documentation

Code Snippet

print("Shuting down: ".$VMName ."\n");					#Shuting down the VM
  $vm_shutdown_cmd = "xe vm-shutdown power-state=running uuid=$guest"; ### [<now>] Shutting down running VM...
  $status = `$vm_shutdown_cmd`;

	if ($?) {													#checking if shutdown was successfull
		print("Error shuting down " .$VMName." using command [$cmd]\n");
	} else {

		print($VMName.": was shutdown\n");
		$Message .= $VMName." was shutdown\n";
	}

  $fdate = `date +%d%m%y`;									#get the current date in a format we can write
  print("Exporting: ".$VMName."\n");						#export the VM
  $Message .= "Exporting: ".$VMName."\n";
  $exportstring = $backupdir.$VMName.".xva-".$fdate;
  $status= `xe vm-export vm=$guest filename=$exportstring`; ### [<now>] Performing VM export...
  print($status."\n");
  $Message .= $status."\n";

  $restartStatus= `xe vm-start power-state=halted vm=$guest`; ### [<now>] Restarting VM...
  print($restartStatus."\n");
  $restartMessage .= $restartStatus."\n";

POD Documentation (run perldoc vmbackup.pl)

__END__
# Perldoc documentation
=pod
=head1 NAME
Xen Virtual Machine Backup Script

=head1 SYNOPSIS

At the DOM0 console type I<perl -w backup-offline.pl>.

=head1 DESCRIPTION

This script will create a list of all available virtual machines running on the XenHost it is run except DOM0. It will then attempt to firstly, shutdown each vm in turn, export the vm to a .xva disk file.

After attempting the export the script will restart each vm it had previously shutdown.

Disclaimer

These software applications are provided to you as is with no representations, warranties or conditions of any kind. You may use and distribute it at your own risk. CITRIX DISCLAIMS ALL WARRANTIES WHATSOEVER, EXPRESS, IMPLIED, WRITTEN, ORAL OR STATUTORY, INCLUDING WITHOUT LIMITATION WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NONINFRINGEMENT. Without limiting the generality of the foregoing, you acknowledge and agree that (a) the software application may exhibit errors, design flaws or other problems, possibly resulting in loss of data or damage to property; (b) it may not be possible to make the software application fully functional; and (c) Citrix may, without notice or liability to you, cease to make available the current version and/or any future versions of the software application. In no event should the code be used to support of ultra-hazardous activities, including but not limited to life support or blasting activities. NEITHER CITRIX NOR ITS AFFILIATES OR AGENTS WILL BE LIABLE, UNDER BREACH OF CONTRACT OR ANY OTHER THEORY OF LIABILITY, FOR ANY DAMAGES WHATSOEVER ARISING FROM USE OF THE SOFTWARE APPLICATION, INCLUDING WITHOUT LIMITATION DIRECT, SPECIAL, INCIDENTAL, PUNITIVE, CONSEQUENTIAL OR OTHER DAMAGES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. You agree to indemnify and defend Citrix against any and all claims arising from your use, modification or distribution of the code.

Changes between revision 3 and revision 4:

 h2. Description
  
 This script allows you to take an automated offline backups of *{_}{+}all{+}{_}* your XenServer 5.0 Virtual Machines, restarting them after backup.
  
 Use this script if you haven't upgraded yet (and *{+}before{+}* you upgrade to) XenServer 5.5 and don't have SAN's NetApp Filer or Equalogic SAN's and therefore, can't utilize hardware support for snapshot based backups from Xen.
  
 This script is based on jeremy tirrell's "[0 downtime snapshot based XENServer 5.5 backup script|http://community.citrix.com/display/xs/0+downtime+snapshot+based+XENServer+5.5+backup+script.?showComments=true&showCommentArea=true#addcomment]"
  This script is based on [jeremy tirrell's|http://community.citrix.com/display/~jtirrell] "[0 downtime snapshot based XENServer 5.5 backup script|http://community.citrix.com/display/xs/0+downtime+snapshot+based+XENServer+5.5+backup+script.?showComments=true&showCommentArea=true#addcomment]"
 \\
  
 h2. Download
  
 [http://community.citrix.com/download/attachments/102236496/vmbackup.pl]
  
 h2. Change Log/Enhancements
  
 \* Replaced snapshot creation with vm-shutdown for offline backups
 \* Added power-state checks
 \* Added automatic vm restart upon export completion
 \* Added CPAN Smart::Comments status bar and debug information
 \* Added POD documentation
  
 h2. Code Snippet
 
 {code}
print("Shuting down: ".$VMName ."\n"); #Shuting down the VM
  print("Shuting down: ".$VMName ."\n"); #Shuting down the VM
  $vm_shutdown_cmd = "xe vm-shutdown power-state=running uuid=$guest"; ### [<now>] Shutting down running VM...
  $status = `$vm_shutdown_cmd`;
  
  if ($?) { #checking if shutdown was successfull
print("Error shuting down " .$VMName." using command [$cmd]\n");
   print("Error shuting down " .$VMName." using command [$cmd]\n");
  } else {
 
   
  print($VMName.": was shutdown\n");
  $Message .= $VMName." was shutdown\n";
  }
  
  $fdate = `date +%d%m%y`; #get the current date in a format we can write
  print("Exporting: ".$VMName."\n"); #export the VM
  $Message .= "Exporting: ".$VMName."\n";
  $exportstring = $backupdir.$VMName.".xva-".$fdate;
  $status= `xe vm-export vm=$guest filename=$exportstring`; ### [<now>] Performing VM export...
  print($status."\n");
  $Message .= $status."\n";
  
  $restartStatus= `xe vm-start power-state=halted vm=$guest`; ### [<now>] Restarting VM...
  print($restartStatus."\n");
  $restartMessage .= $restartStatus."\n";
 {code}
 POD Documentation (run perldoc vmbackup.pl)
 {code}
 __END__
 # Perldoc documentation
 =pod
 =head1 NAME
 Xen Virtual Machine Backup Script
  
 =head1 SYNOPSIS
  
 At the DOM0 console type I<perl -w backup-offline.pl>.
  
 =head1 DESCRIPTION
  
 This script will create a list of all available virtual machines running on the XenHost it is run except DOM0. It will then attempt to firstly, shutdown each vm in turn, export the vm to a .xva disk file.
  
 After attempting the export the script will restart each vm it had previously shutdown.
 {code}
  
 h2. Disclaimer
  
 These software applications are provided to you as is with no representations, warranties or conditions of any kind. You may use and distribute it at your own risk. CITRIX DISCLAIMS ALL WARRANTIES WHATSOEVER, EXPRESS, IMPLIED, WRITTEN, ORAL OR STATUTORY, INCLUDING WITHOUT LIMITATION WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NONINFRINGEMENT. Without limiting the generality of the foregoing, you acknowledge and agree that (a) the software application may exhibit errors, design flaws or other problems, possibly resulting in loss of data or damage to property; (b) it may not be possible to make the software application fully functional; and (c) Citrix may, without notice or liability to you, cease to make available the current version and/or any future versions of the software application. In no event should the code be used to support of ultra-hazardous activities, including but not limited to life support or blasting activities. NEITHER CITRIX NOR ITS AFFILIATES OR AGENTS WILL BE LIABLE, UNDER BREACH OF CONTRACT OR ANY OTHER THEORY OF LIABILITY, FOR ANY DAMAGES WHATSOEVER ARISING FROM USE OF THE SOFTWARE APPLICATION, INCLUDING WITHOUT LIMITATION DIRECT, SPECIAL, INCIDENTAL, PUNITIVE, CONSEQUENTIAL OR OTHER DAMAGES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. You agree to indemnify and defend Citrix against any and all claims arising from your use, modification or distribution of the code.

xvp

November 22, 2009 in citrix, virtualization, xen by admin

Page edited by Ewan Mellor

xvp is a web interface for XenServer, developed by Colin Dean at Durham University in the UK.

There are four components:

  • xvpweb: A web front end for XenServer, running on Apache/PHP.
  • xvpviewer: A Java applet for accessing XenServer consoles (used by xvpweb, of course).
  • xvp: A server-side proxy for XenServer consoles, so that you can use ordinary VNC clients.
  • xvpdiscover: A tool that queries a XenServer pool, and writes the appropriate configuration files for xvp and xvpweb.


The whole thing is open source (GPL v2), using libxenserver, XML-RPC for PHP, and parts of TightVNC. It's been in development since May 2009.


Project home page: http://www.xvpsource.org/

xvpweb on Windows


xvpviewer on Mac OS X


xvpviewer on Linux


Changes between revision 3 and revision 4:

 xvp is a web interface for XenServer, developed by Colin Dean at Durham University in the UK.
  
 {section}
 {column}
 There are four components:
  
 * *xvpweb*: A web front end for XenServer, running on Apache/PHP.
 * *xvpviewer*: A Java applet for accessing XenServer consoles (used by xvpweb, of course).
 * *xvp*: A server-side proxy for XenServer consoles, so that you can use ordinary VNC clients.
 * *xvpdiscover*: A tool that queries a XenServer pool, and writes the appropriate configuration files for xvp and xvpweb.
  
 \\
  
 The whole thing is open source (GPL v2), using [libxenserver|http://community.citrix.com/cdn/xs/sdks], XML-RPC for PHP, and parts of TightVNC. It's been in development since May 2009.
  
 \\
  
  *Project home page*: [http://www.dur.ac.uk/c.c.dean/xvp/]
  *Project home page*: [http://www.xvpsource.org/]
  
 {column}
  
 {column}
 [!windows-xvpweb.png|width=300!|^windows-xvpweb.png]
 {center}xvpweb on Windows{center}
  
 \\
  
 [!mac-console.png|width=300!|^mac-console.png]
 {center}xvpviewer on Mac OS X{center}
  
 \\
  
 [!linux-console.png|width=300!|^linux-console.png]
 {center}xvpviewer on Linux{center}
 {column}
 {section}
  
 \\

XenServer SDK Archive

November 7, 2009 in citrix, virtualization, xen by admin

Page edited by Ewan Mellor



The XenServer 5.5 SDKs are also suitable for use with XenServer 4.0, 4.1 and 5.0 servers. These older releases are here for historical purposes only.

See http://community.citrix.com/cdn/xs/sdks for the current SDKs.



XenServer 5.0

  XenServer.NET: The XenServer SDK for C#.NET
       Download XenServer.NET binaries
       Download XenServer.NET samples
       Download XenServer.NET source

  XenServerJava: The XenServer SDK for Java
       Download XenServerJava binaries
       Download XenServerJava samples
       Download XenServerJava source

  libxenserver: The XenServer SDK for C
       Download libxenserver binaries
       Download libxenserver samples and source

  XenServerPSSnapIn: The XenServer SDK for PowerShell
       Download XS-PS Windows installer
       Download XS-PS source

  XenAPI.py: The XenServer Python module
       Download XenAPI.py
       Browse XenServer API examples using Python

  API Reference
       PDF
       Javadoc (zip)

  XenServer SDK VM
       Download SDK VM: Version 5.0.0 Update 3. Around 300 MB.


XenServer 4.1

       API Reference
       Download .NET Xen Server API Client Examples
       Java bindings and examples (javadoc)


XenServer 4.0

       API Reference
       Download .NET Xen Server API Client Examples



Changes between revision 2 and revision 3:

 \\
 \\
  
 {info}
 The XenServer 5.5 SDKs are also suitable for use with XenServer 4.0, 4.1 and 5.0 servers. These older releases are here for historical purposes only.
   
 See [http://community.citrix.com/cdn/xs/sdks|http://community.citrix.com/cdn/xs/sdks] for the current SDKs.
 {info}
  
 \\
 \\
  
 h4. XenServer 5.0
  
 !btn_search.png!&nbsp; *XenServer.NET*: The XenServer SDK for C#.NET
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [Download XenServer.NET binaries|Download SDKs^XenServer.NET-5.0.0-3.zip]
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [Download XenServer.NET samples|Download SDKs^XenServer.NET-5.0.0-3-samples.zip]
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [Download XenServer.NET source|Download SDKs^XenServer.NET-5.0.0-3-src.zip]
  
 !btn_search.png!&nbsp; *XenServerJava*: The XenServer SDK for Java
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [Download XenServerJava binaries|Download SDKs^XenServerJava-5.0.0-3.zip]
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [Download XenServerJava samples|Download SDKs^XenServerJava-5.0.0-3-samples.zip]
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [Download XenServerJava source|Download SDKs^XenServerJava-5.0.0-3-src.zip]
  
 !btn_search.png!&nbsp; *libxenserver*: The XenServer SDK for C
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [Download libxenserver binaries|Download SDKs^libxenserver-5.0.0-3.tar.bz2]
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [Download libxenserver samples and source|Download SDKs^libxenserver-5.0.0-3-src.tar.bz2]
  
 !btn_search.png!&nbsp; *XenServerPSSnapIn*: The XenServer SDK for PowerShell
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [Download XS-PS Windows installer|Download SDKs^XenServerPSSnapIn-5.0.0-3.msi]
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [Download XS-PS source|Download SDKs^XenServerPSSnapIn-5.0.0-3-src.zip]
  
 !btn_search.png!&nbsp; *XenAPI.py*: The XenServer Python module
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [Download XenAPI.py|XenServer Python API Samples^XenAPI.py]
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [Browse XenServer API examples using Python|XenServer Python API Samples]
  
 !btn_search.png!&nbsp; *API Reference*
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [PDF|Download SDKs^XenServerAPI-5.0.0.pdf]
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [Javadoc (zip)|Download SDKs^XenServerJavadoc-5.0.0.zip]
  
 !btn_search.png!&nbsp; *XenServer SDK VM*
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [*Download SDK VM*|http://ca.downloads.xensource.com/XenServer-5.0.0-Update3-RC2/XenServer-5.0.0-Update3-SDK.zip]: Version 5.0.0 Update 3. Around 300 MB.
  
 \\
 h4. XenServer 4.1
  
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [*API Reference*|Download SDKs^xenenterpriseapi4_1.pdf]
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [*Download .NET Xen Server API Client Examples*|Download SDKs^XenSdk.net4_1.zip]
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [*Java bindings and examples (javadoc)*|Download SDKs^XenJavaSdk4_1.zip]
  
 \\
 h4. XenServer 4.0
  
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [*API Reference*|Download SDKs^xenenterpriseapi.pdf]
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [*Download .NET Xen Server API Client Examples*|Download SDKs^XenSDKNET.zip]
 \\
 \\
 \\
 \\

Kensho

October 30, 2009 in citrix, virtualization, xen by admin

Page edited by Jeff Gee

Project Kensho v1.3 Technology Preview

Introduction

Simplicity is Power. Simplicity is Project Kensho. Citrix Project Kensho provides users with powerfully simple tools that facilitate the export and import of virtual machines and virtual machine based workloads (virtual appliances) using the Open Virtual Machine Format (OVF) and Common Information Model (CIM) industry standards developed by the Distributed Management Task Force's (DMTF) Virtualization Management Initiative (VMAN).

The Project Kensho OVF Tool utilizes the OVF standard for the creation and consumption of virtual appliance packages. The Open Virtual Machine Format describes the metadata of virtual machine(s) and the behavior of the appliance when consumed by the hypervisor.

Citrix Project Kensho also provides a CIM interface to the XenServer™ API and introduces a WSMAN interface to XenServer™. 


      MyCitrix login required for download

  Resources

  Discuss in Forum

Featured Videos

Installing the Project Kensho OVF Tool

Installing XenServer CIM Interfaces

Using the Project Kensho OVF Tool

Project Kensho OVF Tool Advanced Features

Project Kensho and Hyper-V


Useful Reference

What is OVF?

Kensho OVF Technology


How It Works

Project Kensho consists of the following components:
An OVF Tool , which utilizes the OVF standard for the creation and consumption of virtual appliance packages. This utility removes much of the complexities found in conversion and packaging tools.

A CIM interface to the XenServer™ API, which also adds a WSMAN interface to XenServer™. The Xen-CIM component is required by the Project Kensho OVF Tool and installs directly on the XenServer™. It can also be used as an interface for management of XenServer™ and XenServer™ hosted virtual machines.

What's New?

Project Kensho 1.3 brings a wealth of powerfully simple features to both the Kensho OVF Tool and the CIM interface. These new features enable users to both manage a XenServer™ in new ways as well as reap the benefits of OVF in a XenServer™ and Hyper-V environment.

Kensho OVF Tool

  • Compliant with the DMTF OVF 1.0.0 specification
  • Compatibility with XenConvert 2.0 OVF content
  • Support for importing into and exporting from a user defined XenServer Storage Repository (SR)
  • OVF security features:
    • Encryption
    • Digital signing
  • OVF compression
  • Snapshot support
  • Direct import of VMware OVF content simplifying migration and consumption of VMware content

XenServer-CIM Interface

  • Support for XenServer™ 5.5
  • Storage profile support
  • Networking profile support
  • Snapshot classes

Project Kensho System Requirements

The minimum environment to use the tools consists of: Project Kensho OVF Tool Host, a supported virtual machine host, and a Windows SMB share. Project Kensho requires the following services and software to support the components of the Project Kensho OVF Tool.

Software Description
Project Kensho OVF Tool Host Project Kensho OVF Tool requires a personal computer running Windows XP, Vista or Windows Server 2003 or 2008. Windows 7 and Windows Server 2008 R2 support is experimental.
Citrix XenServer™ Citrix XenServer™ 5.0 or 5.5 is required for creating and consuming OVF based virtual appliances using XenServer™ and management of the XenServer™ environment via the Common Information Model (CIM).

The Project Kensho XenServer™ CIM installation utility provides support for management of the XenServer™ through the standards based CIM interface. It also contains a configuration script to create an ISO storage repository and creates a helper VM template for the Project Kensho OVF Tool.
Windows Server 2008 with Hyper-V The Project Kensho OVF Tool supports Windows Server 2008 with the Hyper-V Role for importing and exporting OVF based virtual appliances.

Communication between the Project Kensho OVF Tool and the Windows Server occurs through WinRM. Windows Server 2008 installs WinRM by default, no additional installation is required.
Windows Server SMB File Share The Project Kensho OVF Tool requires a Windows based UNC share to import and export OVF packages. This is called the Kensho (or OVF) Library.
The share must be accessible from the Project Kensho OVF Tool as well as any virtual machine hosts targeted for import or export.

Prerequisites

Complete the following pre-installation tasks before installing Project Kensho components:

  1. Read through this entire document
  2. Read through the Project Kensho OVF Tool Readme
  3. Setup a Windows file share:
    1. Create a file share from a Windows host
      1. Windows Server 2008 with the File Services Role provides the option of creating SMB or NFS based shares, be sure to select SMB.
      2. Windows Server 2003 and prior create SMB based shares by default.
    2. Obtain a user account and password that has change level access to this share.
  4. Project Kensho OVF Tool Host:
    1. Windows XP, Windows Server 2003, or Windows Vista.
    2. Install .NET Framework version 3.5
    3. Install WinRM
  5. XenServer™ Host:
    1. XenServer™ 5.0 or 5.5
  6. Windows Server 2008 with Hyper-V Host
    1. Add the Hyper-V role

 

Install

XenServer-CIM Interface Installation

To install the XenServer-CIM Interface on XenServer™, complete the following procedure:

Be Careful

The install script creates a hidden ISO Storage Repository and copies two ISOs into it (xenserver-linuxfixup-disk.iso and xenserver-iscsi-target.iso). It also creates a helper VM template called 'iSCSI target' from xenserver-iscsi-target.iso. These are utilized by the Project Kensho OVF Tool. Do not remove, alter or add content to this storage repository.

  1. Copy XenServerCIM-Install.tgz to the XenServer™ host to the path of: /tmp
  2. From the XenServer™ console, execute the following:
    1. cd /tmp
    2. tar - xvzf XenServer-CIM.tgz
    3. cd /XenServer-CIM
    4. Install the XenServer-CIM and WSMAN providers:
      1. bash ./install.sh
      2. Answer the prompt to set the security level of the interface.

Project Kensho OVF Tool Installation

  1. From the computer identified as the Project Kensho OVF Tool computer:
    1. Execute KenshoOVF_x86.msi or KenshoOVF_x64.msi
    2. Follow the prompts
Note

The Project Kensho OVF Tool installer must execute via "run as administrator" option on Vista, Windows Server 2008, Windows 7 and Windows Server 2008 R2.

Windows Server 2008 with Hyper-V Configuration

These steps enable WinRM, modify the Windows Firewall rules and set the appropriate authorization to access WinRM remotely with Kensho OVF Tool.

  1. At the Hyper-V host login as the administrator
  2. Open a command prompt and execute the following commands:
    1. winrm quickconfig
    2. winrm p winrm/config/service @{AllowUnencrypted="true"}
    3. winrm p winrm/config/service/auth @{Basic="true"}
    4. winrm p winrm/config/client @{AllowUnencrypted="true"}
    5. winrm p winrm/config/client/auth @{Basic="true"}

 

Uninstall

XenServer-CIM Interface Uninstall Process

  1. To uninstall the XenServer-CIM and WSMAN providers
    1. bash ./uninstall.sh
      1. If an ISO image is added to the ISO storage repository, answer the prompt to delete the 'XenServer Internal ISO library'
      2. If confirmed, the script deletes the hidden internal ISO storage repository created during install. All ISO images added into this storage repository will be deleted.

Project Kensho OVF Tool Uninstall Process

  1. To uninstall Project Kensho OVF Tool:
    1. Open Add / Remove Programs (or Programs)
    2. Select the Project Kensho OVF Tool
    3. Select Remove

 

Project Kensho Administration

This section covers general administration and use of the XenServer CIM interface for XenServer™ and the Project Kensho OVF Tool.

XenServer-CIM Interface

Once installed, the XenServer-CIM interface requires no administration. Documentation is provided within the distribution that further describes using the interface and its options.

Project Kensho OVF Tool

The Project Kensho OVF Tool is the primary utility to create and consume OVF virtual appliances. When starting the utility, an initialization process occurs. This process gathers all of the library and server information from the systems defined by the user. In some scenarios, initialization may take up to 60 seconds or more to collect all data.


Figure 1 - Initializing Indicator

After completing initialization, the main UI appears


Figure 2 - Project Kensho OVF Tool

Adding virtual machine Host(s) and OVF Library Resources:

To begin using the utility, it is necessary to add at least one virtual machine host and an OVF Library. To add a virtual machine host or Library share:

1.   From the menu bar, select File > Add Server. Alternatively, pressing the hotkey combination Alt +A or clicking the Add Server icon on the toolbar invokes the Add Server configuration window.

2.   Select the platform type from the drop down menu:

  • For a Library :
    1. Enter the server name (or IP address)
    2. Enter the share name (without slashes or subfolders)
    3. Enter the username and password
    4. Click Add .
Figure 3 - Adding a Library Server
  • For a virtual machine host:
    1. Enter the server name (or IP address)
    2. Select the Host server protocol: Unsecure or Secure (HTTP/HTTPS)
    3. Enter the username and password
    4. Click Add
Figure 4 - Adding a XenServer™ Host

3.  The window will stay open after clicking the Add button. Repeat this process for each hypervisor and or library the Project Kensho OVF Tool will manage. Click the Close button when finished adding all servers.

Note

When adding a Hyper V server the account used must be a member of the local Hyper-V host administrators group.

Creating a Virtual Appliance

After configuring a library and virtual machine host(s), the Project Kensho OVF Tool is ready to create a virtual appliance from one or more virtual machines. The virtual appliance will become an OVF package. The virtual appliance is exported from either a XenServer™ or Hyper-V host.

To export a virtual machine as an OVF virtual appliance, follow these easy steps:

1.   Select the Export Tab


Figure 5 - Export Tab

2.   Select the target library share from the Library tree view. This is where the OVF and associated VHD(s) will reside after export.

3.   From the tree view, expand the list of virtual machines under each virtual machine host.

4.   Select a virtual machine with a single click. This will place its qualified name into the Selected vMachine(s) list box. To remove the selection, double click the selection.

Be Aware

There is no limit to the number of virtual machines to select for export. The more virtual machines selected, the longer the export will take and require more storage on the Library server. The amount of time to export per virtual machine is dependent on the virtual disk size, type, and network bandwidth between the virtual machine host and the library server.

5.   Click the Export button to begin. The result will be the OVF virtual appliance package containing the virtual machine(s) selected. It is important to enusre that the OVF package is tested before assuming it is good. The next section describes the import process.

Consuming a Virtual Appliance

The Project Kensho OVF Tool can consume any DMTF compliant OVF file that contains virtual machine disk(s) in the VHD or VMDK format. The virtual appliance is imported into either a XenServer™ or Hyper-V host.

To import an OVF virtual appliance, follow these easy steps:

1.   Select the Import Tab.


*Figure 6 - Import Tab

2.   Select the target virtual machine host or hosts from the respective Host type tree view.

3.   From the Kensho Library tree view, select an OVF virtual appliance.

Note

OVA packages must be converted to OVF prior to Import. Please see: Converting an OVF package to an OVA for more information.

4.   If a virtual machine to host resource mapping is required - it is noted in the Mapping status field as Mapping: Required.

5.   Click the Mapping wizard button in the Tool bar to map virtual machine to host resources.

6.   Click the Import or Force button to begin the import.

Note

The button will display Force if mapping is either incomplete or non-existent.

During a forced import devices are attached in a first found fashion. I.E. if the OVF has a network device defined on the VM an attempt will be made to attach that network to the first virtual network switch listed on the target host.

Advanced Packaging Capabilities

New to the Project Kensho 1.3 OVF Tool is support for a wide range of OVF virtual appliance packaging options. When selecting one or more VMs to export as a virtual appliance, the utility presents the following options:


Figure 7 - Export Options

Each option is unique and may be applied to any virtual appliance export. Selecting a check box enables the feature. Some features, like security options, require user input.

  • Create OVA Package
    Selecting this option allows the user to create an OVA package. An OVA package is an archive containing OVF metadata, virtual disks, manifest and certificates in a single file. This feature is useful for scenarios where a single file containing all the necessary virtual machine components is desired. This option produces a file with an .ova extension. If a file inside of the OVF package is greater than 8 GB, the operation to create the OVA will fail.
  • Compress OVA Package
    Selecting this option allows the user to compress the entire OVA package. To enable this option, the user must select the Create OVA Package option. This option is useful when the user seeks to reduce the overall file size of the of the OVA package. This option produces a file with the .ova.gz extension.
  • Compress OVF Files Individually
    Selecting this option allows the user to compress the individual files within the OVA package. This differs from the option above in that each file within the OVA package is compressed. Selecting this option allows the user to achieve maximum compression of an OVA file. This option produces files within the OVA package with the .gz extension. The OVA package will have the .ova extension.
  • Add Manifest
    Selecting this option instructs the Project Kensho OVF Tool to create a manifest file referencing the OVF files and their checksum. This option is useful when a user seeks improved reliability of the content. This option produces a file with the .mf extension.
  • Encrypt Attached Files
    Selecting this option allows the user to encrypt the OVF related files. When selecting this option, the user must enter a passphrase. This option is useful when protecting appliance content is required.
  • Sign OVF Package
    Selecting this option allows the user to digitally sign the OVF file with a certificate. This option is useful in providing security against unauthorized changes to the OVF file content.
  • Include EULA(s)
    Selecting this option allows the user to create a virtual appliance with an End User License Agreement (EULA). This feature is useful when a virtual appliance requires end user agreement to a EULA before the virtual appliance installs on the target hypervisor. To add a EULA follow these directions:

1.   Click the Add EULA button

2.   Browse to the desired text file containing the EULA text.

Note

The EULA must be a plain text file and cannot contain any formatting (such as HTML tags) or special characters.

3.   Select the EULA text file.

4.   Click Open

  • Export Metadata Only
    Selecting this option allows the user to create an OVF without any virtual disk(s). This is useful when the user needs an OVF without virtual disk information.

Advanced Import Capabilities

New to the Project Kensho 1.3 OVF Tool is support for a range of OVF virtual appliance import options. When selecting one or more OVF virtual appliances to import, the utility presents the following options:


Figure 8 - Import Options

  • Verify Digital Signature
    Selecting this option forces the import process to verify the digital signature that was used to sign the OVF during export. If the verification fails, this typically indicates that the OVF has been tampered with.
  • Verify Manifest Content
    Selecting this option forces the import process to verify that the content of the manifest file matches what is in the OVF package. If this verification fails, it typically indicates that files are missing.
  • Validate OVF Package
    Selecting this option forces the import process to validate the selected OVF file against the DMTF OVF 1.0.0 schema. This is useful to determine the compatibility of an OVF file.
  • Import Metadata Only
    Selecting this option imports the metadata only. This is useful if configuration content is all that is needed. The virtual machine content will be created from a template or an existing virtual disk will be attached after import.
  • Run Operating System Fixups
    Selecting this option runs automated scripts against the imported VMware based virtual appliance. This is necessary to ensure the VM boots properly. Select this option for Windows or Linux virtual machines imported from VMware sources. Fixup of virtual machines with more than two virtual disks is unsupported.

VM to Host Resource Mapping Wizard

The Project Kensho OVF Tool allows users to map system, storage, and networking resources defined in the OVF virtual appliance to the resources on the virtual machine host(s). This ensures that prior to import, the proper resources are paired and the virtual machine can power on minimizing administrative tasks.

Mapping is performed by selecting items (one or more) in the left column of the Mapping dialog and then selecting a target device in the right

The padlock icon depicts that a mapping of a VM device to Host resource has been set. Individual mappings may be cleared by selecting and clearing the lock icon.

An existing OVF to Host resource mapping may be cleared by clicking the Clear button on the Import tab.

1.   Begin the resource mapping process by Clicking the Mapping button in the Tool bar

2.   The mapping wizard launches and presents the Systems tab (this is the target Host for a VM workload).


Figure 9 - Unmapped VM CPU and memory workload

3.  Select the desired host resource in the right pane

4.  Select a VM resource(s) in the left pane


8Figure 10 - VM CPU and memory workload mapped Host*

5.  Click the Next button to map the Network resources.


*Figure 11 - Mapped VM Network Device to Hypervisor Network Device

6.   Select the desired host resource in the right pane

7.   Select a VM resource(s) in the left pane

8.   Click the Next button to map the Storage resources


Figure 12 - Mapped VM Storage to Hypervisor Storage

9.    Select the desired host resource in the right pane

10.   Select a VM resource(s) in the left pane

11.   Click Done to complete the wizard, save the mapping, and return to the Import screen.

Converting an OVF package to an OVA and vice versa

The Project Kensho OVF Tool facilitates the conversion of any DMTF compliant OVF export to a single OVA file.

To convert an OVF with the Project Kensho OVF Tool:

1.   Select the Import Tab


Figure 13 - OVA Menu

2.   From the Kensho Library, select an OVF.

3.   Right click the OVF and Select 'Convert to OVA'

4.   The reverse process is used to convert an OVA into an OVF.

Note

The OVF icon depicts a folder that includes the OVF package configuration and associated file.
The OVA icon indicates an OVF package that has been compressed, using tar format, into a single file with the extension .OVA
The X icon indicates an OVF package that is not compliant with the DMTF Standards.

Environment Tab

The environment tab is a read-only view of the virtual machine host resources and environment.

Figure 14 - Environment Tab

VMware OVF Support

The Project Kensho OVF Tool facilitates importing VMware derived OVF content directly into a XenServer Storage Repository in the same manner as importing a XenConvert or Project Kensho produced OVF.

It is important to note that not all VMware OVF content is equal. VMware OVF content produced through the latest VMware utilities will result in a higher degree of import success. The following VMware OVF content has been successfully tested:

  • vSphere 4
  • Virtual Infrastructure 3
  • VMware OVF Tool 0.9
  • VMware OVF Tool 1.0
  • VMware Studio 1.0
  • VMware Workstation 6.5.3
  • VMware Converter 4.0.x
  • VMware Converter 3.0.3

Snapshot Support

The Project Kensho OVF Tool now supports creating virtual appliances from virtual machines with snapshots. Both XenServer 5.5 and Hyper-V support virtual machine snapshots.

When creating an OVF virtual appliance from a virtual machine with a snapshot, the current running state of the virtual machine is what the tool creates as a virtual appliance. This can also be described as the state that is experienced when the virtual machine is powered on.

If a virtual machine contains multiple snapshots, only the current running state of the virtual machine is exported. No snapshot history or detail is exported as part of the virtual appliance

Changes between revision 88 and revision 89:

 h1. Project Kensho v1.3 Technology Preview
  
 {anchor:OLE_LINK1} {anchor:OLE_LINK2}
 {section}
 {column:width=67%}
  
 {div:style=padding:3px;background-color:#EEEEEE; layer-background-color:#EEEEEE}
 h3. {color:#00549f}Introduction{color}
 {div}
 Simplicity is Power. Simplicity is Project Kensho. Citrix Project Kensho provides users with powerfully simple tools that facilitate the export and import of virtual machines and virtual machine based workloads (virtual appliances) using the Open Virtual Machine Format (OVF) and Common Information Model (CIM) industry standards developed by the Distributed Management Task Force's (DMTF) Virtualization Management Initiative (VMAN).
  
 The Project Kensho OVF Tool utilizes the OVF standard for the creation and consumption of virtual appliance packages. The Open Virtual Machine Format describes the metadata of virtual machine(s) and the behavior of the appliance when consumed by the hypervisor.
  
 Citrix Project Kensho also provides a CIM interface to the XenServer™ API and introduces a WSMAN interface to XenServer™.&nbsp;
  
 {column}
 {column} [!button3.png!|http://download.citrix.com/English/ss/downloads/details.asp?downloadId=1682855&productId=683148]
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*MyCitrix login required for download*
 {div:style=padding:3px;background-color:#EEEEEE; layer-background-color:#EEEEEE}
  
 h4. *&nbsp; Resources*
  
 &nbsp; [!btn_search.png! *Discuss in Forum*|http://forums.citrix.com/forum.jspa?forumID=780]
  
 {div}
 {column}
 {section}
 {div:style=padding:3px;background-color:#EEEEEE; layer-background-color:#EEEEEE}
  
 h3. {color:#00549f}Featured Videos{color}
 {div}
 {section}
 {column}
 [!Kensho.png|align=centre,width=100,heigh=72!|http://www.citrix.com/tv/#video/956]
 {align:center}*Installing the Project Kensho OVF Tool*
 {align}
 {column}
 {column}
 [!cim.png|align=centre,width=100,heigh=72!|http://www.citrix.com/tv/#video/963]
 {align:center}*Installing XenServer CIM Interfaces*
 {align}
 {column}
 {column}
 [!cim.jpg|align=centre,width=100,heigh=72!|http://www.citrix.com/tv/#video/965]
 {align:center}*Using the Project Kensho OVF Tool*
 {align}
 {column}
 {column}
 [!image13.jpg|align=centre,width=100,heigh=60!|http://www.citrix.com/tv/#video/1006]
 {align:center}*Project Kensho OVF Tool Advanced Features*
 {align}
 {column}
 {column}
 [!image14.jpg|align=centre,width=100,heigh=60!|http://www.citrix.com/tv/#video/971]
 {align:center}*Project Kensho and Hyper-V*
 {align}
 {column}
 {section}
 \\
  
 {div:style=padding:3px;background-color:#EEEEEE; layer-background-color:#EEEEEE}
  
 h3. {color:#00549f}Useful Reference{color}
 {div}
  
 {section}
 {column}
 [!ProjectKensho.gif|align=centre,width=80,heigh=40!|http://community.citrix.com/download/attachments/45810048/WhatisOVF.pdf]
 {align:center}*What is OVF?*
 {align}
 {column}
 {column}
 [!ProjectKensho.gif|align=centre,width=80,heigh=40!|http://community.citrix.com/download/attachments/45810048/Kensho+OVF+Technology.pdf]
 {align:center}*Kensho OVF Technology*
 {align}
 {align}
 {column}
 {section}
 \\
  
 {div:style=padding:3px;background-color:#EEEEEE; layer-background-color:#EEEEEE}
  
 h3. {color:#00549f}How It Works{color}
 {div}
 Project Kensho consists of the following components:
 An *OVF Tool* , which utilizes the OVF standard for the creation and consumption of virtual appliance packages. This utility removes much of the complexities found in conversion and packaging tools.
  
 A *CIM interface* to the XenServer™ API, which also adds a WSMAN interface to XenServer™. *The Xen-CIM component is required by the Project Kensho OVF Tool* and installs directly on the XenServer™. It can also be used as an interface for management of XenServer™ and XenServer™ hosted virtual machines.
  
 {div:style=padding:3px;background-color:#EEEEEE; layer-background-color:#EEEEEE}
  
 h3. {color:#00549f}What's New?{color}
  
 {div}
 Project Kensho 1.3 brings a wealth of powerfully simple features to both the Kensho OVF Tool and the CIM interface. These new features enable users to both manage a XenServer™ in new ways as well as reap the benefits of OVF in a XenServer™ and Hyper-V environment.
  
 h4. Kensho OVF Tool
 * Compliant with the DMTF OVF 1.0.0 specification
 * Compatibility with XenConvert 2.0 OVF content
 * Support for importing into and exporting from a user defined XenServer Storage Repository (SR)
 * OVF security features:
  ** Encryption
  ** Digital signing
 * OVF compression
 * Snapshot support
 * Direct import of VMware OVF content simplifying migration and consumption of VMware content
  
 h4. XenServer-CIM Interface
 * Support for XenServer™ 5.5
 * Storage profile support
 * Networking profile support
 * Snapshot classes
  
 {div:style=padding:3px;background-color:#EEEEEE; layer-background-color:#EEEEEE}
  
 h3. {color:#00549f}Project Kensho System Requirements{color}
  
 {div}
  
 The minimum environment to use the tools consists of: Project Kensho OVF Tool Host, a supported virtual machine host, and a Windows SMB share. Project Kensho requires the following services and software to support the components of the Project Kensho OVF Tool.
 || *Software* || *Description* ||
 | Project Kensho OVF Tool Host | Project Kensho OVF Tool requires a personal computer running Windows XP, Vista or Windows Server 2003 or 2008. Windows 7 and Windows Server 2008 R2 support is experimental. |
 | Citrix XenServer™ | Citrix XenServer™ 5.0 or 5.5 is required for creating and consuming OVF based virtual appliances using XenServer™ and management of the XenServer™ environment via the Common Information Model (CIM). \\
 \\
 The Project Kensho XenServer™ CIM installation utility provides support for management of the XenServer™ through the standards based CIM interface. It also contains a configuration script to create an ISO storage repository and creates a helper VM template for the Project Kensho OVF Tool.|
 | Windows Server 2008 with Hyper-V | The Project Kensho OVF Tool supports Windows Server 2008 with the Hyper-V Role for importing and exporting OVF based virtual appliances. \\
 \\
 Communication between the Project Kensho OVF Tool and the Windows Server occurs through WinRM. Windows Server 2008 installs WinRM by default, no additional installation is required. \\
 | Windows Server SMB File Share | The Project Kensho OVF Tool requires a Windows based UNC share to import and export OVF packages. This is called the Kensho (or OVF) Library. \\
 The share must be accessible from the Project Kensho OVF Tool as well as any virtual machine hosts targeted for import or export. |
  
 h4. {color:#00549f}Prerequisites{color}
  
 Complete the following pre-installation tasks before installing Project Kensho components:
 # Read through this entire document
 # Read through the Project Kensho OVF Tool Readme
 # Setup a Windows file share:
 ## Create a file share from a Windows host
 ### Windows Server 2008 with the File Services Role provides the option of creating SMB or NFS based shares, be sure to select SMB.
 ### Windows Server 2003 and prior create SMB based shares by default.
 ## Obtain a user account and password that has change level access to this share.
 # Project Kensho OVF Tool Host:
 ## Windows XP, Windows Server 2003, or Windows Vista.
 ## Install .NET Framework version 3.5
 ## Install WinRM
 # XenServer™ Host:
 ## XenServer™ 5.0 or 5.5
 # Windows Server 2008 with Hyper-V Host
 ## Add the Hyper-V role
  
 h2. &nbsp;
  
 {div:style=padding:3px;background-color:#EEEEEE; layer-background-color:#EEEEEE}
  
 h3. {color:#00549f}Install{color}
  
 {div}
  
 h4. *XenServer-CIM Interface Installation*
  
 To install the XenServer-CIM Interface on XenServer™, complete the following procedure:
 {note:title=Be Careful}
 The install script creates a hidden ISO Storage Repository and copies two ISOs into it (xenserver-linuxfixup-disk.iso and xenserver-iscsi-target.iso). It also creates a helper VM template called 'iSCSI target' from xenserver-iscsi-target.iso. These are utilized by the Project Kensho OVF Tool. Do not remove, alter or add content to this storage repository.
 {note}
  
 # Copy XenServerCIM-Install.tgz to the XenServer™ host to the path of: /tmp
 # From the XenServer™ console, execute the following:
 ## *cd /tmp*
 ## *tar \- xvzf XenServer-CIM.tgz*
 ## *cd /XenServer-CIM*
 ## Install the XenServer-CIM and WSMAN providers:
 ### *bash ./install.sh*
 ### Answer the prompt to set the security level of the interface.
  
 h4. *Project Kensho OVF Tool Installation*
  
 # From the computer identified as the Project Kensho OVF Tool computer:
 ## Execute *KenshoOVF_x86.msi* or *KenshoOVF_x64.msi*
 ## Follow the prompts
  
 {info:title=Note}
 The Project Kensho OVF Tool installer must execute via "run as administrator" option on Vista, Windows Server 2008, Windows 7 and Windows Server 2008 R2.
 {info}
  
 h4. *Windows Server 2008 with* *Hyper-V Configuration*
 These steps enable WinRM, modify the Windows Firewall rules and set the appropriate authorization to access WinRM remotely with Kensho OVF Tool.
 # At the Hyper-V host login as the administrator
 # Open a command prompt and execute the following commands:
 ## *winrm quickconfig*
  ## *winrm p winrm/config/service @ \{AllowUnencrypted="true"\}*
  ## *winrm p winrm/config/service @\{AllowUnencrypted="true"\}*
 ## *winrm p winrm/config/service/auth @\{Basic="true"\}*
 ## *winrm p winrm/config/client @\{AllowUnencrypted="true"\}*
 ## *winrm p winrm/config/client/auth @\{Basic="true"\}*
  
  
 h3. &nbsp;
  
 {div:style=padding:3px;background-color:#EEEEEE; layer-background-color:#EEEEEE}
  
 h3. {color:#00549f}Uninstall{color}
  
 {div}
  
 h4. *XenServer-CIM Interface Uninstall Process*
  
 # To uninstall the XenServer-CIM and WSMAN providers
 ## *bash ./uninstall.sh*
 ### If an ISO image is added to the ISO storage repository, answer the prompt to delete the 'XenServer Internal ISO library'
 ### If confirmed, the script deletes the hidden internal ISO storage repository created during install. All ISO images added into this storage repository will be deleted.
  
 h4. *Project Kensho OVF Tool Uninstall Process*
  
 # To uninstall Project Kensho OVF Tool:
 ## Open Add / Remove Programs (or Programs)
 ## Select the Project Kensho OVF Tool
 ## Select Remove
  
 h3. &nbsp;
  
 {div:style=padding:3px;background-color:#EEEEEE; layer-background-color:#EEEEEE}
  
 h3. {color:#00549f}Project Kensho Administration{color}
  
 {div}
 This section covers general administration and use of the XenServer CIM interface for XenServer™ and the Project Kensho OVF Tool.
  
 h4. *XenServer-CIM Interface*
  
 Once installed, the XenServer-CIM interface requires no administration. Documentation is provided within the distribution that further describes using the interface and its options.
  
 h4. *Project Kensho OVF Tool*
  
 The Project Kensho OVF Tool is the primary utility to create and consume OVF virtual appliances. When starting the utility, an initialization process occurs. This process gathers all of the library and server information from the systems defined by the user. In some scenarios, initialization may take up to 60 seconds or more to collect all data.
  
 !image1.jpg!
 {color:#4f81bd}*Figure 1 \- Initializing Indicator*{color}
  
 After completing initialization, the main UI appears
  
 !image2.jpg!
 {color:#4f81bd}*Figure 2 \- Project Kensho OVF Tool*{color}
  
 h4. *Adding virtual machine Host(s) and OVF Library Resources:*
 To begin using the utility, it is necessary to add at least one virtual machine host and an OVF Library. To add a virtual machine host or Library share:
  
 1.&nbsp;&nbsp; From the menu bar, select *File > Add Server*. Alternatively, pressing the hotkey combination *Alt \+A* or clicking the Add Server icon !addhost_16.jpg! on the toolbar invokes the Add Server configuration window.
  
 2.&nbsp;&nbsp; Select the platform type from the drop down menu:
  
 | !image3.jpg! | * *For a Library* :
 *# Enter the server name (or IP address)
 *# Enter the share name (without slashes or subfolders)
 *# Enter the username and password
 *# Click *Add* . |
 | {color:#4f81bd}*Figure 3 \- Adding a Library Server*{color} |
 | !image4.jpg! | * *For a virtual machine host:*
 *# Enter the server name (or IP address)
 *# Select the Host server protocol: Unsecure or Secure (HTTP/HTTPS)
 *# Enter the username and password
 *# Click *Add* |
 | {color:#4f81bd}*Figure 4 \- Adding a XenServer™ Host*{color} |
  
 3. &nbsp;The window will stay open after clicking the *Add* button. Repeat this process for each hypervisor and or library the Project Kensho OVF Tool will manage. Click the *Close* button when finished adding all servers.
 {info:title=Note}
 When adding a Hyper V server the account used must be a member of the local Hyper-V host administrators group.
 {info}
  
 h4. *Creating a Virtual Appliance*
 After configuring a library and virtual machine host(s), the Project Kensho OVF Tool is ready to create a virtual appliance from one or more virtual machines. The virtual appliance will become an OVF package. The virtual appliance is exported from either a XenServer™ or Hyper-V host.
  
 To export a virtual machine as an OVF virtual appliance, follow these easy steps:
  
 1.&nbsp;&nbsp; Select the Export Tab
  
 !image5.jpg!
 {color:#4f81bd}*Figure 5 \- Export Tab*{color}
  
 2.&nbsp;&nbsp; Select the target library share from the Library tree view. This is where the OVF and associated VHD(s) will reside after export.
  
 3.&nbsp;&nbsp; From the tree view, expand the list of virtual machines under each virtual machine host.
  
 4.&nbsp;&nbsp; Select a virtual machine with a single click. This will place its qualified name into the _Selected vMachine(s)_ list box. To remove the selection, double click the selection.
 {note:title=Be Aware}
 There is no limit to the number of virtual machines to select for export. The more virtual machines selected, the longer the export will take and require more storage on the Library server. The amount of time to export per virtual machine is dependent on the virtual disk size, type, and network bandwidth between the virtual machine host and the library server.
 {note}
 5.&nbsp;&nbsp; Click the Export button to begin. The result will be the OVF virtual appliance package containing the virtual machine(s) selected. It is important to enusre that the OVF package is tested before assuming it is good. The next section describes the import process.
  
  
 h4. *Consuming a Virtual Appliance*
 The Project Kensho OVF Tool can consume any DMTF compliant OVF file that contains virtual machine disk(s) in the VHD or VMDK format. The virtual appliance is imported into either a XenServer™ or Hyper-V host.
  
 To import an OVF virtual appliance, follow these easy steps:
  
 1.&nbsp;&nbsp; Select the Import Tab.
  
 !image6.jpg!
 {color:#4f81bd}*Figure 6 \- Import Tab{color}
  
 2.&nbsp;&nbsp; Select the target virtual machine host or hosts from the respective Host type tree view.
  
 3.&nbsp;&nbsp; From the Kensho Library tree view, select an OVF virtual appliance.
 {info:title=Note}
 OVA packages must be converted to OVF prior to Import. Please see: Converting an OVF package to an OVA for more information.
 {info}
  
 4.&nbsp;&nbsp; If a virtual machine to host resource mapping is required - it is noted in the Mapping status field as Mapping: Required.
  
 5.&nbsp;&nbsp; Click the Mapping wizard button !newvirtualnetwork_32.jpg! in the Tool bar to map virtual machine to host resources.
  
 6.&nbsp;&nbsp; Click the *Import* or *Force* button to begin the import.
 {info:title=Note}
 The button will display *Force* if mapping is either incomplete or non-existent.
 {info}
 During a forced import devices are attached in a first found fashion. I.E. if the OVF has a network device defined on the VM an attempt will be made to attach that network to the first virtual network switch listed on the target host.
  
  
 h4. *Advanced Packaging Capabilities*
 New to the Project Kensho 1.3 OVF Tool is support for a wide range of OVF virtual appliance packaging options. When selecting one or more VMs to export as a virtual appliance, the utility presents the following options:
  
 !image7.jpg!
 {color:#4f81bd}*Figure 7 \- Export Options*{color}
  
 Each option is unique and may be applied to any virtual appliance export. Selecting a check box enables the feature. Some features, like security options, require user input.
  
 * *Create OVA Package*
 Selecting this option allows the user to create an OVA package. An OVA package is an archive containing OVF metadata, virtual disks, manifest and certificates in a single file. This feature is useful for scenarios where a single file containing all the necessary virtual machine components is desired. This option produces a file with an .ova extension. If a file inside of the OVF package is greater than 8 GB, the operation to create the OVA will fail.
  
 * *Compress OVA Package*
 Selecting this option allows the user to compress the entire OVA package. To enable this option, the user must select the Create OVA Package option. This option is useful when the user seeks to reduce the overall file size of the of the OVA package. This option produces a file with the .ova.gz extension.
  
 * *Compress OVF Files Individually*
 Selecting this option allows the user to compress the individual files within the OVA package. This differs from the option above in that each file within the OVA package is compressed. Selecting this option allows the user to achieve maximum compression of an OVA file. This option produces files within the OVA package with the .gz extension. The OVA package will have the .ova extension.
  
 * *Add Manifest*
 Selecting this option instructs the Project Kensho OVF Tool to create a manifest file referencing the OVF files and their checksum. This option is useful when a user seeks improved reliability of the content. This option produces a file with the .mf extension.
  
 * *Encrypt Attached Files*
 Selecting this option allows the user to encrypt the OVF related files. When selecting this option, the user must enter a passphrase. This option is useful when protecting appliance content is required.
  
 * *Sign OVF Package*
 Selecting this option allows the user to digitally sign the OVF file with a certificate. This option is useful in providing security against unauthorized changes to the OVF file content.
  
 * *Include EULA(s)*
 Selecting this option allows the user to create a virtual appliance with an End User License Agreement (EULA). This feature is useful when a virtual appliance requires end user agreement to a EULA before the virtual appliance installs on the target hypervisor. To add a EULA follow these directions:
  
 1.&nbsp;&nbsp; Click the Add EULA button
  
 2.&nbsp;&nbsp; Browse to the desired text file containing the EULA text.
  
 {info:title=Note}
 The EULA must be a plain text file and cannot contain any formatting (such as HTML tags) or special characters.
 {info}
  
 3.&nbsp;&nbsp; Select the EULA text file.
  
 4.&nbsp;&nbsp; Click Open
  
 * *Export Metadata Only*
 Selecting this option allows the user to create an OVF without any virtual disk(s). This is useful when the user needs an OVF without virtual disk information.
  
  
 h4. *Advanced Import Capabilities*
 New to the Project Kensho 1.3 OVF Tool is support for a range of OVF virtual appliance import options. When selecting one or more OVF virtual appliances to import, the utility presents the following options:
  
 !image8.jpg!
 {color:#4f81bd}*Figure 8 \- Import Options*{color}
  
 * *Verify Digital Signature*
 Selecting this option forces the import process to verify the digital signature that was used to sign the OVF during export. If the verification fails, this typically indicates that the OVF has been tampered with.
  
 * *Verify Manifest Content*
 Selecting this option forces the import process to verify that the content of the manifest file matches what is in the OVF package. If this verification fails, it typically indicates that files are missing.
  
 * *Validate OVF Package*
 Selecting this option forces the import process to validate the selected OVF file against the DMTF OVF 1.0.0 schema. This is useful to determine the compatibility of an OVF file.
  
 * *Import Metadata Only*
 Selecting this option imports the metadata only. This is useful if configuration content is all that is needed. The virtual machine content will be created from a template or an existing virtual disk will be attached after import.
  
 * *Run Operating System Fixups*
 Selecting this option runs automated scripts against the imported VMware based virtual appliance. This is necessary to ensure the VM boots properly. Select this option for Windows or Linux virtual machines imported from VMware sources. Fixup of virtual machines with more than two virtual disks is unsupported.
  
  
 h4. *VM to Host Resource Mapping Wizard*
  
 The Project Kensho OVF Tool allows users to map system, storage, and networking resources defined in the OVF virtual appliance to the resources on the virtual machine host(s). This ensures that prior to import, the proper resources are paired and the virtual machine can power on minimizing administrative tasks.
  
 Mapping is performed by selecting items (one or more) in the left column of the Mapping dialog and then selecting a target device in the right
  
 The padlock icon !image007.jpg! depicts that a mapping of a VM device to Host resource has been set. Individual mappings may be cleared by selecting and clearing the lock icon.
  
 An existing OVF to Host resource mapping may be cleared by clicking the *Clear* button on the Import tab.
  
 1.&nbsp;&nbsp; Begin the resource mapping process by Clicking the Mapping button !newvirtualnetwork_32.jpg! in the Tool bar
  
 2.&nbsp;&nbsp; The mapping wizard launches and presents the Systems tab (this is the target Host for a VM workload).
  
 !image9.jpg!
 {color:#4f81bd}*Figure 9 \- Unmapped VM CPU and memory workload*{color}
  
 3.&nbsp;&nbsp;Select the desired host resource in the right pane
  
 4.&nbsp;&nbsp;Select a VM resource(s) in the left pane
  
 !image10.jpg!
 {color:#4f81bd}8Figure 10 \- VM CPU and memory workload mapped Host*{color}
  
 5.&nbsp;&nbsp;Click the *Next* button to map the Network resources.
  
 !image11.jpg!
 {color:#4f81bd}*Figure 11 \- Mapped VM Network Device to Hypervisor Network Device{color}
  
 6.&nbsp;&nbsp; Select the desired host resource in the right pane
  
 7.&nbsp;&nbsp; Select a VM resource(s) in the left pane
  
 8.&nbsp;&nbsp; Click the *Next* button to map the Storage resources
  
 !image12.jpg!
 {color:#4f81bd}*Figure 12 \- Mapped VM Storage to Hypervisor Storage*{color}
  
 9. &nbsp;&nbsp; Select the desired host resource in the right pane
  
 10.&nbsp;&nbsp; Select a VM resource(s) in the left pane
  
 11. &nbsp; Click *Done* to complete the wizard, save the mapping, and return to the Import screen.
  
 h4. *Converting an OVF package to an OVA and vice versa*
 The Project Kensho OVF Tool facilitates the conversion of any DMTF compliant OVF export to a single OVA file.
  
 To convert an OVF with the Project Kensho OVF Tool:
  
 1.&nbsp;&nbsp; Select the Import Tab
  
 !image13.jpg!
 {color:#4f81bd}*Figure 13 \- OVA Menu*{color}
  
 2.&nbsp;&nbsp; From the Kensho Library, select an OVF.
  
 3.&nbsp;&nbsp; Right click the OVF and Select 'Convert to OVA'
  
 4.&nbsp;&nbsp; The reverse process is used to convert an OVA into an OVF.
  
 {info:title=Note}
 The OVF icon !image013.jpg|width=26,height=26! depicts a folder that includes the OVF package configuration and associated file.
 The OVA icon !image014.jpg|width=26,height=26! indicates an OVF package that has been compressed, using tar format, into a single file with the extension .OVA
 The X icon !error_16.jpg|width=22,height=22! indicates an OVF package that is not compliant with the DMTF Standards.
 {info}
  
 h4. *Environment Tab*
 The environment tab is a read-only view of the virtual machine host resources and environment.
 !image14.jpg!
 {color:#4f81bd}*Figure 14 \- Environment Tab*{color}
  
 h3. {color:#00549f}VMware OVF Support{color}
  
 The Project Kensho OVF Tool facilitates importing VMware derived OVF content directly into a XenServer Storage Repository in the same manner as importing a XenConvert or Project Kensho produced OVF.
  
 It is important to note that not all VMware OVF content is equal. VMware OVF content produced through the latest VMware utilities will result in a higher degree of import success. The following VMware OVF content has been successfully tested:
  
 * vSphere 4
 * Virtual Infrastructure 3
 * VMware OVF Tool 0.9
 * VMware OVF Tool 1.0
 * VMware Studio 1.0
 * VMware Workstation 6.5.3
 * VMware Converter 4.0.x
 * VMware Converter 3.0.3
  
  
 h3.{color:#00549f}Snapshot Support{color}
  
 The Project Kensho OVF Tool now supports creating virtual appliances from virtual machines with snapshots. Both XenServer 5.5 and Hyper-V support virtual machine snapshots.
  
 When creating an OVF virtual appliance from a virtual machine with a snapshot, the current running state of the virtual machine is what the tool creates as a virtual appliance. This can also be described as the state that is experienced when the virtual machine is powered on.
  
 If a virtual machine contains multiple snapshots, only the current running state of the virtual machine is exported. No snapshot history or detail is exported as part of the virtual appliance