VMware Cloud Community
dscottimw
Enthusiast
Enthusiast

Retrieve the history of vmdk migrations

Hi,

I am in need of a way to figure out where (which datastore) a vmdk was stored on prior to putting a datastore into maintenance mode.  We have some vms that have their vmdk files placed on specific datastores based on what service they are going to provide.  So some vmdks live on a datastore made up of SSD's because their workloads require ssd performance and some vmdks for that same vm live on datastores backed by spinning disk because they're workloads are more capacity specific.  I needed to do some maintenance on the datastores which are part of a datastore cluster and when I put the datastore in maintenance mode the the vmdk's from both those datastores were moved from their respective datastores to the remaining datastore in the cluster. 

I"m trying to use powercli to read the logs to find out which vmdks came from where but I'm having difficulty identifying the correct event type to filter on in my get-vievent command. I've attached where I've gotten to so far.  Can anyone help point me in a direction? 

Thanks

 

 

Dan Scotti
Reply
0 Kudos
2 Replies
LucD
Leadership
Leadership

Afaik there are no events for individual VMDK moves.
You can look at the VMMigratedEvent and the DRSVMMigratedEvent, but they cover the VM itself.

Perhaps you can check with my script from Get the vMotion/svMotion history to verify if that shows the individual VMDK that was moved to another datastore.


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

Tags (1)
dscottimw
Enthusiast
Enthusiast

Thanks LucD.  That is the conclusion I was coming to.  I'll check out your linked script. 

Dan Scotti
Reply
0 Kudos