Home > Blogs > VMware PowerCLI Blog > Monthly Archives: September 2010

Monthly Archives: September 2010

The PowerCLI Universe expands to Copenhagen – VMworld 2010


Hope to see you at VMworld 2010 Copenhagen. We have a great line up of sessions and activities for our PowerCLI fans. Hope to see you there.

Sessions: TA 6944 vSphere PowerCLI is for Administrators

Abstract: In larger organisations administrating a vSphere environment can cause headaches. Some of the burning questions you surely recognize:

Who gave that VM 4 CPU's ?
Who connected the NIC to the DMZ PortGroup and when ?

In this session, Luc Dekens and Alan Renouf will show you how to automate the answers to these questions with the help of PowerCLI.The solutions presented will show you how the combined strengths of the rich PowerShell command set and the PowerCLI snapin provide you with powerful tools to make this all happen.
Alan and Luc will show you how to take PowerCLI beyond the listing and reporting stage. They will show you how to write and use scripts that will inform you when problems actually.

This session will show several aspects of working with PowerCLI. The classic PowerCLI approach but also the use of the SDK methods when execution speed is required. And the use of third party products like PowerGUI, PowerWF or Microsoft System Center Operations Manager (SCOM) to integrate the solutions even better into the corporate environment.

Luc and Alan will show several practical demos to highlight this integration.
One of the demos will show for example how easy it is to use Active Directory to find a user’s email address and send him a message to tell him that his guest is using too many snapshots. If the mail stays unread, the script can try to reach the user via a Tweet.

Alan and Luc in SF VMworld – As you can see the sign in the back – register early. These guys tend to draw a massive crowd.

Labs: PowerCLI Lab 26

Abstract: This lab will provide hands on training for scripting a VMware environment. The goal is to provide all the tools needed to automate, integrate, and extend VMware vCenter™ for your environment. Attendees will use the Microsoft PowerShell based PowerCLI for scripting VMware vCenter™ and ESX. They’ll walk away from the lab with a better understanding of VMware Infrastructure, resources for using the toolkit, and a variety of scripts for performing common administrative tasks. Exercises will cover performing tasks based on VM attributes, performing actions on many VMs at a time, and exporting performance data. This lab does not require programming or scripting experience.

Lab Captain: Alton Yu


vSphere PowerCLI Booth

We will have our PowerCLI engineering and product management teams during event. So please do come on over and say hello. We will be in the Cloud Infrastructure and Management  Solutions.

vSphere PowerCLI booth in SF. We will also have plenty of PowerCLI Engineering and Product Management teams to ask questions and give us your feedback.


vSphere PowerCLI – New Services to help your organization

We are extremely happy to announce new Services for vSphere PowerCLI. These services are ideal for any organization building vSphere management scripts. Remember most of the things you can do with the vSphere Client you can do with PowerCLI.

vSphere Automation Course for PowerCLI

Education is key to unleashing the full power of VMware vSphere PowerCLI. Make certain that your IT professionals have the product training they need to fully utilize your investment in VMware solutions.

Register today for our new VMware vSphere: Automation with vSphere PowerCLI course.

VMware vSphere: Automation with vSphere PowerCLI is a two-day, lab-intensive course designed to teach your IT managers, system architects and system administrators how to automate all tasks with vSphere PowerCLI. Upon completing the VMware authorized training; your team will have gained hands-on experience and obtained the knowledge to fully utilize this powerful software from the product experts—ultimately, saving your organization time and money.

The best way to ensure that your organization uses VMware vSphere PowerCLI to its fullest functionality, i.e., to automate all aspects of VMware vSphere management, is to make certain your team has the product knowledge they need to be successful. Classes are available around the world and even online. Access the course details and find the class that fits your schedule and register today.

Download PowerCLI-Training-DataSheet

vSphere PowerCLI Scripting Support:

