<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Updated Citrix XenServer 5.5 Automatic VM Backup Scripts</title>
	<atom:link href="http://blog.andyburton.co.uk/index.php/2009-11/updated-citrix-xenserver-5-5-automatic-vm-backup-scripts/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.andyburton.co.uk/index.php/2009-11/updated-citrix-xenserver-5-5-automatic-vm-backup-scripts/</link>
	<description>PHP &#38; MySQL Development, Servers and Virtualisation</description>
	<lastBuildDate>Tue, 04 Oct 2011 23:41:29 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
	<item>
		<title>By: Tatsuya(from JAPAN)</title>
		<link>http://blog.andyburton.co.uk/index.php/2009-11/updated-citrix-xenserver-5-5-automatic-vm-backup-scripts/comment-page-2/#comment-6539</link>
		<dc:creator>Tatsuya(from JAPAN)</dc:creator>
		<pubDate>Thu, 07 Jul 2011 02:13:14 +0000</pubDate>
		<guid isPermaLink="false">http://blog.andyburton.co.uk/?p=40#comment-6539</guid>
		<description>Hi !
Our environment is using the following systems.
-LVM by iSCSI (Storage :HP LefthandP4300).
-Xen Server 5.5.0 Update 2.

We have executed the following shell a few times.
-vm_backup.sh

Then We checked the usage of storage and vm_backup.log.
So, the usage of storage was full, and we checked the error message(insufficient space) on vm_backup.log.  
But, we could not delete VDI and checked the following error.
-Error: The VDI is not available
I’d like to reduce the usage of storage.
If you know, please tell me how to delete command or deal with it.</description>
		<content:encoded><![CDATA[<p>Hi !<br />
Our environment is using the following systems.<br />
-LVM by iSCSI (Storage :HP LefthandP4300).<br />
-Xen Server 5.5.0 Update 2.</p>
<p>We have executed the following shell a few times.<br />
-vm_backup.sh</p>
<p>Then We checked the usage of storage and vm_backup.log.<br />
So, the usage of storage was full, and we checked the error message(insufficient space) on vm_backup.log.<br />
But, we could not delete VDI and checked the following error.<br />
-Error: The VDI is not available<br />
I’d like to reduce the usage of storage.<br />
If you know, please tell me how to delete command or deal with it.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jeremy Longo</title>
		<link>http://blog.andyburton.co.uk/index.php/2009-11/updated-citrix-xenserver-5-5-automatic-vm-backup-scripts/comment-page-2/#comment-6472</link>
		<dc:creator>Jeremy Longo</dc:creator>
		<pubDate>Thu, 30 Jun 2011 21:17:55 +0000</pubDate>
		<guid isPermaLink="false">http://blog.andyburton.co.uk/?p=40#comment-6472</guid>
		<description>Hi Andy,
Just a suggestion;
Having a lot of space on local disk, I use your script to make a daily local backup, and local+remote backup once a week. However, I wanted each server to backup it&#039;s own vms.
I added to vm_backup.lib the method &quot;local&quot;, to backup all vms hosted on the current server, instead of all pool&#039;s vms :

in vm_backup.sh :

        &quot;local&quot;)
                if [ $vm_log_enabled ]; then
                        log_message &quot;Backup All local VMs&quot;
                fi
                set_all_local_vms
                ;;


in vm_backup.lib :

function get_all_local_vms
{
        if [ $vm_log_enabled ]; then
                log_message &quot;Get all local VMs&quot;
        fi

        xenhostname=`hostname`
        xenhost=`xe host-list hostname=$xenhostname`
        xenuuid=`echo &quot;$xenhost&quot; &#124; grep ^uuid &#124; awk &#039;{print $NF}&#039;`

        echo=`xe vm-list is-control-domain=false resident-on=$xenuuid 2&gt;&gt;$log_path`

        if [ $? -ne 0 ]; then
                return 1
        fi

        echo &quot;$echo&quot; &#124; grep &quot;uuid&quot; &#124; awk &#039;{print $NF}&#039;
        return 0
}

function set_all_local_vms
{
        if [ $vm_log_enabled ]; then
                log_message &quot;Set all VMs&quot;
        fi

        reset_backup_list

        all_vms=`get_all_local_vms`

        if [ $? -ne 0 ]; then
                if [ $vm_log_enabled ]; then
                        log_message &quot;get_all_local_vms failed: $all_vms&quot;
                fi
                return 1
        fi

        for uuid in $all_vms; do
                add_to_backup_list $uuid
        done

        return 0
}</description>
		<content:encoded><![CDATA[<p>Hi Andy,<br />
Just a suggestion;<br />
Having a lot of space on local disk, I use your script to make a daily local backup, and local+remote backup once a week. However, I wanted each server to backup it&#8217;s own vms.<br />
I added to vm_backup.lib the method &#8220;local&#8221;, to backup all vms hosted on the current server, instead of all pool&#8217;s vms :</p>
<p>in vm_backup.sh :</p>
<p>        &#8220;local&#8221;)<br />
                if [ $vm_log_enabled ]; then<br />
                        log_message &#8220;Backup All local VMs&#8221;<br />
                fi<br />
                set_all_local_vms<br />
                ;;</p>
<p>in vm_backup.lib :</p>
<p>function get_all_local_vms<br />
{<br />
        if [ $vm_log_enabled ]; then<br />
                log_message &#8220;Get all local VMs&#8221;<br />
        fi</p>
<p>        xenhostname=`hostname`<br />
        xenhost=`xe host-list hostname=$xenhostname`<br />
        xenuuid=`echo &#8220;$xenhost&#8221; | grep ^uuid | awk &#8216;{print $NF}&#8217;`</p>
<p>        echo=`xe vm-list is-control-domain=false resident-on=$xenuuid 2&gt;&gt;$log_path`</p>
<p>        if [ $? -ne 0 ]; then<br />
                return 1<br />
        fi</p>
<p>        echo &#8220;$echo&#8221; | grep &#8220;uuid&#8221; | awk &#8216;{print $NF}&#8217;<br />
        return 0<br />
}</p>
<p>function set_all_local_vms<br />
{<br />
        if [ $vm_log_enabled ]; then<br />
                log_message &#8220;Set all VMs&#8221;<br />
        fi</p>
<p>        reset_backup_list</p>
<p>        all_vms=`get_all_local_vms`</p>
<p>        if [ $? -ne 0 ]; then<br />
                if [ $vm_log_enabled ]; then<br />
                        log_message &#8220;get_all_local_vms failed: $all_vms&#8221;<br />
                fi<br />
                return 1<br />
        fi</p>
<p>        for uuid in $all_vms; do<br />
                add_to_backup_list $uuid<br />
        done</p>
<p>        return 0<br />
}</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: dude</title>
		<link>http://blog.andyburton.co.uk/index.php/2009-11/updated-citrix-xenserver-5-5-automatic-vm-backup-scripts/comment-page-2/#comment-6362</link>
		<dc:creator>dude</dc:creator>
		<pubDate>Mon, 20 Jun 2011 20:26:39 +0000</pubDate>
		<guid isPermaLink="false">http://blog.andyburton.co.uk/?p=40#comment-6362</guid>
		<description>YOU ROCK! YOUR SCRIPT ROCKS! THATS WHY I BLOGGED ABOUT IT :) http://www.andy-burton.co.uk/blog/index.php/2009-11/updated-citrix-xenserver-5-5-automatic-vm-backup-scripts/

giving your site higher google ranking. yeeeha!</description>
		<content:encoded><![CDATA[<p>YOU ROCK! YOUR SCRIPT ROCKS! THATS WHY I BLOGGED ABOUT IT <img src='http://blog.andyburton.co.uk/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  <a href="http://www.andy-burton.co.uk/blog/index.php/2009-11/updated-citrix-xenserver-5-5-automatic-vm-backup-scripts/" rel="nofollow">http://www.andy-burton.co.uk/blog/index.php/2009-11/updated-citrix-xenserver-5-5-automatic-vm-backup-scripts/</a></p>
<p>giving your site higher google ranking. yeeeha!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: XEN LIVE BACKUP OF RUNNING VMS MADE EASY AND FREE! THANK YOU ANDY BURTON! &#171; dwave&#039;s blogg</title>
		<link>http://blog.andyburton.co.uk/index.php/2009-11/updated-citrix-xenserver-5-5-automatic-vm-backup-scripts/comment-page-2/#comment-6361</link>
		<dc:creator>XEN LIVE BACKUP OF RUNNING VMS MADE EASY AND FREE! THANK YOU ANDY BURTON! &#171; dwave&#039;s blogg</dc:creator>
		<pubDate>Mon, 20 Jun 2011 20:25:54 +0000</pubDate>
		<guid isPermaLink="false">http://blog.andyburton.co.uk/?p=40#comment-6361</guid>
		<description>[...] http://www.andy-burton.co.uk/blog/index.php/2009-11/updated-citrix-xenserver-5-5-automatic-vm-backup... [...]</description>
		<content:encoded><![CDATA[<p>[...] <a href="http://www.andy-burton.co.uk/blog/index.php/2009-11/updated-citrix-xenserver-5-5-automatic-vm-backup.." rel="nofollow">http://www.andy-burton.co.uk/blog/index.php/2009-11/updated-citrix-xenserver-5-5-automatic-vm-backup..</a>. [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Trevor</title>
		<link>http://blog.andyburton.co.uk/index.php/2009-11/updated-citrix-xenserver-5-5-automatic-vm-backup-scripts/comment-page-2/#comment-5960</link>
		<dc:creator>Trevor</dc:creator>
		<pubDate>Mon, 09 May 2011 15:11:47 +0000</pubDate>
		<guid isPermaLink="false">http://blog.andyburton.co.uk/?p=40#comment-5960</guid>
		<description>Hi Andy,

Brilliant script and solution to the back up issues with XenServer and VMs.

Is there a way to backup onto a external HDD using this script? I&#039;m not too sure what would need changing in the script to allow this.

Thanks in advance.

Trev.</description>
		<content:encoded><![CDATA[<p>Hi Andy,</p>
<p>Brilliant script and solution to the back up issues with XenServer and VMs.</p>
<p>Is there a way to backup onto a external HDD using this script? I&#8217;m not too sure what would need changing in the script to allow this.</p>
<p>Thanks in advance.</p>
<p>Trev.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kevin B</title>
		<link>http://blog.andyburton.co.uk/index.php/2009-11/updated-citrix-xenserver-5-5-automatic-vm-backup-scripts/comment-page-2/#comment-5256</link>
		<dc:creator>Kevin B</dc:creator>
		<pubDate>Thu, 31 Mar 2011 13:56:45 +0000</pubDate>
		<guid isPermaLink="false">http://blog.andyburton.co.uk/?p=40#comment-5256</guid>
		<description>Dear Andy,

Thanks for this nice script, we have this running now on our development envirionment and works really good!

One question, we currenly have one VM with multiple Virtual Disks attached (for example C:\ and D:\). Is it possible to backup this VM and only his C:\ Disk?. We use our D:\ disk for data (400+ GB) and we won&#039;t like to have these in our snapshots.

Thanks!</description>
		<content:encoded><![CDATA[<p>Dear Andy,</p>
<p>Thanks for this nice script, we have this running now on our development envirionment and works really good!</p>
<p>One question, we currenly have one VM with multiple Virtual Disks attached (for example C:\ and D:\). Is it possible to backup this VM and only his C:\ Disk?. We use our D:\ disk for data (400+ GB) and we won&#8217;t like to have these in our snapshots.</p>
<p>Thanks!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nicholas Mann</title>
		<link>http://blog.andyburton.co.uk/index.php/2009-11/updated-citrix-xenserver-5-5-automatic-vm-backup-scripts/comment-page-2/#comment-4289</link>
		<dc:creator>Nicholas Mann</dc:creator>
		<pubDate>Thu, 03 Mar 2011 08:01:31 +0000</pubDate>
		<guid isPermaLink="false">http://blog.andyburton.co.uk/?p=40#comment-4289</guid>
		<description>Andy,

As everyone else has said, great script! It&#039;s saved me a lot of reading and writing of code. One thing that I have noticed however is that if you use colons in you VM Labels, then the script won&#039;t translate them into something that won&#039;t break Windows file naming rules. Perhaps I shouldn&#039;t be using colons in VM Labels! But as it is I am.

Simple tweak - pipe in another tr!

        # The following line has been edited by NRM to enable colons(:) to be
        # used in VM Labels, without breaking Windows file name rules.
        # echo &quot;$echo&quot; &#124; tr &#039; &#039; _ &#124; tr -d &#039;(&#039; &#124; tr -d &#039;)&#039;
        echo &quot;$echo&quot; &#124; tr &#039; &#039; _ &#124; tr &#039;:&#039; &#039; - &#039; &#124; tr -d &#039;(&#039; &#124; tr -d &#039;)&#039;

Nick</description>
		<content:encoded><![CDATA[<p>Andy,</p>
<p>As everyone else has said, great script! It&#8217;s saved me a lot of reading and writing of code. One thing that I have noticed however is that if you use colons in you VM Labels, then the script won&#8217;t translate them into something that won&#8217;t break Windows file naming rules. Perhaps I shouldn&#8217;t be using colons in VM Labels! But as it is I am.</p>
<p>Simple tweak &#8211; pipe in another tr!</p>
<p>        # The following line has been edited by NRM to enable colons(:) to be<br />
        # used in VM Labels, without breaking Windows file name rules.<br />
        # echo &#8220;$echo&#8221; | tr &#8216; &#8216; _ | tr -d &#8216;(&#8216; | tr -d &#8216;)&#8217;<br />
        echo &#8220;$echo&#8221; | tr &#8216; &#8216; _ | tr &#8216;:&#8217; &#8216; &#8211; &#8216; | tr -d &#8216;(&#8216; | tr -d &#8216;)&#8217;</p>
<p>Nick</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sugik</title>
		<link>http://blog.andyburton.co.uk/index.php/2009-11/updated-citrix-xenserver-5-5-automatic-vm-backup-scripts/comment-page-2/#comment-3493</link>
		<dc:creator>Sugik</dc:creator>
		<pubDate>Fri, 11 Feb 2011 03:56:47 +0000</pubDate>
		<guid isPermaLink="false">http://blog.andyburton.co.uk/?p=40#comment-3493</guid>
		<description>Hi Andy…

your scripts running good on my citrix.

i have little question.

when i try to import xva as a “new” VM why ip configuration is back to default with no IP(s)?
is there no change to include the IP in the snapshot?</description>
		<content:encoded><![CDATA[<p>Hi Andy…</p>
<p>your scripts running good on my citrix.</p>
<p>i have little question.</p>
<p>when i try to import xva as a “new” VM why ip configuration is back to default with no IP(s)?<br />
is there no change to include the IP in the snapshot?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tony Corley</title>
		<link>http://blog.andyburton.co.uk/index.php/2009-11/updated-citrix-xenserver-5-5-automatic-vm-backup-scripts/comment-page-2/#comment-3448</link>
		<dc:creator>Tony Corley</dc:creator>
		<pubDate>Mon, 07 Feb 2011 15:39:22 +0000</pubDate>
		<guid isPermaLink="false">http://blog.andyburton.co.uk/?p=40#comment-3448</guid>
		<description>I have run a number of scipts where certain xva run but don&#039;t seem to finish properley. I get the following in the vm_backup.log and just wondered if anyone else had encountered them..

[2011-02-03_12-19-39] Backup VM 7cb56118-3411-0d23-22e8-771357f1a88d
[2011-02-03_12-19-39] Get VM label 7cb56118-3411-0d23-22e8-771357f1a88d
[2011-02-03_12-19-40] get_vm_label succeeded: Copy_F_of_SAGESERV
[2011-02-03_12-19-41] Snapshotting VM 7cb56118-3411-0d23-22e8-771357f1a88d
[2011-02-03_12-19-43] Snapshot with quiesce 7cb56118-3411-0d23-22e8-771357f1a88d as Copy_F_of_SAGESERV_snapshot
Error code: VM_SNAPSHOT_FAILED
Error parameters: Quiesce snapshot not supported
[2011-02-03_12-19-45] Quiesce snapshot failed: 
[2011-02-03_12-19-45] Attempting normal snapshot
[2011-02-03_12-19-45] Snapshot 7cb56118-3411-0d23-22e8-771357f1a88d as Copy_F_of_SAGESERV_snapshot
[2011-02-03_12-20-52] snapshot_vm succeeded: e952e477-ec0c-a793-8482-86d88b972191
[2011-02-03_12-20-54] Remove template status e952e477-ec0c-a793-8482-86d88b972191
[2011-02-03_12-20-54] remove_template succeeded: 
[2011-02-03_12-20-54] Disable HA e952e477-ec0c-a793-8482-86d88b972191
[2011-02-03_12-20-54] disable_ha succeeded: 
[2011-02-03_12-20-54] Export VM e952e477-ec0c-a793-8482-86d88b972191 as Copy_F_of_SAGESERV-2011-02-03_04-00-24.xva
You gave an invalid object reference.  The object may have recently been deleted.  The class parameter gives the type of reference given, and the handle parameter echoes the bad value given.
class: task
handle: OpaqueRef:7f612a66-253b-e294-cdef-19dc862c58bf
[2011-02-04_12-47-31] export_vm failed: 
[2011-02-04_12-47-31] VM 7cb56118-3411-0d23-22e8-771357f1a88d backup failed</description>
		<content:encoded><![CDATA[<p>I have run a number of scipts where certain xva run but don&#8217;t seem to finish properley. I get the following in the vm_backup.log and just wondered if anyone else had encountered them..</p>
<p>[2011-02-03_12-19-39] Backup VM 7cb56118-3411-0d23-22e8-771357f1a88d<br />
[2011-02-03_12-19-39] Get VM label 7cb56118-3411-0d23-22e8-771357f1a88d<br />
[2011-02-03_12-19-40] get_vm_label succeeded: Copy_F_of_SAGESERV<br />
[2011-02-03_12-19-41] Snapshotting VM 7cb56118-3411-0d23-22e8-771357f1a88d<br />
[2011-02-03_12-19-43] Snapshot with quiesce 7cb56118-3411-0d23-22e8-771357f1a88d as Copy_F_of_SAGESERV_snapshot<br />
Error code: VM_SNAPSHOT_FAILED<br />
Error parameters: Quiesce snapshot not supported<br />
[2011-02-03_12-19-45] Quiesce snapshot failed:<br />
[2011-02-03_12-19-45] Attempting normal snapshot<br />
[2011-02-03_12-19-45] Snapshot 7cb56118-3411-0d23-22e8-771357f1a88d as Copy_F_of_SAGESERV_snapshot<br />
[2011-02-03_12-20-52] snapshot_vm succeeded: e952e477-ec0c-a793-8482-86d88b972191<br />
[2011-02-03_12-20-54] Remove template status e952e477-ec0c-a793-8482-86d88b972191<br />
[2011-02-03_12-20-54] remove_template succeeded:<br />
[2011-02-03_12-20-54] Disable HA e952e477-ec0c-a793-8482-86d88b972191<br />
[2011-02-03_12-20-54] disable_ha succeeded:<br />
[2011-02-03_12-20-54] Export VM e952e477-ec0c-a793-8482-86d88b972191 as Copy_F_of_SAGESERV-2011-02-03_04-00-24.xva<br />
You gave an invalid object reference.  The object may have recently been deleted.  The class parameter gives the type of reference given, and the handle parameter echoes the bad value given.<br />
class: task<br />
handle: OpaqueRef:7f612a66-253b-e294-cdef-19dc862c58bf<br />
[2011-02-04_12-47-31] export_vm failed:<br />
[2011-02-04_12-47-31] VM 7cb56118-3411-0d23-22e8-771357f1a88d backup failed</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tony Corley</title>
		<link>http://blog.andyburton.co.uk/index.php/2009-11/updated-citrix-xenserver-5-5-automatic-vm-backup-scripts/comment-page-2/#comment-3232</link>
		<dc:creator>Tony Corley</dc:creator>
		<pubDate>Mon, 24 Jan 2011 16:06:43 +0000</pubDate>
		<guid isPermaLink="false">http://blog.andyburton.co.uk/?p=40#comment-3232</guid>
		<description>As with some of your ealier posters, I have found the scripts excellent and very straightforward to configure. The deletion of the snapshots is very useful, but as other correspondents, I am still left with orphaned base copy VDIs taking up space on the SR. Admittly the amount of space is not that much, but if I were using it in a production enviroment, which I will be, I would need to factor in a coalesce-leaf command to clear out the base copies after each backup. My assumption is that in doing so, one no longer has the problem from chains of snapshots. 

Coalesce-leaf is a somewhat cumbersome tool, not least in that when you enter the uuid for the VM, it must be entered in full and can not be tab completed. It also requires that the VM be suspended. Not all SRs support this, some Linux boxes, particularly those without PV drivers, won&#039;t do it, and on some machines, the suspend and resume proceedure can take up to 25 minutes. In certain circumstances, it is easier to write a script which shutsdown the VM out of office hours, allowing the tool to do its thing, and then restarts it.

I plan to combine the scripts with automated coalesce-leaf scripts so that when a particular VM has been copied over, the second one is used to reclaim the space. My main production Hypervisors suspend and resume quite quickly, so I hope to get it working well there. Again many thanks,
Tony Corley.</description>
		<content:encoded><![CDATA[<p>As with some of your ealier posters, I have found the scripts excellent and very straightforward to configure. The deletion of the snapshots is very useful, but as other correspondents, I am still left with orphaned base copy VDIs taking up space on the SR. Admittly the amount of space is not that much, but if I were using it in a production enviroment, which I will be, I would need to factor in a coalesce-leaf command to clear out the base copies after each backup. My assumption is that in doing so, one no longer has the problem from chains of snapshots. </p>
<p>Coalesce-leaf is a somewhat cumbersome tool, not least in that when you enter the uuid for the VM, it must be entered in full and can not be tab completed. It also requires that the VM be suspended. Not all SRs support this, some Linux boxes, particularly those without PV drivers, won&#8217;t do it, and on some machines, the suspend and resume proceedure can take up to 25 minutes. In certain circumstances, it is easier to write a script which shutsdown the VM out of office hours, allowing the tool to do its thing, and then restarts it.</p>
<p>I plan to combine the scripts with automated coalesce-leaf scripts so that when a particular VM has been copied over, the second one is used to reclaim the space. My main production Hypervisors suspend and resume quite quickly, so I hope to get it working well there. Again many thanks,<br />
Tony Corley.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

