VMUGDK Presentation – PowerShell: From Zero To Hero

Posted Leave a commentPosted in Script

Hi all Did a presentation on Powershell yesterday and only got around halfway through, before I ran out of time. I have publish the entire thing on github if anyone want a peak at what I talk or didn’t. No powerpoint just powershell code. The presentation is an attempt to start slow and end up where modules and functions gets built. https://github.com/MichaelRyom/VMUGDK-12-2022   Enjoy

Alternative to VDS Health Check

Posted 2 CommentsPosted in Script

If you have a large environment or a lot of VLANs you know that running with VDS Health check on, is not an option. This is due to the way VDS Health check works. It will sent out one packet per uplink per VLAN. Meaning if you have two uplinks and 20 VLAN, it will send out a total of 40 packets for that one host. Which is not that bad, but now scale it up to the kind of people which usually have and need the distributed switch and the number of VLANs is likely to be triple digit […]

Custom DDNS on Ubiquiti USG

Posted 2 CommentsPosted in Hardware, Script

Been using Ubiquiti in the lab for more than a year now. Really like this simplicity of operations, but at the same time I have full access to the linux alike OS underneath. This gives you the possibility to run scripts and other tasks. Which brings me to what this blog post is all about. I have an ISP which charges extra for having a static IP address and me being lazy and cheap (Also it would be more than the monthly cap I have from work), I have not “upgraded” to a static IP. So I thought why not […]

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

Posted 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 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 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 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 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 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 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 […]