SDRS VM settings always set to fullyautomated with New-VM cmdlet

Posted on Leave a commentPosted in Script

New-VM cmdlet Came across an issue when doing deployment of VMs using the PowerCli cmdlet New-VM. If not specified and deployed into a datastore cluster, SDRS behavior will always be set to automated. Even if the datastore clusters default setting is set to something else. It seems weird to bypass the datastore clusters default settings and per default just set it to automated, but that is just how it is at the moment. Consider this to be a request to change default behaviour of the cmdlet, to always set the SDRS setting of the VM to default unless otherwise specified. […]

Delete claimrules via PowerCLI

Posted on Leave a commentPosted in ESXi, Script

Had to mask storage in an older environment. As soon as that was done and storage were removed, then the clean up starts. I could have done all this by hand, but where is the fun in that. Instead I created this little script below which removes all claimrules with a rule number greater than 101 and lower than 65535. Of course this should go without saying. You need to know what you are doing and that there is no claimrules between 101-65535 that is crucial to your environment. Deleting claimrules like this shouldn’t be taking lightly. Well, I had […]

Deploy appliances via PowerCLI

Posted on Leave a commentPosted in Script

Needed to deploy some appliances. I could have done that via a client, but it some what cumbersome and requires you to sit a wait for every step. Why not deploy appliances via Powercli? It’s easy, fast and requires only a few lines of commands. The PowerCli cmdlet is called “Import-VApp”. The cmdlet lets you specify fields like Source, Name and OvfConfiguration. The tricky part here is to know which OvfConfiguration parameters are needed. An OVA file is just a zip file with the vmdk and configuration files in it. It can simply be opened with a tool which supports […]

Log Insight API calls Appendix

Posted on 4 CommentsPosted in Log Insight, Script

This is not a too lengthy blog post. It basically a copy/paste of routes file which is part of the Log Insight API. I have include both the 3.3 and 3.6 version, for comparisons. This is only meant as an educational blog post. It will give you an idea to what is possible with the Log Insight API, not just query wish, but also management wish. In order to make this work you have to follow the general guidelines for the Log Insight API and how to connect to it. As I haven’t done a Log Insight API blog post […]

esx.problem.net.vmknic.ip.duplicate – Hunting for MAC

Posted on Leave a commentPosted in Log Insight, Script

Log Insight is a very powerful tool to monitor your environments health status. One of my favorite dashboards to is the “General – Problems” dashboard, which is part of the  “VMware – vSphere” content pack. It comes with Log Insight per default. Because there you can get a great overview of any problems that might be in your vSphere environment. One of the problems you might see is the “esx.problem.net.vmknic.ip.duplicate” or as it can be seen in the pie chart “net.vmknic.ip.duplicate”. This problem basically tells you there’s an misconfiguration in your environment. Two VMK nics have the same IP address […]

ESXi IOStats – vmkmgmt_keyval

Posted on Leave a commentPosted in ESXi, Log Insight, Script, vRops

Just wanted to do a short post about vmkmgmt_keyval, as I think most admins only uses this tool for getting HBA driver/firmware versions, but you get so much more than just that. There is different forms of statistics in there, per target, per lun and block size. So first what is vmkmgmt_keyval ? vmkmgmt_keyval is an ESXi command which can be executed from ESXi’s direct console user interface (DCUI) or via SSH, in both examples you get access to ESXi Shell. The way I’m going to use vmkmgmt_keyval, is with an “-a”, after, just like in the example here: “/usr/lib/vmware/vmkmgmt_keyval/vmkmgmt_keyval […]

No Syslog Server is Configured

Posted on Leave a commentPosted in Log Insight, NSX, Script, vRops

If you are running vRops and NSX, one of the mangement packs that is a must to install is the NSX management pack – On a side note remember to link Log Insight to vRops, that way when you install the NSX management pack in vRops, it will also install the NSX content pack in Log Insight and setup the alerts in the NSX content pack and forward them to vRops. The NSX management pack delivers both NSX network information as well as traditional network information from switches via SNMP and CDP/LLDP. It helps to provide better to understand of […]

Log Insight + Netflow = Awesome part 2

Posted on 1 CommentPosted in Log Insight, Script

In my first blog post Log Insight + Netflow = Awesome I show cased that Log Insight could be used to ingest netflows and showed some graphics and talked about possible extensions the data found into other products such as vRealize Operations or NSX. I got some comments from people who wanted to learn more, but instead of me keep answering the same questions, I have posted what and how on to github. This marks the first github project that I have created. So even though this is not even half baked, not thought through and very much just for […]

vRops API – Working with Alerts

Posted on Leave a commentPosted in Script, vRops

This is another example and use case for using the vRops API to make some tasks easier. Let me set the scene. You have a large environment with maybe a 1000 datastores.  Quite a few alerts in vRops for datastores that are full or about to run full. Like the pro you are, you have of course datastore clusters in use. Like so many others the storage team uses an automated storage tiering, which forces us to disable some SDRS stuff. For many that means that SDRS is a manual task which can be run in order to distribute the […]

How to change VMDK geometry

Posted on Leave a commentPosted in Ravello, Script, vRops

I recently ran into an issue were I needed to change the geometry of some VMDK files – I will do a seperate blog post on where and why later. For now I will just focus on how to change VMDK geometry. A VMDK is just a file with some descriptional data and the actually binary data of the VMDK. Think of it as a virtual harddisk. It adheres to the same physical characteristics and there for the physical characteristics are also part of a VMDK file. Normally you won’t need to change the geometry of a VMDK – I this case […]