Quantcast
Channel: VMware Communities: Message List
Viewing all 232631 articles
Browse latest View live

Orphaned VMDK Script is Reporting Inappropriate Data

$
0
0

Hi,

 

Can you please help with the below:

1. This script is reporting the VMDKs of Powered Off VMs too as Orphaned.

2. We have a mix of Thick and Thin provisioned disks in our environment, so can we report only used size of the VMDK instead of Provisioned space. Currently it is fetching Provisioned size (wherever there are thick disks), which doesn't give real number for the total orphaned space that can be reclaimed, if we can fetch used size then the real orphaned space would make more sense.

3. It's reporting the disks of VM templates as Orphaned, how do we filter this out completely.

4. Also, what changes to the code can we make to filter out datastores with local (case insensitive) in name, these are very rare in our environment but still want to filter out before hand).

 

Appreciate your inputs. Thanks. 

 

Current Version of the Script (main code):

 

report = @()

 

Get-View -ViewType Datastore -Property Name,Browser,Host | %{

    $ds = $_

    $dsBrowser = Get-View $ds.browser

    $rootPath = "[" + $ds.Name + "]"

    $searchSpec = New-Object VMware.Vim.HostDatastoreBrowserSearchSpec -property @{

        matchPattern="*.vmdk"

        details= New-Object VMware.Vim.FileQueryFlags -property @{

            filesize=$true

            modification=$true

        }

    }

 

    $searchResult = try {

                          $dsBrowser.SearchDatastoreSubFolders($rootPath, $searchSpec)

                        }

                    Catch {

                      $Error1 = $Error[0].Exception.Message

                      LogWrite "On $vCenter - Error: $Error1

                      Skipping the Datastore."

                      }

     

    foreach ($folder in $searchResult) {

  foreach ($fileResult in $folder.File) {

          if ($fileResult.Path -match "-flat.vmdk"-and ($fileResult.Modification -lt $DaysOld)) {

        if (-not ($arrUsedDisks -contains ($folder.FolderPath + $fileResult.Path))){

        $row = "" | Select DataStore, Path, ProbablyOrphanedFile, SizeGB, LastModifiedOn, Host, SizeBytes

        $row.DataStore = $ds.Name

        $row.Path = $folder.FolderPath

        $row.ProbablyOrphanedFile = $fileResult.Path

        $row.SizeGB = [math]::Round($fileResult.FileSize/1GB,1)

        $row.LastModifiedOn = $fileResult.Modification

        $row.Host = (Get-View $ds.Host[0].Key).Name

                                $row.SizeBytes = $fileResult.FileSize

                                $report += $row

                             

  }

  }

  }

  }

  }

       

    $ovmdkscount = $report.Count

    $totalorphanedspace = $report | Measure-Object -sum -property SizeBytes | select -expand Sum | foreach { [Math]::Round($_ / 1TB, 1) }

    $report| select * -exclude SizeBytes | ConvertTo-Html –title "$vCenter - Orphaned VMDK Report" –body "<H2>$vCenter - Orphaned VMDK Report</H2>" -head $Header | Out-File $BasePath\$Date\$vCenter-OrphanedVMDKs-$Date.htm


Re: Calculating % Proc Time and % Core Util Time

$
0
0

Hi Luc,

 

Have you had a chance to upload that module to your blog? I'm very interested to read your thoughts on the topic!

Re: Massive USB problems with Nikon Coolscan and 2010 MacBookPro

$
0
0

c

This really is an amazing story! I have been having catastrophic problems with my MBP since Fusion 7 and noone could cure it. Sluggishness, constant spinning balls, constant crashes, i had completely given up on ever getting windows 7 to work in anything above Fusion 4.

 

8-10 hours with Fusion's tech support revealed nothing whatsoever, however many times they pretended to turn off hardware acceleration.

 

Then this coolscan problem.

 

Then I concluded over 4-5 hours on the phone with applecare that it was a hardware problem, probably motherboard related, and put in an insurance claim.

 

