TheVMinator's Posts

Has anyone done a migration from SRM to Azure Site Recovery Manager and has some input / feedback / lessons learned?
I need to virtualize some physical servers.  I need to determine what their CPU demand will be in MHz to determine if the target servers will be able to accomodate this.  I don't see any counters... See more...
I need to virtualize some physical servers.  I need to determine what their CPU demand will be in MHz to determine if the target servers will be able to accomodate this.  I don't see any counters in Windows Perfmon for MHz, only for %.  I don't have capacity planner. How can I determine the CPU demand in MHz using Windows Perfmon?  Thanks!
OK thanks for the info.  I guess my difficulty is that for everything else I've seen in the GUI, usually there is a way to get it by PowerCLI without too much difficulty.   I was thinking that si... See more...
OK thanks for the info.  I guess my difficulty is that for everything else I've seen in the GUI, usually there is a way to get it by PowerCLI without too much difficulty.   I was thinking that since "provisioned space" for the entire datastore object was a pretty common thing for people to want to know and see, there must be a PowerCLI way to get it without too much difficulty. It could be that other data on the datastore such as array snapshots or some other unusual file types are affecting what I see in the GUI for "provisioned space".  However, even if that were the case, isn't there a way with PowerCLI to just get the same number as what I'm seeing in the GUI?  I can't see how that number could be available in vCenter to be called through the Web Client or the vSphere Client, but it can't be called through PowerCLI. Is this a rare, hard to get metric that would need to be accessed programatically a different way than PowerCLI such as with the web services sdk? 
Somehow this isn't equal to the "provisioned space" on the datstore tab.  When I run this, it gives me 2028GB, but the provisioned space on the datastore tab is 2.3 TB. Any ideas?
I'm getting alerts from the Windows OS that memory is 90% utilized.  However the "usage %" in vROps and vCenter performance charts never goes above 50%.  There is no memory swapping happening eit... See more...
I'm getting alerts from the Windows OS that memory is 90% utilized.  However the "usage %" in vROps and vCenter performance charts never goes above 50%.  There is no memory swapping happening either.   Why is the OS reporting it is out of RAM when vCenter thinks the VM is only using 55%?
Thanks - This is really good - I just have one more item I need to try to get but am unable.  How can I total up vmprovisionedGB for all the VMs that go into the foreach loop?
I'm looking at the datastore summary tab for a datastore object in vSphere Client and I see what is on the attached screenshot. I can't seem to find this property on the object in powerCLI.  (... See more...
I'm looking at the datastore summary tab for a datastore object in vSphere Client and I see what is on the attached screenshot. I can't seem to find this property on the object in powerCLI.  (At least for purposes of this specific post) I don't want to try to calculate it myself by adding up the individual VMs but I want to try to access the exact same property using PowerCLI which is being displayed in the attached screenshot. Where can I find this property?  How do I add it to this script: get-datastore | select name, freespacegb, [access this property somehow here] Thanks!
OK thanks for the reply.  I'd be curious what do you think about this article and how it applies or doesn't apply to ESXi? https://www.vusec.net/projects/flip-feng-shui/
ok thanks again
OK thanks again.  Getting very warm but still having some issues.  I'm getting a list of VMs. These VMs are scattered across different datastores.  They are about to be migrated to a new storage ... See more...
OK thanks again.  Getting very warm but still having some issues.  I'm getting a list of VMs. These VMs are scattered across different datastores.  They are about to be migrated to a new storage platform.  They are right now thin provisioned.  After the storage vmotion operations they will be thick provisioned.  I'm attempting to find how much provisioned space the VMs will take on the destination datastore.  It seems the report is giving me used space rather than provisioned space.  For example if I do this:     $vmlist = get-vm     foreach($vm in $vmlist){     $spec = New-Object VMware.Vim.HostDatastoreBrowserSearchSpec     $spec.MatchPattern = "*$($vm.name)*"     $spec.details = New-Object VMware.Vim.FileQueryFlags     $spec.details.fileType = $true     $spec.details.fileSize = $true     $spec.sortFoldersFirst = $true     foreach($ds in Get-View -Id $vm.ExtensionData.Datastore){       $dsBrowser = Get-View -Id $ds.Browser       $result = $dsBrowser.SearchDatastoreSubFolders("[" + $ds.Name + "] ",$spec)       $size = $result.File | Measure-Object -Property FileSize -Sum | select -ExpandProperty Sum       New-Object PSObject -Property @{         VM = $vm.name         Datastore = $ds.Name         Size = $size         SizeGB = [math]::Round($size/1GB,1)       }     }   } then the output for each VM from this report is still way less than $vm.provisionedspaceGB and looks about the same as $vm.usedspaceGB The problem is that $vm.provisionedspaceGB still leaves out something.  The total of $vm.provisionedspaceGB for all VMs once they are all migrated to the new storage system is still less than what I see for "provisionedspaceGB"  on the datatastore's summary tab.  I need to take $vm.provisionedspaceGB and add whatever space it doesn't account for for each vm based on files on the datastore that might not be included in this metric. can I somehow add $vm.provisionedspaceGB and whatever files aren't included in it and have a new property that includes everything? Any ideas?
I'm attempting to find the complete amount of space that will be used for a VM on a datastore. The datastore has a property called "provisioned space"  This property includes swap file space and ... See more...
I'm attempting to find the complete amount of space that will be used for a VM on a datastore. The datastore has a property called "provisioned space"  This property includes swap file space and other items that are NOT included in the provisionedspaceGB number for each individual VM.  As a result, the sum of provisionedspaceGB for all VMS is NOT equal to the provisioned space value for the whole datastore. How can I find the total space for an individual thick provisioned VM including all files for that VM that will contributed to the "provisioned space" property of the datastore? Thanks!
thanks again all - much appreciated
ok thanks again - much appreciated
I need to move groups of vms to new datastores, and keep the total provisioned space of each datastore below 1TB.  When I get the list of VMs and select provisionedspaceGB, the sum of the provisi... See more...
I need to move groups of vms to new datastores, and keep the total provisioned space of each datastore below 1TB.  When I get the list of VMs and select provisionedspaceGB, the sum of the provisionedspacegb of all the VMs is less than than 1TB.  However, after I move them, the provisioned space of the datastore object as a whole as seen in vSphere Web Client is much higher than the sum of provisionedspaceGB for each VM. How can I calculate the provisionedspaceGB for each VM so that it maches how the calculation works for the provisionedspaceGB for the entire datsatore?
Great help - OK thanks again
OK thanks again. That might actually work. But how would I use it? How would I compare the data store that I want to move my VM to to the list of recommended data stores and see if the data store... See more...
OK thanks again. That might actually work. But how would I use it? How would I compare the data store that I want to move my VM to to the list of recommended data stores and see if the data store I want to move it to is in the list?
I have a try catch block that I'm using to storage vmotion a VM.  Can I put a second try catch block nested inside it when I look up the VM name?  For example: Import-Csv -Path 'vmlist.csv' -U... See more...
I have a try catch block that I'm using to storage vmotion a VM.  Can I put a second try catch block nested inside it when I look up the VM name?  For example: Import-Csv -Path 'vmlist.csv' -UseCulture | try{ foreach { get-vm | $_.vmname move-vm -datastore $_.destinationdatastore #A whole bunch more code is here } catch { write-host "Vm couldn't be moved" return } } When I try to look up the Vm based on the name in my input file, sometimes it errors out ungracefully when the VM has been renamed or deleted. Will PowerCLI handle something like this? Import-Csv -Path 'vmlist.csv' -UseCulture | try{ foreach { try{ get-vm | $_.vmname } catch{ write-host "This VM is no longer present in vCenter inventory under this name" } move-vm -datastore $_.destinationdatastore #A whole bunch more code is here } catch { write-host "Vm couldn't be moved" return } } I need to give a more graceful response when a VM doesn't exist but Can this be done and if so SHOULD it be done? Thanks!
If I use vSphere Web Client to storage vMotion a VM, it does a compatibility / validation when I select the datastore and tells me whether the storage vmotion will succeed before I try it.  If th... See more...
If I use vSphere Web Client to storage vMotion a VM, it does a compatibility / validation when I select the datastore and tells me whether the storage vmotion will succeed before I try it.  If there are any issues such as the datastore isn't mounted to the ESXi host the VM is on - it will tell me before I attempt the sVmotion and the compatibility check / validation will fail. What I'd like to do is take a VM I'm about to sVmotion and do a compatibility check before I actually attempt the storage vMotion and see if there are any issues first. Can this be done in PowerCLI? Thanks!
I'd like to get a list of all VMs in my environment.  Then for each one, I'd like to know if Vmware tools is installled and working, then I'd like to know if  the hostname inside the GuestOS is v... See more...
I'd like to get a list of all VMs in my environment.  Then for each one, I'd like to know if Vmware tools is installled and working, then I'd like to know if  the hostname inside the GuestOS is viewable, and if so what it is.  How can I do this with PowerCLI?
I have an input file with a set of operating system hostnames.  I need to take this OS hostname from the input file and do a get-vm against vCenter (Assume VM tools are installed on each VM and ... See more...
I have an input file with a set of operating system hostnames.  I need to take this OS hostname from the input file and do a get-vm against vCenter (Assume VM tools are installed on each VM and it is powered on so that the OS hostname is available) If I have these 3 hostnames in my input file: windows1 Windows2 windows3 How would I pull these and find the VM  names for each as seen in vCenter?  Thanks!