2010-03-30

Review Your Infrastructure Needs Regularly - or ....

Let me give you a real case scenario. (I am not saying that any of the implementations in this example are best practice)

Default rack that was installed was a 42U rack.

Each rack was populated with no more than 16 Servers. (This was the most that they were willing to lose in the case of losing a full rack and also due to cooling issues per rack they were leaving 1U empty between each server).

Each rack has a 16 port LCD KVM keyboard tray (1 for each server).

Each rack has 24 1Gb Ports and also a 48port 10/100mb for backup network and management ports.

Up until now each Server by default had 1 NIC connected to a 1Gb port and the backup to the 100mb port - which left them with 16/24 1Gb ports populated.

Enter ESX.

Each ESX server has by default 6 NICS

  • vmnic0 + vmnic5 - SC + Vmotion
  • vmnic1 + vmnic3 - Iscsi/NFS storage
  • vmnc2 + vmnic4 - VM network traffic

Out of the 16 servers in each rack 2 ESX servers in a rack (the most they would risk is two hosts per rack)

Quick math again.

2 ESX hosts x 6 ports = 12 (All port have to be 1Gb)

OK 14 more servers in the rack - but one sec, there are only 12 ports free - which means that you can only put in 12 more servers.

The options were:

  • Run more 1GB cables to the Network Infrastructure - more switch ports which meant additional cost
  • Reduce the number of servers per rack to 14 servers per rack (not 16) - which meant 2 KVM ports were wasted and more empty U's in each rack.
  • Run some production servers not on 1Gb infrastructure
  • Deploy 10Gbe - cost for 10Gbe NICS and modules for the Backbone infrastructure

What happened here? The racks were cabled several years ago - before Virtualization was something that they had in their datacenter - and they had what they thought more than enough place to grow in their network ports, and they did until they started to put in ESX servers with 6 NIC's each.

Of course all of the options above have a cost with them - be it a cost that you have to lay out immediately or cost of not utilizing the resources they had to the full extent (rack space + KVM).

What was decided in the end, you may ask - well I do not have a definitive answer to that yet - because it is still under deliberation - as to which option they will choose.

What can you learn from this experience?

  1. You should review you datacenter infrastructure at regular intervals. What was suitable for you 2 years ago is not necessarily the same today.
  2. Bringing in a new technology will definitely have some benefits - but it will also have its caveats as well.
  3. Virtualization is not only something that touches one aspect of your infrastructure (be it your initial savings on costs of Hardware / Operating System Licensing) it affects everything:
    • Network - what ports and how many
    • Storage - is your storage fast / big enough?
    • Hardware - do you scale up / scale out
    • Operating Systems - Licensing models will change
    • Backup / Restore - will your system suffice?
    • BCP / DR - should you use new technologies (SRM)?
    • IT Procedures - Server provisioning - and lifecycle
    • Manpower - Maybe your headcount will shift according to your changing needs
    • Cooling - depending on your hardware your cooling needs will change
    • Electricity - ditto
    • Maintenance fees - for hardware will change - and software as well
    • OPEX / CAPEX - VMware Licenses - MS licenses - Hardware contracts
    • Rack Space - how much will you need in a rack?
    • User Education - they will get exactly what they pay for and do not need a gazillion cores :)

As you can see the list is long - and I am actually not sure that I have all the elements listed here.

I would be interested in hearing from you all if you have any additional elements that this will affect and your thoughts in this article.

2010-03-29

Install EMC PowerPath/VE with Update Manager

I was looking into this a short while ago – after updating the hosts to Update 4.01.

This VMware KB – 1018740 will show you the way.

Download the the Powerpath/VE 5.4 SP1 package from Powerlink

(if you are looking for the document location manually - Home > Support > Software Downloads and Licensing > Downloads P-R > PowerPath for VMware).

Once the package is downloaded extract the zip package to a folder which is accessible to a web browser.

image

Once you confirm that the package is accessible from a web browser – you are ready to go.

image

The beauty of it all is that this can be done in Update Manager.