But the bloke at applecare did try to say that with this sort of conclusion, there is a one in 1000 chance of a Genius Bar diagnosis off 'something else'

 

Blow me down! The nice girl at thhe apple store almost immediately diagnosed a DU problem and did a COMMAND-R start to the recoveery partition. There, DU ran, finding all sorts of lost-cluster-like problems.

 

HEY PRESTO, suddenly the MBP runs like brand new, XP and 7 run perfectly, the scanner is immediately identified as an LS40 (or an IOUSB device, there is no difference), XP immediately sees its new USB connected device and installs drivers.


What is even more baffling is that throughout this process I have upgraded OSX numerous times and run DISK WARRIOR numerous times with out these cataclysmic file system problems either manifesting themselves or even being found!

Re: NTP issues on 5.5

$
0
0

the esxi hosts ARE syncing to a time server located on an ESXI host. 

 

The NTP server is reachable and all ports open.

 

the time sync does work but it seems like the time falls behind by a minute or 2.

Re: Completing vSphere 6 foundation exam(2V0-620) will provide any VCA certification?

$
0
0

There is no connection whatsoever between the vSphere Foundations exam and any of the VCA certifications.

 

Foundations is a core exam for all the VCP6/VCP7 certifications.

 

I don't personally think VCA certifications have value, so would suggest you proceed with the Foundations exam followed by 2V0-731 - once you've passed both you'll be VCP7-CMA certified, so long as you've also met any training requirement for VCP7-CMA.

Re: ESXi 6.5 USB Devices attached to VMs Issues?

$
0
0

Not the driver issue but an issue in the virtual device layer. The device does not work with WS as well. I'm still looking.

 

-Lance

Re: Assign appstack to an OU

$
0
0

We are investigating this...

 

Lakshman, contact me directly when necessary...


Raymond

Need PowerCLI script to pull actual size of thick provisioned (lazy/eager zeroed) disks

$
0
0

Hi,

 

Can you please let me know if there is a PowerCLI script to report on actual space (not the provisioned space) of any thick provisioned disks across a vCenter.

 

Regards,

Uman


Re: Error : No valid host was found. There are not enough hosts available. Code 500

$
0
0

Hi,

The plot thickens as I dig deeper with your tasks send me on.

So what I found is this: I searched this and it relates to failed deployments, patches or upgrades. But remember its up and running we just cannot provision or restart an Instance.

 

Also does this screen mean it still thinks it's in deployment limbo? What would happen if I click "Stop Openstack Deployment" here?

 

 

Here is the status: I think a better question is what command line utilities can I check to validate this environment? Or as you stated "should check the status of your deployment," Like (openstack-status)_ on Redhat?

 

Thanks

Jeff

Re: Upgrading Vcenter server

$
0
0

You will be able to physically apply the license on the new VC. The licenses must be removed ASAP from the old VC instance otherwise you will be breaching your VMware agreement. It will work though and you will be able to "roll-back"

Re: VC 6.5 Install failure - identity management service error on first boot

$
0
0

CSvec,

Thank you, it worked for me.

 

I gave the DNS IP as VCSA IP itself.

Re: Error 1068 When trying to start vCenter Server Service

$
0
0

I have the same error.

 

Any Solution for this?


I attached file log.

 

Thanks.


Snapshots of Writable Volumes

$
0
0

We are looking in to creating a solution for users who want to be able to "roll back" their writable volumes to a certain point in time. One example of a scenario is the user wants to upgrade an application installed in their writable volume and want to be able to roll back to the previous version in case of failure. Storage xnapshots of the LUN the Writables are stored on is a solution but restoring via that method is cumbersome. Can anyone suggest any other solution? Can a snapshot of the VM in which the writable is attached to be taken and then reverted if need be?

Re: Need PowerCLI script to pull actual size of thick provisioned (lazy/eager zeroed) disks

