Archives January 2014

Using PowerCLI to dump your permission structure in vCenter

So there I was pondering the question, “How can I pull the details of the Permission tab in vCenter without logging into all of my damn vCenters!”

I tossed around a few ideas of commands which didn’t give me what I wanted. I searched and found some really awesome scripts by @LucD22 and others which were awesome if I wanted to view the rights assigned to roles, assign rights to those roles, and import them respectively.  But my objective was far more simpler than that.   I wanted a very easy way to dump what Role is tied to which User accounts across my hundreds of vCenters in a simple fashion.

Lo and behold, here is the base result!

Get-VIPermission | Select Role, Principal, Entity, UID

Wow that was easy! but wait! WTF WHY DOES UID KEEP TRUNCATING! Hey, calm down, calm down… I have a fix for that. ;)   Also in that same fix, I really cared specifically who was granted the Administrative type roles, less so caring about Virtual Machine User, or Power User.  Thus the following two modifications took care of that.

Get-VIPermission | Where {$_.Role –eq “Admin”} | Select Role, Principal, Entity, UID | Export-CSV “C:\Temp\Rights.csv”

And there it went! Dumping all of the data I wanted into a CSV file which I could sort and manipulate unflustered and unfettered by the results!

What was really useful about this, is unlike just looking at the top level permissions tab, this will also drill down into sub-objects whereby I was able to find accts which were granted permission on a sub-part!   Hopefully this helps you as much as it helped me in discovering and respectively writing this :)

I’ll probably come back and revisit this script on a quarterly basis making sure no-one went rogue in the meantime. You should too. :)

Tuning vCenter Operations Manager – Going from OMG THE SKY IS FALLING to Relevant Alerts

If you’re new to vCenter Operations Manager or vCOPS as it is called (And that’s vCOPS and not VC Ops even though VMware wants you to believe that is what it is called…. ;))   You may notice that once your environment starts collecting data you’ll be getting alerted to everything under the sun, and thensome!  And let me tell you, that is AWESOME! Please do tell me about everything going on as that is beneficial and useful.   As the days, weeks and months drone on though, you really could care less about being alerted that your thick-provisioned Datastore which is maxed out by configuration is full. WE GET IT. IT’S FULL. STOP TELLING ME ABOUT IT!   Or that your Security Scanning server (Pick Retina, Nessus or your favorite choice) uses >100% CPU when the process is running. Totally get it. It’s not undersized, it’s just not USED except for when it is running, throwing more resources won’t make it faster or better.

HOW DO i STOP IRRELEVANT ERRORS FROM ANNOYING THE HELL OUT OF ME?!?!

That’s what this is all about! I’ve taken an environment which would normally have anywhere from 500-1000 “Warnings, Errors, Alerts” on a daily basis, down to where I’m really only seeing what actually MATTERS.  Ignoring a majority of the ‘blah crap’ to focus on active alerts as they’re happening.  For what its worth, I’d always have the same alerts appear, but the important anomalies were getting lost under the weight of the useless.

To start things off, login to vCOPS and click on the Configuration button  Open Configuration

That seems simple enough, right? Then you’ll want to go in and modify your Default Policy by simply clicking on the blue of “Default Policy”Modify Default Settings 

Now this is where we start getting into the meat of things.   You may notice I’ve made a series of modifications.  These are the Infrastructure Badge thresholds which apply to the Infrastructure and not specific to VMs or Groups of VMs.   Workload level while cute and all tends to annoy me more than not in my system as you can see I had originally kept increasing the threshold higher and higher (80,90,95) eventually just clicking on the square which “turns off” that particular alert.   Next the Time Level function keeps tracking Timing which I’ve found to be less useful on a day-to-day alerting basis.   Long-term the data is still collected and I can report against it, so I leverage the reporting function as needed.    When it comes to Capacity Levels, this applies to Capacity available in the Infrastructure (Datastores, etc) which frankly I keep an eye on personally.   If you find yourself thin provisioning by default then keeping a feature like this activated is likely important to you.   I have over 100 datacenters and ensure they’re not over provisioned, because being told 100+ datacenters are “full” or “near full” is just useless and annoying.   Then when it comes down to Waste Level and Density Level, I keep a tight hand on how that is handled within the Infrastructure so I also have it turned off.   Again, judge your environment based upon your needs.  You can always turn functions back on or tune them.

