<?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: PowerCLI: A Simple VM Backup Script</title>
	<atom:link href="http://www.simonlong.co.uk/blog/2010/05/05/powercli-a-simple-vm-backup-script/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.simonlong.co.uk/blog/2010/05/05/powercli-a-simple-vm-backup-script/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=rss</link>
	<description></description>
	<lastBuildDate>Thu, 09 Jun 2011 01:25:00 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=</generator>
	<item>
		<title>By: Mzigadlo</title>
		<link>http://www.simonlong.co.uk/blog/2010/05/05/powercli-a-simple-vm-backup-script/comment-page-1/#comment-643</link>
		<dc:creator>Mzigadlo</dc:creator>
		<pubDate>Sun, 22 May 2011 18:26:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.simonlong.co.uk/blog/?p=2494#comment-643</guid>
		<description>I have been using a copy of this script for over a year and it has been working great as a poor man&#039;s backup solution.  I backup over 27TB of data in less than 24 hours!

I was going to write a cleanup script to prune some of my older backups, but I was wondering if I could use something like the -force option when invoking clonevm so that the older files are overwritten in stead of appending with an underscore and a number.

Any ideas on how to overwirte old files using this process?

-Mark </description>
		<content:encoded><![CDATA[<p>I have been using a copy of this script for over a year and it has been working great as a poor man&#8217;s backup solution.  I backup over 27TB of data in less than 24 hours!</p>
<p>I was going to write a cleanup script to prune some of my older backups, but I was wondering if I could use something like the -force option when invoking clonevm so that the older files are overwritten in stead of appending with an underscore and a number.</p>
<p>Any ideas on how to overwirte old files using this process?</p>
<p>-Mark </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sean Crosby</title>
		<link>http://www.simonlong.co.uk/blog/2010/05/05/powercli-a-simple-vm-backup-script/comment-page-1/#comment-627</link>
		<dc:creator>Sean Crosby</dc:creator>
		<pubDate>Thu, 28 Apr 2011 12:13:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.simonlong.co.uk/blog/?p=2494#comment-627</guid>
		<description>I am trying to test out this script. I have a host that I set up with similar info that you have in your test. I keep getting errors. It does seem to create the snapshot but everything else seems to fail. The mail feature also works. Here are my errors:

Get-VM : Cannot validate argument on parameter &#039;Name&#039;. The argument is null or empty. Supply an argument that is not nu
ll or empty and then try the command again.
At C:scriptsorig_backupScript.ps1:15 char:17
+     $vm = Get-VM &lt;&lt;&lt;&lt;  $customer.MasterVM
    + CategoryInfo          : InvalidData: (:) [Get-VM], ParameterBindingValidationException
    + FullyQualifiedErrorId : ParameterArgumentValidationError,VMware.VimAutomation.ViCore.Cmdlets.Commands.GetVM

Get-Datastore : Cannot validate argument on parameter &#039;Name&#039;. The argument is null or empty. Supply an argument that is
 not null or empty and then try the command again.
At C:scriptsorig_backupScript.ps1:35 char:57
+     $cloneSpec.Location.Datastore = (Get-Datastore -Name &lt;&lt;&lt;&lt;  $BackupDS &#124; Get-View).MoRef
    + CategoryInfo          : InvalidData: (:) [Get-Datastore], ParameterBindingValidationException
    + FullyQualifiedErrorId : ParameterArgumentValidationError,VMware.VimAutomation.ViCore.Cmdlets.Commands.GetDatasto
   re

Exception calling &quot;CloneVM&quot; with &quot;3&quot; argument(s): &quot;The operation is not supported on the object.&quot;
At C:scriptsorig_backupScript.ps1:41 char:20
+     $vmView.CloneVM &lt;&lt;&lt;&lt; ( $cloneFolder, $cloneName, $cloneSpec )
    + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
    + FullyQualifiedErrorId : DotNetMethodException

Get-VM : 4/28/2011 8:09:19 AM    Get-VM        VM with name &#039;MasterVM-20110428&#039; was not found, using the specified filt
er(s).
At C:scriptsorig_backupScript.ps1:44 char:11
+     Get-VM &lt;&lt;&lt;&lt;  $cloneName
    + CategoryInfo          : ObjectNotFound: (:) [Get-VM], VimException
    + FullyQualifiedErrorId : Core_OutputHelper_WriteNotFoundError,VMware.VimAutomation.ViCore.Cmdlets.Commands.GetVM

Get-VM : Cannot validate argument on parameter &#039;Name&#039;. The argument is null or empty. Supply an argument that is not nu
ll or empty and then try the command again.
At C:scriptsorig_backupScript.ps1:47 char:35
+     Get-Snapshot -VM (Get-VM -Name &lt;&lt;&lt;&lt;  $customerMasterVM) -Name $cloneSnap &#124; Remove-Snapshot -confirm:$False
    + CategoryInfo          : InvalidData: (:) [Get-VM], ParameterBindingValidationException
    + FullyQualifiedErrorId : ParameterArgumentValidationError,VMware.VimAutomation.ViCore.Cmdlets.Commands.GetVM

</description>
		<content:encoded><![CDATA[<p>I am trying to test out this script. I have a host that I set up with similar info that you have in your test. I keep getting errors. It does seem to create the snapshot but everything else seems to fail. The mail feature also works. Here are my errors:</p>
<p>Get-VM : Cannot validate argument on parameter &#8216;Name&#8217;. The argument is null or empty. Supply an argument that is not nu<br />
ll or empty and then try the command again.<br />
At C:scriptsorig_backupScript.ps1:15 char:17<br />
+     $vm = Get-VM &lt;&lt;&lt;&lt;  $customer.MasterVM<br />
    + CategoryInfo          : InvalidData: (:) [Get-VM], ParameterBindingValidationException<br />
    + FullyQualifiedErrorId : ParameterArgumentValidationError,VMware.VimAutomation.ViCore.Cmdlets.Commands.GetVM</p>
<p>Get-Datastore : Cannot validate argument on parameter &#039;Name&#039;. The argument is null or empty. Supply an argument that is<br />
 not null or empty and then try the command again.<br />
At C:scriptsorig_backupScript.ps1:35 char:57<br />
+     $cloneSpec.Location.Datastore = (Get-Datastore -Name &lt;&lt;&lt;&lt;  $BackupDS | Get-View).MoRef<br />
    + CategoryInfo          : InvalidData: (:) [Get-Datastore], ParameterBindingValidationException<br />
    + FullyQualifiedErrorId : ParameterArgumentValidationError,VMware.VimAutomation.ViCore.Cmdlets.Commands.GetDatasto<br />
   re</p>
<p>Exception calling &quot;CloneVM&quot; with &quot;3&quot; argument(s): &quot;The operation is not supported on the object.&quot;<br />
At C:scriptsorig_backupScript.ps1:41 char:20<br />
+     $vmView.CloneVM &lt;&lt;&lt;&lt; ( $cloneFolder, $cloneName, $cloneSpec )<br />
    + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException<br />
    + FullyQualifiedErrorId : DotNetMethodException</p>
<p>Get-VM : 4/28/2011 8:09:19 AM    Get-VM        VM with name &#039;MasterVM-20110428&#039; was not found, using the specified filt<br />
er(s).<br />
At C:scriptsorig_backupScript.ps1:44 char:11<br />
+     Get-VM &lt;&lt;&lt;&lt;  $cloneName<br />
    + CategoryInfo          : ObjectNotFound: (:) [Get-VM], VimException<br />
    + FullyQualifiedErrorId : Core_OutputHelper_WriteNotFoundError,VMware.VimAutomation.ViCore.Cmdlets.Commands.GetVM</p>
<p>Get-VM : Cannot validate argument on parameter &#039;Name&#039;. The argument is null or empty. Supply an argument that is not nu<br />
ll or empty and then try the command again.<br />
At C:scriptsorig_backupScript.ps1:47 char:35<br />
+     Get-Snapshot -VM (Get-VM -Name &lt;&lt;&lt;&lt;  $customerMasterVM) -Name $cloneSnap | Remove-Snapshot -confirm:$False<br />
    + CategoryInfo          : InvalidData: (:) [Get-VM], ParameterBindingValidationException<br />
    + FullyQualifiedErrorId : ParameterArgumentValidationError,VMware.VimAutomation.ViCore.Cmdlets.Commands.GetVM</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Christian Herzyk</title>
		<link>http://www.simonlong.co.uk/blog/2010/05/05/powercli-a-simple-vm-backup-script/comment-page-1/#comment-588</link>
		<dc:creator>Christian Herzyk</dc:creator>
		<pubDate>Mon, 14 Mar 2011 11:24:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.simonlong.co.uk/blog/?p=2494#comment-588</guid>
		<description>Hi Simon,

first.thanks for the great idea behind your script.
I get the error mentioned by MarkZi in one of the environments I try to use the script.
In this case I want to clone the machine from local datastore to the local datastore on another server. For that I added 
&quot;$CloneSpec.Location.Host = ( get-vmhost -Name $Machine.BackupHost &#124; get-view).MoRef&quot; to the script.

The datastore exists and the value of $CloneSpec.Location.Datastore looks fine.
Can I find out where the error is more exactly?</description>
		<content:encoded><![CDATA[<p>Hi Simon,</p>
<p>first.thanks for the great idea behind your script.<br />
I get the error mentioned by MarkZi in one of the environments I try to use the script.<br />
In this case I want to clone the machine from local datastore to the local datastore on another server. For that I added<br />
&#8220;$CloneSpec.Location.Host = ( get-vmhost -Name $Machine.BackupHost | get-view).MoRef&#8221; to the script.</p>
<p>The datastore exists and the value of $CloneSpec.Location.Datastore looks fine.<br />
Can I find out where the error is more exactly?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sabaghzadeh</title>
		<link>http://www.simonlong.co.uk/blog/2010/05/05/powercli-a-simple-vm-backup-script/comment-page-1/#comment-499</link>
		<dc:creator>Sabaghzadeh</dc:creator>
		<pubDate>Fri, 19 Nov 2010 01:34:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.simonlong.co.uk/blog/?p=2494#comment-499</guid>
		<description>I am a novice in scripting , Please help me .
  
1- Could you please what is the csv file format ?
2-How can I execute this script ?

Many thanks</description>
		<content:encoded><![CDATA[<p>I am a novice in scripting , Please help me .</p>
<p>1- Could you please what is the csv file format ?<br />
2-How can I execute this script ?</p>
<p>Many thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: WB</title>
		<link>http://www.simonlong.co.uk/blog/2010/05/05/powercli-a-simple-vm-backup-script/comment-page-1/#comment-473</link>
		<dc:creator>WB</dc:creator>
		<pubDate>Fri, 22 Oct 2010 22:44:15 +0000</pubDate>
		<guid isPermaLink="false">http://www.simonlong.co.uk/blog/?p=2494#comment-473</guid>
		<description>Why this error?&lt;br&gt;Method invocation failed because [System.Object[]] doesn&#039;t contain a method named &#039;CloneVM&#039;.&lt;br&gt;At C:Scriptsbackup.ps1:41 char:17&lt;br&gt;+     $vmView.CloneVM &lt;&lt;&lt;&lt; ( $cloneFolder, $cloneName, $cloneSpec )&lt;br&gt;    + CategoryInfo          : InvalidOperation: (CloneVM:String) [], RuntimeException&lt;br&gt;    + FullyQualifiedErrorId : MethodNotFound&lt;br&gt;&lt;br&gt;Using PowerCLI 4.1 build 264274&lt;br&gt;Host are ESX 4.0.0, 294855</description>
		<content:encoded><![CDATA[<p>Why this error?<br />Method invocation failed because [System.Object[]] doesn&#39;t contain a method named &#39;CloneVM&#39;.<br />At C:Scriptsbackup.ps1:41 char:17<br />+     $vmView.CloneVM &lt;&lt;&lt;&lt; ( $cloneFolder, $cloneName, $cloneSpec )<br />    + CategoryInfo          : InvalidOperation: (CloneVM:String) [], RuntimeException<br />    + FullyQualifiedErrorId : MethodNotFound</p>
<p>Using PowerCLI 4.1 build 264274<br />Host are ESX 4.0.0, 294855</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Simon Long</title>
		<link>http://www.simonlong.co.uk/blog/2010/05/05/powercli-a-simple-vm-backup-script/comment-page-1/#comment-448</link>
		<dc:creator>Simon Long</dc:creator>
		<pubDate>Mon, 18 Oct 2010 23:19:13 +0000</pubDate>
		<guid isPermaLink="false">http://www.simonlong.co.uk/blog/?p=2494#comment-448</guid>
		<description>Hi Marge, thanks for the questions.&lt;br&gt;&lt;br&gt;1. Good question. Cloning does indeed take a snapshot. Maybe it&#039;s worth trying to see if it works.&lt;br&gt;&lt;br&gt;2. .MasterVM refers to the column in the CSV. $customer is a line of that CSV</description>
		<content:encoded><![CDATA[<p>Hi Marge, thanks for the questions.</p>
<p>1. Good question. Cloning does indeed take a snapshot. Maybe it&#39;s worth trying to see if it works.</p>
<p>2. .MasterVM refers to the column in the CSV. $customer is a line of that CSV</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Marge</title>
		<link>http://www.simonlong.co.uk/blog/2010/05/05/powercli-a-simple-vm-backup-script/comment-page-1/#comment-445</link>
		<dc:creator>Marge</dc:creator>
		<pubDate>Sat, 16 Oct 2010 00:09:38 +0000</pubDate>
		<guid isPermaLink="false">http://www.simonlong.co.uk/blog/?p=2494#comment-445</guid>
		<description>If you can help me understand this, I&#039;d be grateful.
&lt;br&gt;
&lt;br&gt;1. Why snapshot and then clone?  Doesn&#039;t cloning involve a snapshot anyways?
&lt;br&gt;
&lt;br&gt;2. Why the &quot;.MasterVM&quot; in your statement in line 15?  (Get-VM $customer.MasterVM)
&lt;br&gt;
&lt;br&gt;I presume that this is related to the format of the input CSV, that the first line of the CSV labels the type in each successive line.  It&#039;s just not obvious to me what mechanism is that accomodates this.
&lt;br&gt;
&lt;br&gt;Thanks,
&lt;br&gt;Marge
&lt;br&gt;
&lt;br&gt;
&lt;br&gt;</description>
		<content:encoded><![CDATA[<p>If you can help me understand this, I&#39;d be grateful.</p>
<p>1. Why snapshot and then clone?  Doesn&#39;t cloning involve a snapshot anyways?</p>
<p>2. Why the &#8220;.MasterVM&#8221; in your statement in line 15?  (Get-VM $customer.MasterVM)</p>
<p>I presume that this is related to the format of the input CSV, that the first line of the CSV labels the type in each successive line.  It&#39;s just not obvious to me what mechanism is that accomodates this.</p>
<p>Thanks,<br />
<br />Marge</p>
<p></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Simon Long</title>
		<link>http://www.simonlong.co.uk/blog/2010/05/05/powercli-a-simple-vm-backup-script/comment-page-1/#comment-442</link>
		<dc:creator>Simon Long</dc:creator>
		<pubDate>Sun, 10 Oct 2010 01:52:21 +0000</pubDate>
		<guid isPermaLink="false">http://www.simonlong.co.uk/blog/?p=2494#comment-442</guid>
		<description>Have you tried it? Is that what&#039;s happening for you?</description>
		<content:encoded><![CDATA[<p>Have you tried it? Is that what&#39;s happening for you?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: diegp</title>
		<link>http://www.simonlong.co.uk/blog/2010/05/05/powercli-a-simple-vm-backup-script/comment-page-1/#comment-441</link>
		<dc:creator>diegp</dc:creator>
		<pubDate>Sun, 10 Oct 2010 01:46:55 +0000</pubDate>
		<guid isPermaLink="false">http://www.simonlong.co.uk/blog/?p=2494#comment-441</guid>
		<description>Yeah, but i think the script makes 2gb spare files on the backup DS?&lt;br&gt;&lt;br&gt;$cloneSpec.Location.Transform =  [Vmware.Vim.VirtualMachineRelocateTransformation]::sparse&lt;br&gt;&lt;br&gt;</description>
		<content:encoded><![CDATA[<p>Yeah, but i think the script makes 2gb spare files on the backup DS?</p>
<p>$cloneSpec.Location.Transform =  [Vmware.Vim.VirtualMachineRelocateTransformation]::sparse</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Simon Long</title>
		<link>http://www.simonlong.co.uk/blog/2010/05/05/powercli-a-simple-vm-backup-script/comment-page-1/#comment-440</link>
		<dc:creator>Simon Long</dc:creator>
		<pubDate>Sun, 10 Oct 2010 01:26:31 +0000</pubDate>
		<guid isPermaLink="false">http://www.simonlong.co.uk/blog/?p=2494#comment-440</guid>
		<description>PowerOff the original, PowerOn the backed up Virtual Machine?</description>
		<content:encoded><![CDATA[<p>PowerOff the original, PowerOn the backed up Virtual Machine?</p>
]]></content:encoded>
	</item>
</channel>
</rss>

<!-- Dynamic page generated in 0.387 seconds. -->
<!-- Cached page generated by WP-Super-Cache on 2011-12-06 21:35:28 -->