Re: Completing vSphere 6 foundation exam(2V0-620) will provide  any VCA certification?

$
0
0

Thanks for your reply Scott.

I have be learning VCA-CMA followed by fundamental course in VM ware leaning zone. As you said VCA alone will not have any value so I am planning to take a course for vSphere 6 fundamentals first and later I will go for VCP7. But will I be certified by VM ware for passing a vSphere 6 fundamentals exam alone ?? I know it is a silly question but I want to clarify myself...


On launch VM Fusion always asks for admin permissions.

$
0
0

I have been having an issue with VMware fusion that every time it starts up is has to request admin rights and re-initialize. I have manually deleted vmware fusion and all its associated files. The re-downloaded the installer from VMWare currently on Professional Version 8.1.1 (3771013). I am running a Mac Pro on 10.12.2. not sure why this keeps happening.

Re: VM Workstation 12.5.2 issues (vmware-vmx - high cpu utilization & excessive vmdk fragmentation)

$
0
0

Hi,

 

If your guests happen to be Windows 7 and/or Windows 8 then look at task manager in the guest OS (with show processes from all users) and check what process is chewing up all your CPU.

Chances are it is svchost. Via "View" select columns you can then add another column "Command Line" as that will give you a bit more details.

Then let us know what the details are (I suspect svchost -k netsvc ) and if that's the case then there's more info here: Win7Pro svchost.exe service spiking to 50% for extended periods of time with Fusion 8.1.1

There's a fix for that too, which is to be found here:

Re: Can anyone suggest a fix for Windows 7 updates failing?

 

As for the vmdk fragmention, shut down the vm and select "Defragment" in settings after selecting the disk in VMware Workstation.

--

Wil

Re: Repair / Recover VMFS Volume

$
0
0

:> I presume that this above is when you want to 'chroot' to enviroment?

 

 

Not sure what you mean by that ...
I usually work remotely - I ask my customer to create a 64-bit Linux VM that has network access to the esxi network.
Then I can do my work even when the esxi-host is still in production.
And I also use vmfs-fuse really rarely these days - the more terrabyte-size vmdks you work with the less useful it is.
I also noticed that is very useful to access VMFS-volumes with readonly mode - helps to workaround I/O-errors or stale locks.
Writing to VMFS via vmfs-fuse is something I never do - instead I just mount one directory of a VMFS-volume in writeable mode via sshfs.
This way I never get complaints about bad writes from a dangerously out-dated vmfs-fuse tool.
Only advantage of using vmfs-fuse and directly booting the affected esxi-host into Linux is the higher read-rate that you can get that way.

 

> So when I tried to fsck.vmfs datastore.raw file I get lots


Pointer Block 0x20025843 is lost.

Pointer Block 0x30025843 is lost.

Pointer Block 0x40025843 is lost.

Pointer Block 0x50025843 is lost.

Which vmfs-fuse version do you use ?
Can you read flat-vmdks larger than 256gb ?
If not you can expect errors like that

> So Basically  pulling file to file doesn't work all the time.

Of course not.
The key factor for recovery is the corruption-rate of the vmfs-metadata.

vmfs-fuse only helps with lightly damaged VMFS-Metadata.
If the hidden sf-files in the first GB of the volume are damaged, overformatted or missing vmfs-fuse does not help at all


Ulli


Re: Orphaned VMDK Script is Reporting Inappropriate Data

$
0
0

1. I'm not sure how you calculate the content of $arrUsedDisks.

2. See my answer to your other thread

3. You can filter out the Templates on the Get-View cmdlet. See 4

4. Again a Filter on the Get-View. Try like this

 

Get-View -ViewType Datastore -Property Name,Browser,Host,Config.Template -Filter @{    'Name'="^(?!.+local).+"    'Config.Template'=$false
}

Re: Calculating % Proc Time and % Core Util Time

$
0
0

I know, I'm slacking.

Discovered a bug in my code, think I got it fixed now.

Viewing all 232631 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>