Infrastructure Badge Thresholds

VM Badge Thresholds are a little more important than Infrastructure in this regard.   I like to be alerted that my Workload is high but only to the point where it is basically maxed out.   Adjust accordingly based upon knowing your environments use and function.   If you have dozens of VMs which regularly butte up against this ceiling as part of their function you may find yourself tuning this up higher as well.    vCOPs likes to predict the timing of things and be all like OMG YOUR VM IS GOING TO RUN OUT OF CPU or something. Yea. Thanks for the offer, but I’ll run a report for Undersized VMs and know that a majority of VMs are oversized to start with.   So I turned this off. :)    You’ll note that Capacity Level is configured and activated, because here I DO want to know if the VMs hard disk is going to run out of disk space (or is out).   That’ll impact things so I leave that on.   Same as above for Waste and Density.

VM Badge Thresholds

I’ll be honest. I don’t use Groupings here because things are more isolated than they are ‘paired’ and I don’t need this calling out any false positives.   Consider that for your environment.  If you heavily use Grouping, awesome, definitely take advantage of this!

Groups Badge Thresholds

I’m not going to dive into the details of these next few tabs and instead will show you what MY settings are, but for the most part they’re less important than the first few tabs and the last few tabs.

Capacity and Time Remaining Usable Capacity Usage Calculation Powered off and Idle VMs Oversized and Undersized VMs Underuse and Stress

This is really where the rubber meets the road with the Alerts.   All of the configuration we made above while important comes into stride with what you have configured for Alerts.  You may notice that I monitor Workload on Infr and VMs but not Anomalies.   Anomalies are cute and insightful… and very important if you have applications which are anomalous in nature.   If you don’t though, EVERYTHING will report anomalies to the point of being annoying and useless.  What that means is, when you’re alerted on anomalies, you’ll spend more time chasing false positives than actual problems.   Yea you may get lucky… but if you understand your environment enough, you’ll get annoyed and turn this off just as I have. :)    Time remaining and Capacity remaining while deactivated on my Infrastructure is valid on my VMs (I’ll be honest…. I’m not sure why I have Time Remaining even on for VMs, but Capacity Remaining will identify if I’m running out of VMDK Harddisk space, so yay!)

While we did ignore Anomalies, I do not ignore Stress, as that’s an actual active task going on at the time of true stress on the system.  That’s important and lets you know something is happening, not simply something is high or low from it’s established pattern as an anomaly would detect.  And lastly… Waste and Density… Just don’t matter to me when I have this architected specifically for my needs.  Clearing that along got rid of a large chunk of erroneous alerts.

Alerts 

And lastly the Forecast and Trends function… Okay, seriously, there’s no reason this should be highlighted any more than just merely reviewed.  See how your environment compares but there’s nothing too important to call out here, but I since it was the ‘6th’ tab, I couldn’t omit it. :)

Forecast and Trends

Nothing beats a good understanding, architecture and design

vCOPS as we all know is a tool, and how you use that tool or respectively let it use you is important.   When getting started with vCOPS drink from the firehose, tune your things so you see everything, even more than everything and scour and look at every single tab, function, report and alert!

Then, once you’ve tuned your environment down and understand your limits start to scale it back so it becomes useful.   Hopefully some of the settings included here help you.  I literally went from thousands, THOUSANDS of alerts on my many hundreds of Datacenters, vCenters and beyond and on a good day can have –0- messages warning me.   Yea I said it. –0- ! ! !.    But at this point, even on a ‘bad day’ I’m looking at ~25 or so alerts at a maximum when one or more of my datacenters are experiencing some kind of issue.

Give it a try, tune tune tune and enjoy!

Stop logging me out vCOPS! WHY DO YOU HATE ME?! – Modifying vCOPS Timeout!

