{"id":266,"date":"2011-02-04T23:28:46","date_gmt":"2011-02-05T04:28:46","guid":{"rendered":"http:\/\/enterpriseadmins.org\/blog\/?p=266"},"modified":"2011-02-04T23:28:46","modified_gmt":"2011-02-05T04:28:46","slug":"vcheck-daily-report-version-5-31","status":"publish","type":"post","link":"https:\/\/enterpriseadmins.org\/blog\/scripting\/vcheck-daily-report-version-5-31\/","title":{"rendered":"vCheck (daily report) version 5.31"},"content":{"rendered":"<p>As many of you know, I have created a vCheck feature request list (<a href=\"http:\/\/bit.ly\/dGrNjh\">http:\/\/bit.ly\/dGrNjh<\/a>) using comments from the <a href=\"http:\/\/www.virtu-al.net\/featured-scripts\/vcheck\/\">Virtu-Al.net site<\/a>.  I&#8217;ve been working through them as time permits.  <\/p>\n<p>In a post earlier in the week, I provided a solution to make &#8216;vCheck as a vSphere Client &#8220;Solutions and Application&#8221;&#8216;.  This post attempted to resolve feature request items #16 and #17.  If you are interested, that post is available here: <a href=\"http:\/\/enterpriseadmins.org\/blog\/?p=258\">http:\/\/enterpriseadmins.org\/blog\/?p=258<\/a>.  It is not really a change to vCheck, but some steps that need to happen to make vCheck appear in vCenter.<\/p>\n<p>Today, I&#8217;m am posting more updates to vCheck.  This updated version includes feature requests #2, #11 and #51.<\/p>\n<pre># Version 5.31- bwuch: Bug fix for LockdownMode\r\n# Version 5.30- bwuch: Add check for VMtools installer connected\r\n# Version 5.29- bwuch: Add check for VM capacity forecasting\r\n# Version 5.28- bwuch: Change to Get-HTMLTable function for possible performance improvements\r\n<\/pre>\n<p>I&#8217;m sure update 5.28 was suggested in the Virtu-Al.net comments, but for some reason I couldn&#8217;t find it on the feature request list.  <\/p>\n<p>Update 5.29 isn&#8217;t perfect and I wanted to let everyone know.  There are comments in the code, but I wanted to add them to this post for reference.  Instead of looping through all of the virtual machines and adding up the amount of space used, I simply subtract the data store free space from the capacity and assume that is how much is being used.  We also make the assumption that no more than 85% of a datastores capacity will be used (to reserve room for thin-provisioned growth, snapshots, changed block tracking and log files).  These assumptions make the code run pretty fast, but I&#8217;ve seen some oddities in my test environment.  (Like -41 virtual machines remaining in a data center I&#8217;m sure has enough free space for 1 or 2 more VMs \ud83d\ude42 )  Here is what I&#8217;ve added to the comments of the script for reference:<\/p>\n<pre># The disk forecast will be per datacenter instead of per cluster since\r\n# Get-Datastore -Entity only supports VirtualMachine, VMHost, and Datacenter objects.\r\n# To improve performance in code, we are going to make the following assumptions\r\n#   Assumption 1.) Disk capacity - Free Space = space used by VMs\r\n#   Assumption 2.) used space \/ count of VMs = Avg Space used per VM\r\n#   Assumption 3.) we will reserve 15% of capacity for overhead<\/pre>\n<p>If anyone else has a better solution (fast and accurate) please let me know.<\/p>\n<p>Here is version 5.31 for those interested: <a href='http:\/\/enterpriseadmins.org\/blog\/wp-content\/uploads\/2011\/02\/vCheck5.31.ps1_.txt'>Download vCheck5.31.ps1.txt<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>As many of you know, I have created a vCheck feature request list (http:\/\/bit.ly\/dGrNjh) using comments from the Virtu-Al.net site. I&#8217;ve been working through them as time permits. In a post earlier in the week, I provided a solution to &hellip; <a href=\"https:\/\/enterpriseadmins.org\/blog\/scripting\/vcheck-daily-report-version-5-31\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":6,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[3,4],"tags":[],"class_list":["post-266","post","type-post","status-publish","format-standard","hentry","category-scripting","category-virtualization"],"_links":{"self":[{"href":"https:\/\/enterpriseadmins.org\/blog\/wp-json\/wp\/v2\/posts\/266","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/enterpriseadmins.org\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/enterpriseadmins.org\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/enterpriseadmins.org\/blog\/wp-json\/wp\/v2\/users\/6"}],"replies":[{"embeddable":true,"href":"https:\/\/enterpriseadmins.org\/blog\/wp-json\/wp\/v2\/comments?post=266"}],"version-history":[{"count":6,"href":"https:\/\/enterpriseadmins.org\/blog\/wp-json\/wp\/v2\/posts\/266\/revisions"}],"predecessor-version":[{"id":273,"href":"https:\/\/enterpriseadmins.org\/blog\/wp-json\/wp\/v2\/posts\/266\/revisions\/273"}],"wp:attachment":[{"href":"https:\/\/enterpriseadmins.org\/blog\/wp-json\/wp\/v2\/media?parent=266"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/enterpriseadmins.org\/blog\/wp-json\/wp\/v2\/categories?post=266"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/enterpriseadmins.org\/blog\/wp-json\/wp\/v2\/tags?post=266"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}