new1234.jpg

Archive

Posts Tagged ‘PowerGroup’

VMware: Mass change portgroup VM’s in cluster with PowerCLI

January 10th, 2013 3 comments

Last week I configured for a customer some new VLAN’s and created on each host new vSwitches with new portgroups, to migrate all VM’s in cluster with network label “VM Network” to “Production” I’ve created this script to automate this for all virtual machines with specific network label in cluster:

Original situation:

image


Script
:

#====================================================================#
#   SCRIPT:        PowerCLI_Mass_change_network_label.ps1            #
#   FUNCTION:      Mass change network label Network A to Network B  #
#   OWNER:         Sander Daems                                      #
#   VSPHERE:       5.0 Update 1 build 623860                         #
#   CREATED:       10/01/2013                                        #
#   MODIFIED:      10/01/2013                                        #
#   VERSION:       v.1.0                                             #
#====================================================================#
#   CHANGELOG:                                                       #
#                                                                    #
#    v.1.0                                                           #
#    - Script created;                                               #
#                                                                    #
#====================================================================#
#   HOST - Specify host and connect                                  #
#====================================================================#
$vCenterServer = Read-Host "Enter vCenter Hostname / IP"
Connect-VIServer $vCenterServer
#
#====================================================================#
# CUSTOM DEFINITIONS                                                 #
#====================================================================#
$Cluster = "Cluster01" 
$SourcePortgroup = "VM Network" 
$DestinationPortgroup = "Production" 
#
#====================================================================#
# SCRIPT                                                             #
#====================================================================#
Get-Cluster $Cluster | Get-VM | Get-NetworkAdapter | Where {$_.NetworkName -eq $SourcePortgroup } | Set-NetworkAdapter -NetworkName $DestinationPortgroup -Confirm:$false#====================================================================#

 

Result:


New situation
 (All VM’s in cluster):

image

sanderdaems

Sander Daems is founder and author of this blog and working as a Lead (Sr.) Consultant by UNICA ICT Solutions. Sander has over 15 years experience in IT, primary focus: virtualization and modern worksplace.

More Posts - Website

Follow Me:
TwitterLinkedIn

VMware: Creating iSCSI network in vSphere ESXi 5.0

July 13th, 2011 35 comments

I was trying to configure my central storage (StarWind iSCSI SAN) in my homelab, but couldn’t find the software iSCSI Adapter.. huh.. it’s removed?

Storage Adapter:

image

Nope.. by default it’s not installed, you must manual add the adapter by clicking Configuration > Storage Adapter > Add Storage Adapter

image

– Select: Add Software iSCSI Adapter

image

A new software iSCSI adapter will be added to the Storage Adapters list. After it has been added, select the software iSCSI adapter in the list and click on Properties to complete the configuration

Read more…

sanderdaems

Sander Daems is founder and author of this blog and working as a Lead (Sr.) Consultant by UNICA ICT Solutions. Sander has over 15 years experience in IT, primary focus: virtualization and modern worksplace.

More Posts - Website

Follow Me:
TwitterLinkedIn