I’m sure you’ve been in that situation… sitting there, using vCOPS day in and day out, only to get annoyed as all get out every time you go to refresh or do something and it’s all like HEY WHY DON’T YOU AUTHENTICATE AGAIN!    Well, look no further than here (and this respective KB Article) to cut it out!

Changing or disabling the UI session timeout for vCenter Operations Manager vApp (2015135)

To change the session timeout period for Standard and Advanced versions, set the <session-timeout> parameter to the required value in minutes for the desired timeout.

To disable the session timeout, set the <session-timeout> parameter to -1.
To change or disable the session timeout:

  1. Log in to the vCenter Operations Manager vApp UI VM.
  2. Open this file using a text editor:
    • For the Standard UI – /usr/lib/vmware-vcops/tomcat/webapps/vcops-vsphere/WEB-INF/web.xml
    • For the Enterprise Custom UI – /usr/lib/vmware-vcops/tomcat-enterprise/webapps/vcops-custom/WEB-INF/web.xml
  3. Locate the <session-config> parameter and change this to:
    <session-config>
    <session-timeout>value</session-timeout>
    </session-config>
    Where value is any value in minutes after which you want the session to timeout.
    For example:
      • To set the session to time out after 60 minutes, change this parameter to:
        <session-config>
        <session-timeout>60</session-timeout>
        </session-config>
      • To disable session timeout, change this parameter to:
        <session-config>
        <session-timeout>-1</session-timeout>
        </session-config>
  4. Restart the web services:
      • /etc/init.d/vcopswebenterprise restart

      • /etc/init.d/vcopsweb restart

You may notice that it might ALSO be set to default at 30, I’ve noticed that to occur as I’ve upgraded versions of VCOPS over time.

Also, important to note is, even if you’re running the Enterprise or Advanced versions, you’ll still want to modify the “Standard UI” configuration so that the initial vcops-vsphere is modified in addition to modifying the vcops-custom as listed above in the Enterprise Custom UI.

One last comment is, when you update your version of vCOPS you will NEED to go and change this setting each and every time.  So if you’re loading in the latest .PAK file to upgrade, reset you shall or else get annoyed again by timeouts!

Veeam gets into the Certification game with the VMCE

Veeam Presents the VMCE

You knew it was coming, No seriously you did. … Probably. :)

But yea, Veeam the maker of various Virtualization supportive technologies has released the Veeam Certified Engineer (VMCE) certification!

A few interesting things I noticed with this announcement; First of all the Certification exam itself will not be available for a few months so keep that in mind if you were looking at pursuing it today (as I had… :))

Secondly, they take their certification and respective recertification pretty serious with this clause;

How long is a Veeam certification valid?

In order to ensure that Veeam certification is a valuable indicator of a candidate’s knowledge, Veeam will require re-certificating on all major releases of Veeam solutions. To upgrade your certification level as a VMCE, you will have 120 days after the release to take the upgrade course and pass the corresponding exam.

If a VMCE fails the exam, there will be another 90 days to re-take the course (full) and pass the exam (full).

If after this time a VMCE didn’t confirm the certification, it will expire.

At this time, the training is only available in the US, and the online videos haven’t been recorded yet (Hey, we’re getting ahead of ourselves a little bit!) but lo and look forward to the future as I can see this start to explode in the near term.

#EMCElect 2014 – EMC’s Value and Appreciation Program for Community Contributors

If you haven’t heard of or about EMC Elect by now, let this be a reminder!  For those unaware, EMC Elect is the EMC Equivalent to the Microsoft MVP Program, or the VMware vExpert Program.    It is with great honor I accept this reward two years in a row since its inception.

Look for more continued and contributions to the community this coming year involving Virtualization and EMC as well.  I’ve included some links below from various other members of the EMC Community and with more details on EMC Elect!   Good luck all and have an awesome 2014!!!

#EMCElect 2014

The EMC Elect of 2014 – Official List

How were the EMC Elect of 2014 chosen?

EMC Elect 2014 Honorees Announced

Welcoming the EMC Elect of 2014

EMC Elect for 2014 Announced