image

Make sure you put the full path to the xml file!!

image

Apply and Download Now

image

image

And the progress shoots off

image

We then create a new Host Extension Baseline to deploy the package

image

image

You will then have a new Extension Baseline

image

You can then Attach that baseline to your host/s - stage and remediate..
(Mind you it requires maintenance mode and a reboot)

image

This is not including the licensing that needs to be set up for PowerPath.

Noticeable mentions on the topic are:

HOWTO: Download, Install and License EMC PowerPath/VE – Chad Sakacc

White Paper: Third Party PSPs – EMC Power Path for VMware – Mike Laverick

2010-03-28

Inject VMware drivers into Source OS before P2V

P2V a machine - who does not want to get rid of all their physical machines to get the rid of the old hardware? If so raise you hand!

So now that we have that out the way - P2V'ing a Windows 2000 Operating System is not always as straight forward as a the other operating systems.

Take into account the following scenario. you have a Windows 2000 SP6 Server running a customized app. You start the Convert process, either using Converter Standalone - or the Guided consolation plug-in. You let the process run - and anything from 45minutes to  hours later - you have a new VM registered in you virtual infrastructure.

Yey! - But - the conversion process - reported as failed somewhere between 97-99%.

The VM - is there so you power on the VM - and BAM! Blue Screen!!!

  • STOP 0x7B INACCESSIBLE_BOOT_DEVICE

or

  • STOP 0x0000007B INACCESSIBLE_BOOT_DEVICE

And of course I could not boot the converted machine.

This brought me to this KB article on VMware's site - which provided this solution
Injecting SCSI controller device drivers into Windows

Before you convert the virtual machine you should perform the following on the source OS.

All Windows Versions (vmscsi only)

To copy the appropriate disk controller driver from a working virtual machine with a Windows guest operating system:

Download the VMware SCSI Disk Controller driver diskette here.

Copy the contents of the floppy either by mounting it or extracting the files

Right-click vmscsi.inf and click Install. The VMware SCSI drivers are installed.

Restart the source machine to complete installation.


Windows XP / 2000 / NT (buslogic and vmscsi)

Find a working VM installed with the same OS. Export these 3 registry keys.

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\BusLogic

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\CriticalDeviceDatabase\
pci#ven_104b&dev_1040

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\vmscsi

(Note
: The vmscsi service registry key may not exist if VMware Tools is not installed on the virtual machine.)

Import these 3 registry keys onto your source machine.

Perform your conversion


Windows 2003 (lsilogic and vmscsi)

