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.

Hacking the vCloud Director browser support warning

I came upon this article where some guy was explaining how to Hacking the vCloud Director to work on other browsers like chrome. So when he ran this: Invoke-RestMethod “https://vcloud.example.com/cloud/org/jake”

UPLOADING vmS TO VcLOUD WITH OVFtool

VMware’s OVFtool is a command line tool that allows you to convert VMware Virtual machines to Open virtualization Format (OVF). There have been some update in the latest version that

Organizing Your Slim Based Project

A Slim Based Project is basically extended over three main directories. Slim framework directory Project directory This directory contains your project files like routers, views, models. Being a microframework, Slim

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