Identifying VMs with dynamic disks

#1 VM Backup : Modern Data Protection for VMware vSphere and Microsoft Hyper-V

Identifying VMs with dynamic disks

Veeam Logoby ashleyw » Thu Mar 08, 2012 12:06 am

Hi,

We had a minor heart attack when we were trying to use the single file recovery to recover files from a specific directory and noticed that one of the drives was missing. After scratching our heads we realised the dynamic disk was missing from the single file restore view so we used the "guest files (other OS)" option to bring up the single file recovery VM to grab the files we needed, so all good in the end.

My questions are;
- Can the "Guest files (Windows)" option bring up a large warning saying the VM contains dynamic disks and drive letters will be missing?
- How do we run a scan of our 400+ VMs in our vCentre farm and get a high level view over which ones are still using dynamic disks (so we can make a plan to change these back to basic)?

When we consolidated into vCentre ages ago we specifically changed dynamic disks to basic as part of the VMware conversion process, but it looks like some VMs have slipped through the net.

cheers
ashleyw
Enthusiast
 
Posts: 88
Liked: 6 times
Joined: Thu Oct 28, 2010 10:55 pm
Full Name: Ashley Watson

Re: Identifying VMs with dynamic disks

Veeam Logoby tsightler » Thu Mar 08, 2012 12:35 am

So you should be able to script something up easy enough. You can detect dynamic disks via a WMI call via the PowerShell Get-WmiObject cmdlet.
Code: Select all
Get-WmiObject Win32_DiskPartition -filter "Type='Logical Disk Manager'"

If there are any dynamic disks, this will return something like:
Code: Select all
NumberOfBlocks   : 83883969
BootPartition    : False
Name             : Disk #3, Partition #0
PrimaryPartition : True
Size             : 42948592128
Index            : 0

So a nice script that loops through all your machines can give you a nice list of systems with dynamic disks should do the trick. A quick search of the Interwebs turns up this thread which has a script that uses this method. I personally haven't tested it, but that's probably how I'd approach it.
tsightler
Veeam MVP
 
Posts: 3208
Liked: 686 times
Joined: Fri Jun 05, 2009 12:57 pm
Full Name: Tom Sightler

Re: Identifying VMs with dynamic disks

Veeam Logoby ashleyw » Thu Mar 08, 2012 1:45 am

thanks for that. I'll take a look and see if I can create something that hooks into vCentre VIX APIs so I could drive the whole thing from powershell connecting to vCentre. thanks.
ashleyw
Enthusiast
 
Posts: 88
Liked: 6 times
Joined: Thu Oct 28, 2010 10:55 pm
Full Name: Ashley Watson


Return to Veeam Backup & Replication



Who is online

Users browsing this forum: Bing [Bot], Exabot [Bot], Robertel and 24 guests