Configure vSS and vDS settings using command line tools

I already talked about Standard Switches in:

https://ahmadelgendi.wordpress.com/2015/02/23/create-and-configure-a-standard-virtual-switch-using-powercli-esxcli-3/

So here I will play little with Distributed one !

PowerCLI C:> get-command *net* | Where-Object {$_.CommandType -eq ‘cmdlet’}

Another one: get-command *switch* | Where-Object {$_.CommandType -eq ‘cmdlet’}

New-VDSwitch -Name

So,,

PowerCLI C:> get-command *switch* | Where-Object {$_.CommandType -eq ‘cmdlet’}

PowerCLI C:> Get-VDSwitch -Name

Create VDS portgroups:

PowerCLI C:> Get-VDSwitch

Verifying created settings:

Host: 10.26.0.221 has a 3 Nics in Standard vSwitch0:

Let’s take 2 ones:

First we need to know what Nics we have as we are connected on vCenter not a single host, So we list all VMNICs we have in our cluster

PowerCLI C:> Get-VMHostNetworkAdapter -Physical -Name vmnic* | Select-object VMHost,DeviceName,Mac

$vmhostNetworkAdapter = Get-VMHost “10.26.0.222” | Get-VMHostNetworkAdapter -Physical -Name vmnic2

Get-VDSwitch “March” | Add-VDSwitchPhysicalNetworkAdapter -VMHostNetworkAdapter $vmhostNetworkAdapter

This error because we did not add the host to the dVswitch:

PowerCLI C:> Get-VDSwitch -Name “March” | Add-VDSwitchVMHost -VMHost “10.26.0.222”, “10.26.0.224”

Verifying Uplink from the switch:

Advertisements

About Ahmad Sabry ElGendi

https://www.linkedin.com/pub/ahmad-elgendi/94/223/559
This entry was posted in Uncategorized, VCAP5-DCA, Vmware. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s