The VMware PowerCLI Support Program provides guidance when building PowerCLI scripts. The program has primarily been targeted at ISVs and now is available to VMware Customers and Partners. The Support teams have extensive experience working with the vSphere APIs and CLIs possessing in-depth knowledge around the intricacies of the powerful vSphere APIs. This program is ideal for Independent Software/Hardware Vendors (ISVs/IHVs), commercial and enterprise organizations building solutions for managing the vSphere platform.

Support will help you answer questions such as the following:

  • Can I do this task with PowerCLI ?
  • How do I do it ?
  • I tried it, and it’s not working. Did I do it correctly?
  • It doesn’t perform like it is supposed to. Is this a bug?
  • Why are my scripts not working in the new release of vSphere?

Support is available in two service level agreements: Standard support provides a response within two business days, and Premium support provides a response within one business day. SDK Support engineers won’t write or test your code for you, but they may provide sample code to express a suggested solution. If you need help writing code, we recommend contacting your local VMware sales representative or reseller for information on additional service options. Visit our Official SDK Support site to learn more about support for vSphere PowerCLI

Download PowerCLI Support-DataSheet

vSphere PowerCLI – Thank you for a great VMworld 2010 – SF !


Just wanted to thank everyone for your support and helping us make the VMworld 2010 – SF a great event. We were truly blown away by your support and enthusiasm. I put together a few photos to help us all relive the moments hope you enjoy.

Enjoy the collection of Photos and See you in Copenhagen

Monday night Dinner organized by Mr Scott, the whos who of PowerCLI at the Table. We were warned by the Secret Service not to have everyone in the same room without a security detail.(Humor)

PowerCLI is for Administrators ! – I dont think we will forget this anytime soon 😉

Thursday PowerCLI Session is for Administrators by Luc and Alan – Full House.

Poster mad rush – thanks for your support everyone. We promise to print more.

I can still hear the roar of the crowd. Great team work !

Long line for Tuesdays session – Only Room for 250 People – With 1500 attendees

I hope you guys stopped by and visited The POWERCLI SUPPORT TEAM at the PowerCLI Booth. Dildip K on the Left and Angela S. on the right. If you were not aware VMware FULLY SUPPORTS POWERCLI – Both Spiritually and with a 1,2 and 3 Year Contract more info -> http://vmware.com/go/sdksupport


The famous PowerCLI Poster – comes with Built in Folding Instructions

Onyx Released During Vlad and Yavor's Session – Get Onyx – http://vmware.com/go/onyx

Last Session with over 700 people attending. Thank you everyone !

PowerCLI and how it relates to the vSphere APIs – Remember vSphere APIs have interfaces for both Administrators and Developers


Snapshot Size

There have been multiple posts in the community about the size of the snapshots and how it should be calculated. There are some issues with the “SizeMB” property of the Snapshot object, so this post will try to explain what these problems are and what is the correct way to calculate snapshot sizes.

We’ll try to keep things simple and not go in too much detail. To start off let’s imagine you have a virtual machine with a single hard disk. This disk is represented as a “vmdk” file in the datastore (e.g. VM.vmdk). Whenever you write something on the hard disk of the VM it is saved in that VM.vmdk file (figure-1). 

When you create a snapshot this VM.vmdk file gets “frozen” and a new one (VM-1.vmdk) is created. The “frozen” VM.vmdk file represents the exact state of the VM’s hard disk at the time when the snapshot was taken. From that point on all changes on the VM’s hard disk are reflected in the new VM-1.vmdk file. Also a new “vmsn” file is created (e.g. Snapshot1.vmsm) which represents the state of the VM’s memory at the time of the snapshot creation (figure-2).


Similarly when a second snapshot is taken VM-1.vmdk gets “frozen” and VM-2.vmdk and Snapshot2.vmsn files are created, the same thing happens when we create a third snapshot (figure-3).


So how is the snapshot size calculated?

For each snapshot the size includes the sizes of the files needed to capture the state of the VM at snapshot time (e.g. hard disk and memory).

