“We’ve tried, it can’t be automated!” I’ve heard this more times than I can keep track of and if you read my previous blog you will know that I just do not agree. I have written about automation with Linux utilities, UCS PowerTool, AutoHotKey, Excel, etc… 99.999% of operations can be automated. So when a customer tells me that something cannot be automated I usually respond with “Have you tried …?”
Here is the scenario; the customer has an automated build process for ESX hosts. At the point where the host is ready to be connected to the Nexus 1000V the process becomes manual. The customer would like to use VMWare PowerCLI to migrate the host interface but the Cmdlet to retrieve Distributed Virtual Switches, Get-VirtualSwitch, just returns the DVS objects, there isn’t a Cmdlet to migrate the ESX vmnic interface.
Hold on a second, I know that VCenter knows about the Nexus 1000V because I see it in the interface. I know that VCenter can manipulate the Nexus 1000V because VCenter is where interface migration is done. I am fairly certain at this point that ESX interface migration from the VCenter vSwitch to the Nexus 1000V can be automated. But what to use to do it, there is no PowerCLI command like Set-ESXHostInterfaceToN1kv. This is typically where automation ends for many, sometimes you have to dive deep into the objects that the system manages and figure out what to do. Sometimes someone has already done a deep dive into something like what you are trying to do and maybe you can build off of their work.
Read More »