VMware Cloud Community
BigHug
Enthusiast
Enthusiast

get-snapshot slow on PowerCLI 4.0u1

Hi, all:

Get-snapshot seems to be much slower on 4.0u1 than on 4.0. A simple "get-vm|get-snapshot" finishes in 6 seconds on 4.0. However, it will take 380 seconds on 4.0u1. My vcenter and hosts are all on 4.0 u1.Does any one experience the same issue? Thanks.

Reply
0 Kudos
5 Replies
alanrenouf
VMware Employee
VMware Employee

I also get this, I have raised it with Carter and team and they are working on it, hopefully they will update us soon.

If you found this information useful, please consider awarding points for Correct or Helpful.

Alan Renouf

Blog: http://virtu-al.net Twitter: http://twitter.com/alanrenouf Co-author of the PowerCLI Book: http://powerclibook.com
BigHug
Enthusiast
Enthusiast

Great! Thanks for your information, Alan.

Reply
0 Kudos
RS_1
Enthusiast
Enthusiast

Here is a script to list snapshot very fast :

param($VM)

if ($VM) {$rootsnap = $VM|%{Get-View -ViewType VirtualMachine -Filter @{"Name" = $_}}|%{$_.Snapshot.RootSnapshotList}}

else

{$rootsnap = Get-View -ViewType VirtualMachine |%{$_.Snapshot.RootSnapshotList}}

$snaplist = @()

$snaplist += $rootsnap

function get-snapshotlegacy ($rootsnap){

foreach ($snap in ($rootsnap|%{$_.ChildSnapshotList})){

$snap

if ((($snap|%{$_.ChildSnapshotList})|Measure-Object).count -gt 0){

get-snapshotlegacy $snap

}

}

}

$snaplist += get-snapshotlegacy $rootsnap

$snaplist

Explained here : http://www.hypervisor.fr/?p=1907

I hope it will help waiting a new cmdlet Smiley Happy

Reply
0 Kudos
yboychev
Hot Shot
Hot Shot

Hi all, the slowness of Get-Snapshot is a problem we have addressed within PowerCLI 4.1 release. Our tests show that we have done an improvement of over 75% regarding performance. Enjoy it!

Yavor,

PowerCLI team

Reply
0 Kudos
AlbertWT
Virtuoso
Virtuoso

Thanks for the explanation man, it works fast now after I updated myself into 4.1

Kind Regards,

AWT

/* Please feel free to provide any comments or input you may have. */
Reply
0 Kudos