For Snapshot2 (figure-3) these files are Snapshot2.vmsn and VM-1.vmdk. The VM-1.vmdk contains all changes made after the first snapshot and it is required part of Snapshot 2.

For the currently active snapshot (e.g. Snapshot3), its size also includes the file which stores disk changes after the snapshot (e.g VM-3.vmdk, figure-3). Thus Snapshot3 files are Snapshot3.vmsn, VM-2.vmdk and VM-3.vmdk. VM-2.vmdk contains all changes since previous snapshot and VM-3.vmdk contains the current changes.

The root snapshot (e.g. Snapshot1) is based directly on the VM’s disk (e.g. VM.vmdk) but its size is not calculated (it’s calculated towards the size of the hard disk itself, not the snapshot). That way the files calculated in the size of each snapshot are the ones marked in orange in figures 2 and 3.

(Note: if we consider figure 3 and imagine that Snapshot2 is the currently active snapshot, then the size of VM-3.vmdk will be calculated in Snapshot2’s size, not Snapshot3’s)

Now for the “SizeMB” property of the Snapshot object. When calculating its value we use the above mentioned approach and calculate the size correctly for ESX 3.0 and 3.5. However there are some changes in the API behavior from 3.5 to 4.0 that we overlooked, thus resulting in wrong calculation of the snapshot size on ESX 4.0.

This issue will be fixed in a future release, but until then you can use the attached script to get the correct snapshot sizes. The script works on all ESX versions and uses the above mentioned approach for calculation.

Download GetSnapshotSize.ps1(fixed)

Dimitar Hristov & Vitali Baruh

PowerCLI Team

The PowerCLI Universe Continues to Expand – New session added to VMworld

Due to overwhelming demand the VMworld team has added a third Session at VMworld. This will be a great session by Alan and Luc and you will also get a chance to meet the PowerCLI engineering team to give feedback and just say hello and also get your Poster.
Please check your schedule for latest updates and room changes.
Session ID: TA6944
Time   Room
Tuesday 11:00 AM
Moscone North Room 133
Wednesday 10:30 AM
Moscone South Room 103 <= Just added
Thursday 10:30 AM Moscone South Room 302

Come visit us at the PowerCLI / API Demo Booth – VMworld Tech Exchange


We managed to get most of our SDK and PM teams to hang out and meet you guys at our booth during VMworld. Please note peoples schedules subject to change due to the nature of the event.

Latest updates @VMdeveloperday

Demo Location: Moscone Solutions Floor: vPod C112

Demo Description Overview: The demo will target System Administrators and Developers interested in using the vSphere APIs to manage the vSphere Platform.


Monday August 30, 2010

AM Shift




PM Shift

4:00 – 7:00

Pablo Roesch

vSphere SDK Product Marketing

Sia Yiu

Sr. Product Manager PowerCLI

Sidharth Surana

SDK MTS Ecosystem Engineering

Steve Jin

Sr. MTS Ecosystem Engineering

Tuesday August 31, 2010

AM Shift

11:00 – 2:30

Yavor Boychev

VMware Engineering Mng.

Sidharth Surana

SDK MTS Ecosystem Engineering

PM Shift

2:30 – 6:00

Dildip Kaur

SDK Dev Support Engineering

Angela Soni

SDK Dev Support Engineering

Wednesday September 1, 2010

AM Shift

10:00 – 2:00

Vladmir Goranov

VMware Engineering Manager – PowerCLI

Yavor Boychev

VMware Engineering Manager – PowerCLI

Sidharth Surana

SDK MTS Ecosystem Engineering

PM Shift

2:00 – 6:00

Dildip Kaur

SDK Dev Support Engineering

Angela Soni

SDK Dev Support Engineering

Rajesh Kamal

SDK MTS Ecosystem Engineering

Thursday September 2, 2010

AM Shift Only

10:00 – 2:00

Sidharth Surana

SDK MTS Ecosystem Engineering

Rajesh Kamal

SDK MTS Ecosystem Engineering