« VMworld 2008 - I'm getting excited.... | Main | ESX 3.5 Update 2 Bug, Express Patch, and Quick Thoughts »

August 08, 2008

PowerShell Script for VDI Mass Replicas

Folks, many folks have asked HOW we do the "thousands of desktops, instantly, consuming the space of one" that I demoed and described about here.

Here are the step-by-step instructions and PowerShell scripts we use.  

Note that these are provided openly and freely, but with no support, and no guarantees.   That sounds freaky, but it's not.   The APIs we use (on ESX, Virtual Center, Active Directory, Windows, and of course the array itself) are all standard and supported).   The SCRIPT however, always needs a little change here or there for each customer.

We do provide end-to-end support and a custom solution for any customer that wants it, as part of an overall engagement.

But, we wanted to be open and clear - and share the know-how.   Questions posted as comment here will get best-effort support (again, customers who have had this professionally installed can just call 1-800-SVC4EMC).

PowerShell scripting with VMware is a fun new frontier, and the tool itself as evolved rapidly as we deploy this at customer after customer.  It now does a very clean job of integrating with the connection broker.

It will continue to evolve as the next generation of VDM and other VDI elements come from VMware - exciting things to come there in the coming months.    At EMC, our view is that every customer is unique.   In some cases, mass array replicas are the way integrated with VDM, in other cases its VI in the back, XenDesktop as the presentation/broker, in some cases in the future it will be leveraging all VMware technology, and we'll happily be fast, available storage.   Customers are different.  They come in every shape/size/color.   BUT - we have the answer :-)

I can't claim any of the brains behind this - it's one EMCer, and one who deserves a lot of credit - Dan Baskette.  Dan - I've said it before, I'll say it again:

While EMC may have 400 VCPs and 40K employees, people underestimate the power of individuals to make a massive difference - at a startup, or a huge enterprise.   You are a difference-maker.

Oh, BTW - my earlier post, with all the servers?   Here it is today.   We're now up to 312 of those servers.   What the hell are we doing?   Answer: Building a 500, 1K, 10K, 20K and 40K (if we can get it that high) client VDI reference architecture - this is the VI layer, there is also the connection broker and client layers (and the storage layer) you can't see in this shot.   While we are aiming to have initial results for VMworld, this will remain indefinitely as part of the VMware center of excellence out there in Santa Clara for customer who want to try things that are hard to do at home :-)   There are labs and solutions centers with far more, but all in one place, dedicated to one purpose, something neat.

For my NetApp brothers and sisters out there, I've started calling it the 10x Kilo Client Lab (inside storage vendor joke) :-)

dsc_0035

Read on for instructions and the script itself.   Partners, Customers and EMCer - note that you can do this with the Celerra Sim so you can easily build your own environment to give it a whirl (instructions on how to get that working here)

 Dan - again, my hat is off to you.

PowerVDI instructions:

Software Requirements

Hardware Required

  • ESX Cluster (2 Nodes+)
  • EMC Celerra

Infrastructure Requirements

  • Active Directory, DNS, DHCP
  • VMWare Desktop Manager (VDM) Connection Broker (Physical or Virtual)

Configuration Pre-requisites

  • Gold Image – Sysprepped Dektop OS Image
    • Needs to automatically join domain
    • Needs to have the VDM Agent Installed
  • iSCSI Datastore available to ESX Cluster containing one or more Gold Images
  • Resource Group named VDI

Additional Items Needed

  • Celerra Admin Credentials
  • Celerra IP Address
  • Virtual Center Credentials
  • Virtual Center IP Address
  • VDM IP Address
  • iSCSI Datastore Name

Installation:

  1. Login to VDM as Domain Admin
  2. Create Directory (any location) for powerVDI.
  3. Install Scripts and Community Extensions into Directory (batch files need to be changed to point to this directory)
  4. Drag Shortcuts (powerVDI and powerVDI Pool Removal) to your desktop.
  5. Install Powershell
  6. Install VI Toolkit
  7. Install Quest ActiveRoles
  8. Install Putty
  9. Run c:\program files\PuTTY\puttygen
    1. Click Generate
    2. Move the Mouse around aimlessly for a couple minutes to generate a key.
    3. Store Private Key as c:\program files\putty\privkey.ppk (NAME IS IMPORTANT)
    4. Copy Public Key from puttygen. Should look like this… ssh-rsa AAAAB3NzaC1yc2EAAAABJQAAAIEAvFT6Y1a7R/TJOxFb2dtzZpURoHQAlnFONQnm7EC3ztMltF4PZQVXXpZcbN3MSeCsYl677yFplmPGGsE41r6FLDL6sskOa+eVpxNxwbhyzcvlewrBjRiwJjZwgA9U1vHGokNpUqppbLrUr8hgJ5TXsCFhNMAe7WwRN5x1CH79K6U= rsa-key-20080730
  10. Using Putty, login in to Celerra
    1. Add the following lines to the ./.bashrc file:
      1. PATH=$PATH:/nas/bin:/nas/admin/bin

        export NAS_DB=/nas

    2. Type: vi authorized_keys
    3. Insert Text from puttygen into this file
    4. Save File (Hit Escape then :wq!)
  11. Launch powervdi.bat
    1. If this is the first run, it will ask for and store some configuration items
    2. powerVDI will ask for a pool name (this will be the name of the VDM Pool and will be the Display name of that Pool)
    3. Asks for Gold datastore, enter the name and it will show the list of Gold Images..if correct hit y <enter>
    4. Number of Replicas, This is the number of Snaps in the Celerra
  12. To Cleanup launch powerVDI Pool Cleanup and enter the pool name to delete (expect some errors)

Additional Notes:

  • Grow a pool: Enter Existing pool name and additional snaps and clients will be added.
  • Answer File: Create file poolname.auto in the following format and include that name on the command line when calling powerVDI

poolname

Gold Datastore

#Replicas

TrackBack

TrackBack URL for this entry:
http://www.typepad.com/services/trackback/6a00e552e53bd2883300e553d7e2318833

Listed below are links to weblogs that reference PowerShell Script for VDI Mass Replicas:

Comments

Feed You can follow this conversation by subscribing to the comment feed for this post.

One thing I forgot to include was the need to open a powershell window and type

set-executionpolicy unrestricted


This will allow scripts to run.

Verify your Comment

Previewing your Comment

This is only a preview. Your comment has not yet been posted.

Working...
Your comment could not be posted. Error type:
Your comment has been posted. Post another comment

The letters and numbers you entered did not match the image. Please try again.

As a final step before posting your comment, enter the letters and numbers you see in the image below. This prevents automated programs from posting comments.

Having trouble reading this image? View an alternate.

Working...

Post a comment

Disclaimer

  • The opinions expressed here are my personal opinions. Content published here is not read or approved in advance by EMC and does not necessarily reflect the views and opinions of EMC. This is my blog, it is not an EMC blog.

Enter your email address:

Delivered by FeedBurner