Setting Default VDSwitch security for vCloud with PowerCLI

June 11, 2013

Table of Contents

Being versed with knowledge on vCloud provider have in many occasions helped my friends who have their own private vCloud ,so I thought it will be a good  idea to share this with you.

It is about setting default security permissions for all new  VDportgroups that were created by vCloud director. Which defers from when setting security on a single portgroup. It sets the default for all portgroups created after the setting change?

############################################

# Configuration Settings                   #

############################################

$switchName=”dvSwitch”

$promiscuous=$true

$forgedTransmits=$false

$macChanges=$false

###################################################

# no need to edit anything below this line #

###################################################

$dvSwitch = Get-VDSwitch $switchname

$spec = New-Object VMware.Vim.VMwareDVSConfigSpec

$spec.configVersion = $dvswitch.ExtensionData.Config.ConfigVersion

$spec.DefaultPortConfig = New-Object VMware.Vim.VMwareDVSPortSetting

$spec.DefaultPortConfig.SecurityPolicy = New-Object VMware.Vim.DVSSecurityPolicy

$spec.DefaultPortConfig.SecurityPolicy.AllowPromiscuous = New-Object VMware.Vim.BoolPolicy

$spec.DefaultPortConfig.SecurityPolicy.AllowPromiscuous.Value = $promiscuous

 

$spec.DefaultPortConfig.SecurityPolicy.MacChanges = New-ObjectVMware.Vim.BoolPolicy

$spec.DefaultPortConfig.SecurityPolicy.MacChanges.Value = $macChanges

$spec.DefaultPortConfig.SecurityPolicy.ForgedTransmits = New-Object VMware.Vim.BoolPolicy

$spec.DefaultPortConfig.SecurityPolicy.ForgedTransmits.Value = $forgedTransmits

$dvswitch.ExtensionData.ReconfigureDvs_Task($spec)

Luckily this will be help to those who need it.

Home

Share on
Facebook
Twitter
LinkedIn
Pinterest
More posts

Dedicated Servers Quick Guide

What is a Dedicated Servers? Why bother using a dedicated server over a VPS or Shared Hosting?A dedicated server is a server 100% dedicated to your website/project or business needs.

vCloud user training

It is clear that a lot of vCloud users are not well trained by their vCloud providers. This is due to the fact that the current training available is for

Storage Center 5.6 Released

There is a release of the storage center 5.6 and it comes with some features and platform support currently built into storage center 6.x as well as a large number

Get 90% Discount

First 3 People gets the Bonus!
Don't Miss Out Our Big Sale

Get 0-90% On All
247Rack Services

247Rack

The Sale Is Until The End Of March