Showing posts with label PowerCLI. Show all posts
Showing posts with label PowerCLI. Show all posts

Monday, August 6, 2012

Lab Manager 4 runs out of ports on your vDS

If you see an Error such as:

Unable to deploy virtual machines in resource pool "LBM4".

  • Error deploying configuration networks.
    • dvs.VmwareDistributedVirtualSwitch.addPortgroups task on AddDVPortgroup_Task failed: fault.LimitExceeded.summary
      • The numPorts value : 8215 in spec exceeded maxPorts 8192.

Even though the vDS (VMware Distributed Switch) maximum went up from 4,096 to 20,000 in vSphere 4.1, the vDS won’t be able to go over 8192 unless you manually modify the vDS.  You would have already upgraded the vDS from a 4.0 to a 4.1 to have a number this high.

Here is the VMware KB that tells you how to manually increase the size of your vDS

http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1038193

Tuesday, January 17, 2012

See old entries in vSphere “Tasks & Events”

Go into PowerCLI
Export it out so that you can search it.
[vSphere PowerCLI] C:\Program Files (x86)\VMware\Infrastructure\vSphere PowerCLI
> Get-VIEvent > c:\event.txt

Thursday, December 15, 2011

PowerCLI command to enumerate VM’s mac address inside of vCenter

I did not write this, I found it online but lost the link, but it works great!
ForEach ($VirtualMachine in $VM) {
    # Get the virtual machine
    $VMsView = Get-View -ViewType VirtualMachine -Property Name,Guest.Net -Filter @{"Name"="$VirtualMachine$"}
    if ($VMsView) {
      $VMsView | `
        ForEach-Object {
          $VMview = $_
          $VMView.Guest.Net | `
            Select-Object -property @{N="VM";E={$VMView.Name}},
              MacAddress,
              IpAddress,
              Connected
        }
    }
}