Contributor
Contributor

Create a report to list VMs with snapshots

‌is it possible to create a view/report that lists all VMs running on delta disks?

thanks

james

0 Kudos
5 Replies
Commander
Commander

Hi,

check the following post.

vROPS Report Snapshots Older than X

Frank

If you find this information useful, please award points for "correct" or "helpful".
0 Kudos
Enthusiast
Enthusiast

Hi

To get a list of all VM Snapshots for VMs managed by vCenter you can type the following command:

get-vm | get-snapshot | format-list

Thanks Sakthivel R
0 Kudos
Enthusiast
Enthusiast

I believe this question was not about how to use PowerCLI to do that rather than creating a report in vROps doing that for you!

0 Kudos
Enthusiast
Enthusiast

Hi ,

Pls check if this help to your query.

To list all delta disk files stored across the datastores:

  1. Log in to the ESX host terminal directly or via SSH. For ESXi hosts, see Tech Support Mode for Emergency Support (1003677).

  2. List delta disks stored across the datastores using:

    find /vmfs/volumes/ -iname "*delta.vmdk"

    You see output similar to:

    /vmfs/volumes/49d9f2d8-5a74ba2f-b589-0013724c78e6/ examplevm/ examplevm-000001-delta.vmdk
    /vmfs/volumes/49d9f2d8-5a74ba2f-b589-0013724c78e6/ examplevm/ examplevm-000002-delta.vmdk
    /vmfs/volumes/49d9f2d8-5a74ba2f-b589-0013724c78e6/ examplevm/ examplevm-000003-delta.vmdk
    /vmfs/volumes/49d9f2d8-5a74ba2f-b589-0013724c78e6/ stalevm/ stalevm-000001-delta.vmdk
    /vmfs/volumes/49d9f2d8-5a74ba2f-b589-0013724c78e6/stale vm/stale vm-000002-delta.vmdk
    /vmfs/volumes/49d9f2d8-5a74ba2f-b589-0013724c78e6/anothervm/anothervm-000001-delta.vmdk

VMware KB: Determining if there are leftover delta files or snapshots that VMware vSphere or Infrast...

0 Kudos
Enthusiast
Enthusiast

Run the below script to get all VMs of all vCenters with Snapshot details :

$vm_snapshot = @()

$vm_consolidate = @()

$vc = get-content d:\snapshot\serverlist.txt

foreach ( $vcs in $vc)

{

connect-viserver $vcs

$VMs = get-vm

$vm_consolidate += $VMs | get-harddisk | select @{ n = "Virtual Center";e= { (($_.uid).split("@")[-1]).split(":")[0] }}, Parent,name,StorageFormat,Filename

$vm_snapshot +=  $VMs | get-snapshot | sort created |select @{"N" ="VirtualCenter";"E" = {$vcs}},VM,name, @{"N" ="Created";"E" = {$_.created.tostring("d")}}, description, sizeMB, powerstate

disconnect-viserver $vcs

}

$vm_consolidate | export-csv d:\snapshot\diskinfo.csv

$vm_snapshot | export-csv d:\snapshot\snapshotsinfo.csv

0 Kudos