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

Yellow Bricks

by Duncan Epping

  • Home
  • 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

Connection problems with PowerCLI due to proxy settings

repping · Feb 24, 2011 ·

I was able to connect my PowerCLI instance without any problems to my vCenter, until all of a sudden I got the following error:

Connect-VIServer : 8/12/2010 11:51:36 Connect-VIServer
Could not connect using the requested protocol.

I discovered that this was due to a change in the Proxy Server settings on the client. After removing this proxy address everything was back to normal.

-ray

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

Primary Sidebar

About the author

Duncan Epping is a Chief Technologist in the Office of CTO of the Cloud Platform BU at VMware. He is a VCDX (# 007), the author of the "vSAN Deep Dive", the “vSphere Clustering Technical Deep Dive” series, and the host of the "Unexplored Territory" podcast.

Upcoming Events

May 24th – VMUG Poland
Aug 21st – VMware Explore
Sep 20th – VMUG DK
Nov 6th – VMware Explore
Dec 7th – Swiss German VMUG

Recommended Reads

Sponsors

Want to support Yellow-Bricks? Buy an advert!

Advertisements

Copyright Yellow-Bricks.com © 2023 · Log in