Home > Blogs > VMware PowerCLI Blog


Virtual switches are hard.

Jonathan Walz and Hal Rottenberg have an excellent podcast that is devoted to Windows PowerShell, if you haven’t listened you should definitely give it a try.

In their most recent episode, Hal mentioned that I will be at TechEd in Orlando next week. Hal also mentioned that I had some demos that I would be running, which is not quite true. Actually you’re going to be running the demos yourselves. If you come visit us at the VMware booth next week, you get to enter the values you want into any of the spreadsheets I’ve been publishing so far, press GO! and watch the magic happen.

So if you’ve ever wanted to create 500 VMs at once across multiple hosts, here’s your chance. The best part is that you have all the fun and we clean up all the mess.

Which brings me to my next spreadsheet. Not only do I show off my automation prowess, but I will also surely impress you with my sense of color co-ordination. This time we’re creating lots of virtual switches at a time. When I was at VMworld Europe earlier this year, I was surprised at the number of people who came up to me complaining about how tedious it is to set up virtual switches. Throw in a number of VM networks per switch and a VMkernel or two and you’ve got a lot of clicking to look forward to. This is exactly the problem VMware is trying to solve with our PowerShell cmdlets.

Creating Virtual Switches In Style:

Switch

Unfortunately I don’t have a video this week, so a brief description of how to use the spreadsheet is in order. First, the approach I take is that you create all your virtual switches at once, then all your VM networks, then all of your VMkernels.

When you create virtual switches you can configure all advanced functionality like NIC teaming and beacon probing when you create it. If you don’t need all of this stuff, you can confine yourself to the first section of the "Virtual Switches" tab, but it’s still worthwhile to see what capabilities are there in the other sections. Overriding these advanced options within VM Networks is not supported in this spreadsheet. If you read this paragraph and wondered if I had suddenly started speaking in tongues, you can learn more about advanced networking in VMware’s Virtual Networking Concepts guide.

If you take a look at the code used by this spreadsheet (hidden, as always, in cell A2), you may notice that the code is quite complex, not much like the simple scripts you may be used to. This is because the VI Toolkit (for Windows) doesn’t yet have all of the advanced functionality I need to make this spreadsheet work. Instead, I resorted to using our web services directly. The goal of the Toolkit is to gradually make hard things easy and of course we try to focus on the most important things first. Of course we don’t know what is most important without your feedback, so let us know. Do you use advanced features like NIC teaming? Policy overrides within port groups or VMkernels? Other advanced features? Let us know, on the blog or within our forums. (And don’t forget to drop by for a chat next week at TechEd, see you there.)

One thought on “Virtual switches are hard.

  1. Hal Rottenberg

    Thanks for the shout-out Carter? I will definitely see you at TechEd and look forward to hitting GO a few hundred times in a row. I’d like to see if I can light a fire with it.

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *

*