How to create a standard switch and connect a machine to it?


I am currently trying to create a workflow to deploy two virtual machines from an image, and make a network connection between the two machines (Local network, no internet, only two devices connected to each other).

I have managed to create the two machines, but I am a little bit stuck on how to create a standard switch between the two, I find the documentation is a bit unclear on that: what I currently manage is to create a Standard switch using the workflow "Create standard virtual switch", which has three inputs (host, name and nuber of Ports). That seems to be not sufficient, as I understand, for the switch to actually be visible, I need a portgroup, right? So I use the Workflow "Add port group in standard virtual switch", and this one I find complicated, becuse it has so many input parameters, none of which I find suitable to connect the switch I created. Which parameter do I have to pass, is it "name"? And which of the other parameters need to be filled, which are optional? Can anybody provide a sample?

Next, how can I connect one of the virtual NICs of my VC:VirtualMachine to one of the ports of the switch? Is there a suitable workflow for that too, or do you have a scripting example to shoe how to connect?

Any hints would be very helpful, thank you!

0 Kudos
0 Replies