Hi ,
I have VMWare Vcenter installed on my machine to access our Virtual Machines hosted on a ESX Server . Is it possible for me to issue cmd line commands fro my machine to switch snapshot's for our virtual machine.
Example :
VirtualMachine ( A ) hosted on ESX server ( B )
My Machine ( C )
Let's say A has 3 snapshots (1,2,3)
I should be able to issue a cmd on C which should revert the snapshot on A from 3 to 1. Is it possible if yes where should i go to find that information .
Your help is highly appreciated.
Thanks.
Remo
This can be accomplished with PowerCLI, which extends Microsoft's Powershell. I've moved this thread to the PowerCLI forums.
With the Set-VM cmdlet and the Snapshot parameter you can revert to a snapshot.
An example
$snapName = "MySnapshot"
$vmName = "MyVM"
$vm = Get-VM -Name $vmName
$snap = Get-Snapshot -VM $vm -Name $snapName
Set-VM -VM $vm -Snapshot $snap -Confirm:$false
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference