• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

Yellow Bricks

by Duncan Epping

  • Home
  • Unexplored Territory Podcast
  • HA Deepdive
  • ESXTOP
  • Stickers/Shirts
  • Privacy Policy
  • About
  • Show Search
Hide Search

powercli

Cheat sheet – Auto deploy

Duncan Epping · Sep 5, 2011 ·

When I finished my article about auto deploy I figured it was really lengthy and wanted to write down the bare minimum which can be used as a quick cheat sheet when setting up auto-deploy. Of course you will need to install vCenter, PowerCLI, Auto-Deploy and TFTP first, but I am guessing most of you will know how to do that. Here’s what you will need to do when you have all of the requirements up and running:

  1. Add-EsxSoftwareDepot c:\tmp\VMware-Esxi-5.0.0-<buildnumber>-depot.zip
  2. Add-EsxSoftwareDepot http://<vcenter server>/vSphere-HA-depot
  3. New-EsxImageProfile -CloneProfile "ESXi-5.0.0-<buildnumber>-standard" -name "ESXiStatelessImage"
  4. Add-EsxSoftwarePackage -ImageProfile "ESXiStatelessImage" -SoftwarePackage vmware-fdm
  5. New-DeployRule -Name "FirstBoot" -Item "ESXiStatelessImage" -AllHosts
  6. Add-DeployRule -DeployRule "FirstBoot"
  7. Boot one of the hosts
  8. Configure the host
  9. Create Host Profile based on “first host” named “ESXiHostProfile”
  10. New-DeployRule -name "ProductionBoot" -item "ESXiStatelessImage", ESXiHostProfile, <target_cluster> -Pattern "vendor=<unique hw identifier>"
  11. Add-DeployRule -DeployRule "ProductionBoot"
  12. Remove-DeployRule -DeployRule FirstBoot -delete
  13. Boot all hosts
  14. Assign Host Profiles to all hosts
  15. Provide the “user input” aka create an Answer File per host
  16. Reboot hosts –> done
  17. Before you leave your PowerCLI session make sure you save your newly create image profile as a Software Depot so you can make changes later if and when needed! Otherwise the data will be saved in your image profile cache but you will not be able to make changes!
    Export-EsxImageProfile -ImageProfile "ESXiStatelessImage" -ExportToBundle -FilePath c:\tmp\ESXiStatelessImage.zip

That seems a bit more simplistic than my previous post doesn’t it.

 

** update: added step 17 **

HA / DRS Deepdive…. euuh I mean the audit

Duncan Epping · May 16, 2011 ·

A couple of weeks ago Alan Renouf contacted me and asked me if it was okay to turn some of our best practices mentioned in the book into PowerCLI code. I thought about it for 0.00001 seconds and yelled: hell yeah! Alan worked on it for a couple of days over the last couple of weeks and this is the result. Alan hasn’t been able to get the full book into his audit script, but knowing Alan he will get their in a couple of weeks (no pressure). Not only does the outcome of the audit script look really cool, it is also very useful. I will be working with Alan on refining and enhancing it over the next couple of weeks so check Alan’s website on a regular basis for updates. Once again, Alan great work…

PowerCLI Reference Book, the review

Duncan Epping · Apr 12, 2011 ·

I was checking Amazon during the weekend, just like I do everyday, to see if we had new reviews and how the book was selling until I noticed the reviews on the PowerCLI book. The reviews were mainly about the fact that there’s a formatting issue with the ebook which I agree with should be fixed by the publisher but rating it with a 3 / 4 stars just doesn’t cut it in my opinion. Here’s my review of the book, please note that I know the authors really well and they gave me a free copy nevertheless I have been completely honest about what I think about the book. If I would think it was crap I would let you know, before I copy/paste the review here I would like to ask the Authors to pressure their publisher to lower the price of the ebook as right now it is more expensive than the paper version which is just nonsense. Mr or Mrs Sybex, it is time to change your strategy.

Anyway, I gave the PowerCLI Reference Book 5 stars as I truly believe it is one of a kind, here’s my justification for it:

I received the paper-version of the book last week and started reading it straight away. The authors are THE number one PowerCLI experts in the world and take you through the trenches of vSphere automation.
Although I know vSphere inside out I am a novice when it comes to PowerCLI. The main reason being that I never gave myself the time to actually learn PowerCLI as I figured I could do things faster using the UI. Although this might be true in some cases the first thing the book tought me was that my perception was wrong. The book shows you how to optimize your day-to-day operations by taking advantage of what PowerCLI has to offer out of the box, but it also teaches you how to create your own functions. The amount of examples in there in terms of PowerCLI scripts are such a valuable asset that I would highly recommend it to anyone who is interested in learning PowerCLI and/or optimizing their operational procedures. We are not talking about reporting only, for instance configuring vSwitches or restricting the amount of snapshots is all shown in this book. Be warned though, don’t expect a step-by-step Learning PowerCLI Guide, this is 700+ pages of pure PowerCLI automation at its best which will enable you to get the most out of your environment.

Not included on Amazon, but I do feel it would have been nice if the structure of the book was slightly different. I would have personally started with an Introduction chapter, followed “in-box” reporting functionality and finishing it off with deepdive functions and pages of script. But than again, this is a reference book and not course material. All in all, this book is more than worth it.

You can buy it here if you are interested.
(yes it contains an affiliate link)

PowerCLI reference book

Duncan Epping · Feb 26, 2011 ·

I blogged about this almost two months ago and just on Luc’s blog that the release date has been set and the cover art was released. I wanted to remind all of you the book that is one of a kind, VMware vSphere PowerCLI Reference: Automating vSphere.

Release date: 28th of March
Authors: Luc Dekens, Alan Renouf, Glen Sizemore, Arnim van Lieshout, Jonathan Medd
ISB: 0470890797

Looking for PowerCLI skills?

Duncan Epping · Dec 22, 2010 ·

No need to struggle anymore, just learn PowerCLI from the masters… Luc Dekens and Alan Renouf wrote a book which is available for pre-ordering right now. Most of you probably already know Luc and Alan, but for those who don’t I think I am not exaggerating when I say that these guys are the top PowerCLI experts in the virtualization industry. Both Luc and Alan have a wealth of expertise and know how to explain things in a way that even I can understand it… believe that is an achievement cause I have no affinity with PowerCLI whatsoever. Now, Alan and Luc didn’t do this by themselves they had Arnim van Lieshout, Glen Sizemore and Jonathan Medd helping them out writing the book. Lets not forget their infamous tech editor Stuart “vinternals” Radnidge

VMware vSphere PowerCLI is a must-have tool for any administrator managing VMware vSphere in a Windows environment. Having to repeat vSphere administrative tasks can be time consuming and error-prone, but PowerCLI—created specifically for Windows environments—allows VMware administrators to automate tasks. Written to the latest PowerCLI, this handy guide shows you step by step how to use the PowerCLI cmdlets for daily administration procedures and frequently performed tasks for VMware vSphere X. The reference is organized by vSphere tasks, providing a practical approach to accessing the information you need while you are on the job. Supported by real world examples and no-nonsense instruction, coverage includes installation, configuration, and management of a vSphere environment, management of the virtual machine life-cycle, security, and monitoring and reporting.
Pre-order NOW!

While I was scavenging the internet for a screenshot of the cover, which I did not manage to find by the way, I noticed something else. It seems that these 5 guys are literally planning to take over the PowerCLI Community:

  • Twitter : PowerCLIbook (start following them!)
  • URL: PowerCLIbook.com

It seems that PowerCLIbook.com will primarily be used as a mechanism to offer readers updated versions of scripts, to enable them to ask the authors questions around the book itself and even to download a full Powerpack. Judging by the fact that is hasn’t been formally announced yet I expect the guys are still working on the forum/site.

Anyway, go out and pre-order the book… it is worth it,

  • « Go to Previous Page
  • Page 1
  • Page 2
  • Page 3
  • Go to Next Page »

Primary Sidebar

About the Author

Duncan Epping is a Chief Technologist and Distinguished Engineering Architect at Broadcom. Besides writing on Yellow-Bricks, Duncan is the co-author of the vSAN Deep Dive and the vSphere Clustering Deep Dive book series. Duncan is also the host of the Unexplored Territory Podcast.

Follow Us

  • X
  • Spotify
  • RSS Feed
  • LinkedIn

Recommended Book(s)

Advertisements




Copyright Yellow-Bricks.com © 2025 · Log in