ESXi

 View Only
  • 1.  Managing Distributed Switch from CLI??

    Posted Nov 19, 2014 08:44 PM

    I have a DvSwitch.

    I want to add NEW port groups,

    But i do not want to use vCenter.

    I have many to add , roughly 800

    of the 800, 600 would be port groups with simple vlan no tagging...

    the rest 200 would be .1q with 21 vlans per port group... :smileyhappy:

    I want to script it...... then drop it into a ssh/shell window

    can it be done?

    :smileyhappy:



  • 2.  RE: Managing Distributed Switch from CLI??
    Best Answer

    Posted Nov 19, 2014 09:55 PM

    Hi,

    You can use the powercli command New-VDPortgroup to create port groups on distributed virtual switches. You need to have powercli installed for this.

    Try the following command " Get-VDSwitch -Name "MyVDSwitch" | New-VDPortgroup -Name "MyVDPortGroup" -NumPorts 8 -VLanId 4".

    You can check the following link for more details. https://pubs.vmware.com/vsphere-51/index.jsp?topic=%2Fcom.vmware.powercli.cmdletref.doc%2FNew-VDPortgroup.html

    Thanks,

    Arun



  • 3.  RE: Managing Distributed Switch from CLI??

    Posted Nov 26, 2014 02:44 AM

    thanks I was able to use the cli and to create my 2045 port groups , while it take some time , it was so much easier... i am now moving over to managing with the cli instead of vcenter ....