Find a working VM installed with the same OS. Export these 3 registry keys.

    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\symmpi

    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\CriticalDeviceDatabase\
    pci#ven_1000&dev_0030

    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\vmscsi

    (Note
    : The vmscsi service registry key may not exist if VMware Tools is not installed on the virtual machine.)

    Import the registry keys onto your source machine.

    Restart the source to complete installation.

    Perform another conversion with VMware Converter.

    Now will this be needed every time? No! I have performed many a P2V on all of the above Operating Systems - without any problems at all and without injecting the registry keys beforehand. But for the case that the conversion will fail  - this should help you out immensely.

    Personally -  I would make this best practice and inject the drivers in by default.

    2010-03-22

    SureBackup by Veeam

    I was one of a few blogger that were invited to participate yesterday in a Bloggers briefing -
    given by Doug Hazelman - presenting Veeam's new product Surebackup.

    Well this is not actually a new product as such - but a family of the current technologies that Veeam use with the addition of one significant new feature that will be introduced in Q3 of 2010 in Backup and Replication v5.

    Some of the points that were shown at the briefing - which I am sure will be public as well after the announcement.

    One of the biggest issues Administrators have with verifying the validity of Backups of an OS is that when doing this you cannot only rely on the restore only of one restored system.

    Let me give you an example:

    Verify an Exchange Backup. For this you will need Exchange, DNS, Active directory , which means we are not talking only about one system, but multiple systems. The same would go for almost any Web application restore as well.

    Now in the case of the Exchange backup, the restore will entail not only multiple Operating Systems, but also having to isolate these machines from the production Network.

    So as you can see - we all have a problem with attesting to the reliability of the backups that we take - will they actually work when push come to shove? It is not a definite answer - one way or the other.

    So how will SureBackup help us out? With the new technology - you will be able to to verify the backups of your VM's . How will this be done? The VM's can be brought up in a fenced environment (isolated) and they can be "packaged" as a vApp to come up as a group. But even more so - you will be able to run these VM's from the compressed backup files - without even having to inflate them. One thing that all participants were amazed about was the information below

    image

    And a slide to give a bit more info about the process and something to think about the future

    image

    image  Some other points to note:

    • The restore can be done on existing ESX hosts - no extra licenses are needed.
    • The restore and verification can be done directly to your DR site - because it will be on an NFS store that can be mounted (of course this will be automated to say you loads of time)
    • This will not be a replacement for SRM

    I for one will be looking forward to the Beta for the Product when it is released - this will be an interesting one!

    Thank you again Doug for the opportunity to

    2010-03-19

    Distribution and Security Groups

    I was asked to day at work, "What would be the quickest way to add all of the members of a Distribution Group to a Security Group?", the reason of course being because you cannot assign permissions to a Distribution group.

    My answer was, "To script it."

    And I never would have thought how easy it would be

    Get-QADGroupMember "My_DG_GROUP" | Add-QADMemberOf -Group "MY_SG_GROUP"
     
    
    • Amount of time spent on Task: 30 seconds
    • Financial investment in that task: Depends on how much you make per hour :)
    • The reaction I got for doing something so complicated "so quickly": PRICELESS!!!!!

    2010-03-18

    CD Connected to Another Client

    While trying to VMotion a VM I hit an error because of a Mounted CD. Well you might say – that is simple. Just go into the GUI and then disconnect it.

    But this time it was connected  and open in another users sessions so I got this

    image

    The reason I think this was happenning was because of the other user still having a console session open to the VM with the CD mounted.

    This post on VMTN spoke about a perl script that would allow you to disconnect – but I thought why not try with PowerCLI

    get-vm myvm | Get-CDDrive | Set-CDDrive -Connected:$false -confirm:$false

    That disconnected the CD and allowed me to VMotion the machine without any issues.

    2010-03-17

    A running VM that did not exist

    This was a weird one that hit me today.

    I had a performance issue on a server.

    esxtop is the first I thing I looked at and got this:

    ID    GID NAME NWLD   %USED    %RUN    %SYS   %WAIT    %RDY   
    69     69 VSE  5      83.98    85.74   0.00   380.16   22.14 

    So I looked to which machine it was:

    [root@dmz1 root]# vmware-cmd -l | grep VSE
    [root@dmz1 root]#

    And the result I got was nuddah!!

    So next

    [root@dmz1 root]# vm-support -x | grep VSE
    vmid=1428       VSE

    [root@dmz1 /]# ps -efww | grep VSE
    root      4426     1  0 Feb23 ?        00:00:06 /usr/lib/vmware/bin/vmkload_app ……   …… a/VSE/VSE.vmx
    root      4476  3756  0 12:27 pts/2    00:00:00 grep VSE

    So there was a running VM – or so it seemed.

    I ran the same steps the other host in cluster

    ID    GID NAME NWLD   %USED    %RUN    %SYS   %WAIT    %RDY   

    59     59 VSE  5      11.74    11.96   0.00  487.23    6.94

    [root@dmz2 root]# vm-support -x | grep VSE
    vmid=1410       VSE

    [root@dmz2 root]# vmware-cmd -l | grep VSE
    [root@dmz2 root]#

    OK so what was going on here? Looking at the details of the machine – I saw that the name of the VM had no correlation to the actual folder it was in

    image

    Looking for the machine again

    [root@dmz2 root]# vmware-cmd -l | grep CSG1
    /vmfs/volumes/…………a/CSG1/CSG1.vmx

    [root@dmz1 /]# vmware-cmd -l | grep CSG1
    [root@dmz1 /]#

    OK. So I now have found the machine Named VSE running on dmz2 but I still had a process running on dmz1 that was taking up CPU

    [root@dmz1 /]# ps -efww | grep VSE
    root      4426     1  0 Feb23 ?        00:00:06 /usr/lib/vmware/bin/vmkload_app ……   …… a/VSE/VSE.vmx
    root      4476  3756  0 12:27 pts/2    00:00:00 grep VSE


    I looked into the folder itself

    [root@dmz1 /]# ls -la /vmfs/volumes/……a/VSE/
    total 23413952
    drwxr-xr-x    1 root     root          980 Mar 17 11:39 .
    drwxr-xr-t    1 root     root         2380 Mar 15 11:21 ..
    -rw-------    1 root     root         2510 Mar 17 11:35 vmdumper.png
    -rw-------    1 root     root     23573652480 Feb 23 23:53 VSE_1-flat.vmdk
    -rw-------    1 root     root     268435456 Feb 23 23:53 VSE-6785c36f.vswp
    -rw-------    1 root     root     131604480 Feb 23 23:53 VSE-flat.vmdk
    -rwxr-xr--    1 root     root         1960 Feb 24 02:04 VSE.vmx
    [root@ilesxdmz1 /]#

    As you can see all the files were old and this looked like a Phantom machine

    Time to kill the process on dmz1

    I have the wid (WorldID) from before – 1428

    [root@dmz1 /]# less /proc/vmware/vm/1428/cpu/status

    You will find the master world ID for this process will be in the output after the vm.XXXX
    (the 4 digits - in my case it was 1427)

    Then kill the process

    [root@dmz1 /]# /usr/lib/vmware/bin/vmkload_app -k 9 1427
    Warning: Mar 17 12:37:04.706: Sending signal '9' to world 1427.

    Process was gone and not using a full proc on nothing

    [root@dmz1 /]# ps -efww  | grep VSE
    root      4785  3756  0 12:37 pts/2    00:00:00 grep VSE

    Just to be on the safe side I took a vm-support snapshot of the VMID before the whole process – maybe I can find something out about the problem later on.

    How the phantom happened I am still not sure. What worries me more – is how this can be detected in the future and I do not have to wait for a problem to arise to find these things out.

    I would be interested in hearing your comments or suggestions as to how to address the above question.

    2010-03-16

    Network Ports needed for VMware Products

    As usual looking for this list of which ports need to be punched through the firewall in order allow all kinds of services to work correctly.

    Well today – I tried to scan a host for (that is behind a firewall) and vCenter failed with this error message:

    image

    Now since I knew that this was behind a firewall and only the needed ports are opened (the way it should be) I knew that it was a firewall problem, also because scanning other hosts (not behind this firewall) worked fine.

    So after looking at the logs on the firewall it showed that the communications were being dropped
    ESX –> vCenter on port 9084
    vCenter –> ESX on port 5989

    Opening up the ports allowed for the Scan and Remediation to complete successfully

    Now of course looking for the list of ports needed to be opened for proper communication
     on Google – two links came to mind..

    1. Greg A. Lato – VMware Network Portlist 
    2. VMware KB

    So after adding the list from the KB above into an useable list, you can add the excel file below to your useful list of documents can use as well.

    VMware Network Ports

    Hope you you make use of this in your troubleshooting adventures!

    --Edit for this post-- 21/04/2010

    I would also like to point to two notable mentions and other resources that are of great benefit.

    1. Forbes Guthrie's page - Firewall diagram – version 5
    2. Hany Michael's page - Diagram: VMware vSphere 4.0 in The Enterprise

    My ESXi Script-O-Mania entry - Deploy-ESXi

    I have submitted a script for the VMware Script-O-Mania contest that will end in a little under 9 hours from now.

    The idea behind the script was for automating the deployment of a stand-alone ESXi server.

    A small demo you can see below.

    2010-03-09

    Generate a Random Password - Powershell



    A task that I do quite often when building a new System is to create random password a local user on the machine – Don’t ask – it is a an OPSEC requirement from way before my time.

    So instead of Running my fingers of the keyboard in a random way and having my colleagues ask what I am doing each time I decided to simplify this Powershell.

    Dmitry Sotnikov’s post set me in the correct direction, the result below is a function that will prompt you for the length you want, create a password and put it in your clipboard

    #========================================================================
    # 
    # NAME: Generate-password
    # 
    # AUTHOR: Maish Saidel-Keesing
    # DATE  : 09/03/2009
    # 
    # COMMENT: Will generate a random password according to required length
    #
    # ========================================================================
    
    function Generate-Password () {
        param ()
        PROCESS {
            	if ($args.count -eq 0)  {
                    do {
            	       $length = Read-Host "How many characters long should the password be?"
                    } until ($length -ne $null)
                } else { $length = $args[0] }
    
        #load Assembly
        [Reflection.Assembly]::LoadWithPartialName("System.Web")
        $password = [System.Web.Security.Membership]::GeneratePassword($length,3) 
        $password | clip
        Write-host The password is now in your clipboard
        }
    }
    


    Line 16-20. If there is no argument passed then it will prompt you for the number of characters needed in the password

    Line 23. load the System.Web.Security Namespace

    Line 24. Generate the password. The two parameters that are needed are password length and numberOfNonAlphanumericCharacters

    Line 25. clip is a command line utility for the clipboard. In this case I piped it into the clipboard so I could paste it into the password window.

    2010-03-08

    Spring on VMware Promotion

    VMware acquired Springsource not so long ago, and now they have started to offer their first promotion.

    Excerpt of the announcement below

    As IT organizations continue to virtualize increasing proportions of their datacenters, the virtualization of servers running custom Java applications is becoming increasingly common. Building and running custom Java Spring applications on an application server that is ideally suited for usage in a virtual environment is a critical step in extending the operational efficiencies of virtualization to a greater proportion of server workloads. With its lightweight footprint that allows for higher application server density in a virtual machine and tight integration with the Spring application framework, tc Server Spring Edition 2.0 is the best application server to run Spring applications and ideally suited for a virtual environment.

    Spring on VMware Promotion

    Build your applications to be run in a virtual environment with SpringSource tc Server Spring Edition 2.0 – free with the Spring on VMware Promotion.

    To help you get started, VMware is pleased to announce the “Spring on VMware Promotion”. Under this promotion, all customer orders fulfilled  between March 8th 2010 and May 8th 2010 that include products (license only) from the vSphere, vCenter, View or ThinApp product family will receive 2 perpetual, production-use CPU licenses of tc Server Spring Edition 2.0 and 60 days of Evaluation Support for SpringSource (collectively referred to as the “Spring on VMware Bundle”). Key Terms and Conditions include:

    • 60-days of Evaluation Support for SpringSource (60-days of web-only support) included for no additional charge as part of promotion. After the 60-days of Evaluation Support for SpringSource, customers may purchase VMware Basic or Production Support at the then-current list price.
    • Start date for the Evaluation Support for SpringSource will be the date on which the promotion codes are sent to the customer.
    • One (1) Spring on VMware Bundle fulfilled per order, not to exceed one (1) per customer during the promotional period.
    • Prices for eligible products may vary if purchased through resellers or in different regions. Please contact your authorized VMware reseller for pricing information.
    • This promotion is available to all customers who make a qualifying purchase from a VMware authorized reselling partner, from the VMware website or directly from VMware. Exception: This promotion is not available for OEM partners ordering directly from VMware. Check with your VMware authorized reselling partner for promotion eligibility.
    • Customers will receive their promotion code for the Spring on VMware Bundle on or before May 10, 2010. Promotion codes must be redeemed within 60 days from the day they are sent to the customer.

     

    Terms and Conditions

    Promotion

    For every qualifying order that includes products listed on the Eligible Products list, the customer will receive one Spring on VMware Bundle at no additional charge which consists of the following:

    Each customer will be limited to a maximum of one (1) Spring on VMware Bundle.

    Eligibility Requirements
    1. Promotion is valid for qualifying orders fulfilled by VMware between March 8, 2010 and May 8, 2010.
    Eligible Products
    1. VMware vSphere products in the vSphere product family
    2. VMware vCenter products in the vCenter product family
    3. VMware View
    4. VMware ThinApp

    See detailed eligible products list for exact SKUs.

    Promotion Duration

    Eligible Product Purchases from March 8, 2010 – May 8, 2010. Customers will receive their promotion code for the Spring on VMware Bundle on or before May 10, 2010. Promotion codes must be redeemed within 60 days from the day they are sent to the customer.

    Promotion Availability

    This promotion is available to all customers who make a qualifying purchase from a VMware authorized reselling partner, from the VMware website or directly from VMware. Exception: This promotion is not available for OEM partners ordering directly from VMware. Check with your VMware authorized reselling partner for promotion eligibility.

    Terms and Conditions
    • 60 days of Evaluation Support for SpringSource included for no additional charge as part of promotion. After the 60-days of Evaluation Support for SpringSource, customers may purchase VMware Basic or Production Support at the then-current list price.
    • Start date for the Evaluation Support for SpringSource will be the date on which the promotion codes are sent to the customer.
    • One (1) Spring on VMware Bundle fulfilled per order, not to exceed one (1) per customer during the promotional period.
    • Prices for eligible products may vary if purchased through resellers or in different regions. Please contact your authorized VMware reseller for pricing information.
    • Promotion offer not available for purchases by OEM partners ordering directly from VMware.
    • Customers will receive their promotion code for the Spring on VMware Bundle on or before May 10, 2010. Promotion codes must be redeemed within 60 days from the day they are sent to the customer.

    2010-03-07

    Customize a Template During Deployment



    When deploying a Virtual Machine from a template you have the option of Using the Customization Specifications for Automating Deployment.

    I am sure this has been mentioned more than once but I could not find an easy reference on a blog only on the VMTN Forums

    Well the problem was like this below, when trying to deploy a VM the option was greyed out

    image

    The user had the correct Privileges on the folder, cluster and on the storage, but could choose the customization specification.

    The reason is that the user needs the correct Privilege on the top-level of Hosts and Cluster.

    image

    The Read Customization Specifications Privilege has to assigned
    and does not have to be propagated.

    Quick Powershell tip - Remote Windows Management

    Something that I do every now and again (almost every day - many times per day) is to connect to the Event Viewer / Computer Management / Services console of a Remote Windows machine for troubleshooting purposes.

    Now of course you could do it like this:

    Start -> Run -> compmgmt.msc

    Right-Click -> Connect to another computer -> <Computer_Name> -> OK

    or you could make it even shorter

    Start -> Run -> compmgmt.msc /computer:<Computer_Name>

    But after spending some time reading about Powershell today, I decided since I have a Powershell prompt open the whole time would it not be easier to do it in Powershell as well? And maybe also do it one command with switches?

    The result is the function below:

    function manage-server {
        param ()
        	if ($args.count -eq 0)  {
                do {
        	       $compname = Read-Host "Which server would you like to connect to?"
                } until ($compname -ne $null)
            } else {
            $Compname = $args[0]
        	}
            if ($args[1] -eq $null) {
                do {
                    $task = read-host "Which task would you like to perform? [Manage/Event/Services]"
                } until (($task -match "manage") -OR ($task -match "event") -OR ($task -match "services"))
            } else {
            $task = $args[1]
            }
    
        switch ($task) {
            Manage   {compmgmt.msc /computer:$compname}
            Event    {eventvwr.msc /computer:$compname}
            Services {services.msc /computer:$compname}
        }    
    }

    And to make it even shorter you can create an Alias for the command

    New-Alias -Name manage -Value manage-server -Description "Quick Remote Manage Server"

    3-5. If the Server name is not entered you will be prompted for input.

    10-13. If you have not entered which task you would like to perform - you will be prompted.

    18-22. A Switch statement on the task variable will perform the correct task.

    I am loving Powershell more and more and more!!

    2010-03-05

    How to Throttle Removing ESX Snapshots

    Recently we had a planned maintenance window that required shutting down power to the entire building. As part of the procedure we created snapshots of each VM before the powerdown. With PowerCLI this is really easy

    get-vm | new-snapshot -name "before power down" -description "powerdown" -runasync -confirm:$false

     
    Of course there is a whole methodology of how to perform this shutdown - what comes before what and what should be powered down in which order, but that is not the issue at hand.

    After powering everything back up and verifying that all was ok I wanted to remove the snapshots. Now since I had given the snapshot a name it is easy to remove that specific snapshot.

    $snapshots = get-vm | get-snapshot -name "before power down"
    foreach ($item in $snapshots) {
     remove-snaphot $item -confirm:$false
    }

     

    OK so that started to remove the snapshots - but one at a time
    WHICH …. WAS…. SLOW ……………………………………….

    So a quick change to the code adding the runasync switch

    $snaps = get-vm | get-snapshot -name "before power down"
    foreach ($item in $snapshots) {
     remove-snaphot $item -confirm:$false -runasync
    }

     

    And it started to run them all one after the other. Great!

    Or was it ??? within a short time the host choked! trying to remove all the snapshots at once - simultaneously - it was not happy.

    In the end I ended up looping though the array manually. But after consulting with the PowerCLI master Luc Dekens who helped me out tonight with finding a way to throttle the process. Here is is below

    $maxtasks = 5
    
    $snaps = get-vm | get-snapshot -name "before power down"
    
    $i = 0
    while($i -lt $snaps.Count){
     Remove-Snapshot -Snapshot $snaps[$i] -RunAsync -Confirm:$false
     $tasks = Get-Task -Status "Running" | where {$_.Name -eq "RemoveSnapshot_Task"}
     while($tasks.Count -gt ($maxtasks-1)) {
     sleep 30
     $tasks = Get-Task -Status "Running" | where {$_.Name -eq "RemoveSnapshot_Task"}
         }
         $i++
    }
    


    First I I relied on the same $snaps variable as in the previous example to get all the relevant snapshots

    I then ran through a loop from $i=0 until the number of snapshots and removed the snapshot

    I then continue the loop and retrieve the number of running "RemoveSnapshot" tasks. As long as there are more than 4 - then the script will sleep, once there are less than 4 it will increment $i by 1 and will continue to remove the next snapshot.

    I am sure you can use this logic for other kind of tasks as well.

    Thanks again Master Luc for your help!

    2010-03-04

    vCenter on Windows 2008 R2 - not the best idea

    Ladies and Gentlemen!!!

    Because I have seen two such posts in almost as many days here and here - dealing with installation of vCenter Server on Windows 2008 R2 (which of course is 64-bit only)  I feel it is important to point out that this is not a good idea and to bring your attention to the
    vSphere Compatibility Matrix - pg.18.

    image

    vCenter is not supported (as of today) running on Windows 2008 R2!!!!!!!!!!!

    Will it work on Windows 2008 R2? -- Yes!!

    Does vSphere client run on Windows 2008 R2? -- Yes!!

    Does Update Manager run on Windows 2008 R2?? -- Yes!!

    Are you willing to risk the fact that your infrastructure is running on an unsupported platform - and if you run into a problem that is OS related - you are on your own?? I for sure am not!!
    For a test Environment or a lab - sure no problem - why not. But I would not do it (and refused) for my Production Infrastructure.

    Until VMware updates the above document - I would strongly advise that if you want to install vCenter on Windows 2008 - do so on Windows 2008 64-bit SP2 - that way you can still upgrade to R2 when the OS becomes officially supported.

    Personally I think it it is a technicality that the QC process was not completed on Windows 2008 R2 before the release of 4.0 Update 1 - and it will be just a matter of time until it is added in ….