Automation

 View Only
  • 1.  Issue with the Orphaned VMDKs size on Datastore.

    Posted Jul 19, 2019 04:08 PM

    I have orphaned VMDK 's location. My query is how we can find size of that.



  • 2.  RE: Issue with the Orphaned VMDKs size on Datastore.

    Posted Jul 19, 2019 04:16 PM

    Depending on the ESXi version, and the vSphere Client you may be able to see the size from the Datastore Browser.

    Other than this, enable SSH on the host, and use putty to connect to it. Then go to the folder that contains the orphaned .vmdk file(s), and run ls -lisa.

    Please allow me a quick question. How did you find out that the file(s) is orphaned? There are only rare cases when this happens, so ensure that it's really not in use anymore, before you consider to delete it!

    André



  • 3.  RE: Issue with the Orphaned VMDKs size on Datastore.

    Posted Jul 19, 2019 05:10 PM

    It will take more time to login into ESXi and fetch VMDK details as i have huge list of VMDK's and I have found orphaned file from RV Tools report



  • 4.  RE: Issue with the Orphaned VMDKs size on Datastore.
    Best Answer

    Posted Jul 19, 2019 04:17 PM

    With the DatastoreBrowser, see for example Orphaned Files Revisited

    Or with the PSProvider, and filter the output on the path you want to check

    $dsName = 'MyDatastore'

    $ds = Get-Datastore -Name $dsName


    New-PSDrive -Location $ds -Name DS -PSProvider VimDatastore -Root "\" | Out-Null

    Get-ChildItem -Path DS:\ -Recurse | Select DatastoreFullPath,Length

    Remove-PSDrive -Name DS -Confirm:$false

    ---------------------------------------------------------------------------------------------------------

    Was it helpful? Let us know by completing this short survey here.