Virtualization Pro

Mar 4 2010   4:16PM GMT

Technical tips from you, the readers!

HannahDrake Hannah Drake Profile: HannahDrake

Last week, I traded books for tips from you — the readers. Several people now have additional literature in their possession. And as great as that may be for them, the real value is in sharing the tips they bartered for  books.

Here are the tips:


“When in doubt, Google it. There is a great community of users out there to leverage. Many times they have the answers before the product techs do.”  –Cory Gabriel


“Don’t go to VMware for support using Site Recovery Manager (SRM).” –Andrew Heyn


“After nearly half a week of setup, don’t use open source XenSource. There is no zen in Xen.”  –Jason Ruiz


Here is a bit of PowerShell Alan Renouf of helped me develop. In our hosting environment we limit outbound traffic to 100 MBps so that any of the ~200 virtual machines on our nine hosts can’t flatten any of our upstream connections (as they have in the past!)”  — Daniel Roberts

 Add-PSSnapin -Name “VMware.VimAutomation.Core”


$VCUser = Read-Host “User ID: “

$VCPassword = Read-Host “Password: “

$portgroupname = Read-Host “Enter the name of the PortGroup:”

$vlanid = Read-Host “Enter the VLAN ID”

$viserver = Read-Host “Enter the vCenter Server FQDN or IP”


Connect-VIServer -Server $viserver -User $VCUser -Password $VCPassword

$ESXHost = Get-VMHost | Sort-Object -Property Name


ForEach($objHost in $ESXHost){

    $VSwitch = Get-Virtualswitch -VMHost (Get-VMHost $objHost) | where-object { $_.Name -match “Vswitch1” }

    Write-Host “Adding Virtual Port Group” $portgroupname “with VLAN Tag” $vlanid “to” $objHost

    $PG = New-VirtualPortGroup -Name $portgroupname -VirtualSwitch $VSwitch -VLanId $vlanid


    $vswitchName = $vSwitch.Name

    $pgName = $PG.Name

      $pgVlanID = $PG.VLanId


    $HS = $objHost | Get-View

    $nwSys = $HS.ConfigManager.NetworkSystem

    $mor = Get-View $nwSys


    $portgrp = New-Object VMware.Vim.HostPortGroupSpec

    $portgrp.Name = $pgName

    $portgrp.VswitchName = $vswitchName

      $portgrp.VlanId   = $pgVlanID

    $portgrp.policy = New-Object VMware.Vim.HostNetworkPolicy

    $portgrp.policy.shapingPolicy = New-Object VMware.Vim.HostNetworkTrafficShapingPolicy

    $portgrp.policy.shapingPolicy.enabled = $true

    $portgrp.policy.shapingPolicy.averageBandwidth = 104857600000

    $portgrp.policy.shapingPolicy.peakBandwidth = 104857600000

    $portgrp.policy.shapingPolicy.burstSize = 107374182400


    $mor.UpdatePortGroup($pgName, $portgrp)





“Changing VM folder names for better organization — With vSphere and vCenter version 4, it is now possible to change the folder names in which your VMs are stored without manually editing .vmdk definitions and powering off the machines for cold migrations.


1.) In the vCenter interface, rename the VM to the name you would like the underlying folder to have
2.) Perform a storage VMotion of the machine from one datastore to another. Choose thin provisioned format to save on disk space as an added bonus.
3.) Observe underlying folder and other VM configuration files have changed names on the fly. Also causes VMDK files to have sequential numbering.

This helps avoid the situation where you don’t know which VM is which because the folder name has nothing to do with the current machine name. (Happened to me at least once or twice). Also, nice thing about the thin-provisioning (if you decide to do it) — you can always right-click on the VMDK in the datastore browser and click Inflate to convert the disk back to a thick disk, also on the fly.” –Chris Wells


“For beginners like myself: Be sure to buy a VMware book when your boss decides to implement VMware in your environment, and be sure to have a backup plan in place from day one!” –Rowell Dionicio


“When doing a P2V of a Windows server, be aware of the OS licence. OEM licences do not like to be virtualized. You will need to run a Windows repair install and use a new licence key.” –Craig Dalrymple


“In order to trunk network interface cards (NICs), you have to set your active NICs’ load balancing to “Route based on IP hash.” And always make sure you are trunking the right ports on the switch. ;)” –Jason Wainwright


And last but not least, a vendor decided to plug its own free tool:

“My tip for you is that there are many free tools out there that will help users manage their environment. Our company (VKernel) just released a new one today that shows administrators what they have for physical resources and how much of them have been allocated, as well as the number of VMs that are over- or under-provisioned. This is a powerful but small app that runs on a Windows desktop and connects directly to vCenter.

It can be downloaded from here and looks like this:



Think your tip should be on our blog as well? Email it to me!

3  Comments on this Post

There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when other members comment.
  • FrankV8
    The tip on the OEM license should be removed. The OS is tied to the physical hardware.
    0 pointsBadges:
  • Cragdoo
    hence the reason for the re-install and the new license
    0 pointsBadges:
  • Cragdoo
    sorry , meant the repair install (all customers data retained)
    0 pointsBadges:

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

Share this item with your network: