For When You Can't Have The Real Thing
[ start | index | login ]
start > VMware > ESXi > 6.0 > vCLI > Port Groups

Port Groups

Created by dave. Last edited by dave, 56 days ago. Viewed 69 times. #1
[edit] [rdf]
labels
attachments
(2017-02-27)

Port Groups using vCLI

export VI_SERVER=vcenter.domain.local
for i in 0 1 2 3 4 5 6; do
  esxcli --vihost esxihost-0$i network vswitch standard portgroup list
done

If you can do that, you’ll be able to add new VLANs (called “port groups” in the vCLI nomenclature) to vSwitches from the command line, like this:

export VI_SERVER=vcenter.domain.local
for i in 0 1 2 3 4 ; do
  esxcli --vihost esxihost-0$i network vswitch standard portgroup add -v vSwitch2 -p BeerCan-204
  esxcli --vihost esxihost-0$i network vswitch standard portgroup set -p BeerCan-204 -v 204
done
for i in 5 6 ; do
  esxcli --vihost esxihost-0$i network vswitch standard portgroup add -v vSwitch1 -p BeerCan-204
  esxcli --vihost esxihost-0$i network vswitch standard portgroup set -p BeerCan-204 -v 204
done
no comments | post comment

Virtual Dave Megaplex:

Internet Explorer 6 Users >>Click Here

(read this note about local search)

Logged in Users: (0)
… and 18 Guests.


Editing: snipsnap-help, Image Macro

(Et auditum est, et idcirco ego nunc simulare)

Installed 6 years and 102 days ago
Powered By >>SnipSnap Version 1.0b1-uttoxeter

This is a collection of techical information, much of it learned the hard way. Consider it a lab book or a /info directory. I doubt much of it will be of use to anyone else.

Useful:


snipsnap.org | Copyright 2000-2002 Matthias L. Jugel and Stephan J. Schmidt