WilliamLam.com

  • About
    • About
    • Privacy
  • VMware Cloud Foundation
  • VKS
  • Homelab
    • Resources
    • Nested Virtualization
  • VMware Nostalgia
  • Apple

Auditing vMotion Migrations

04.12.2012 by William Lam // 3 Comments

I saw an interesting question this week about auditing vMotion events and the number of times a VM has migrated to a particular ESX(i) host for license compliance. You can view this information using the Task/Events in your vCenter Server but you can also extract out the various types of events using the EventManager in the vSphere API. You will be able to go as far back in time as your vCenter Server's database retention policy allows you to. We will be searching for the VmMigratedEvent Event which will include variety of information including the source and destination host for the VM. The destination host will only be populated upon a successful vMotion.

Of course I had to write a script to help automate this, so here is a vSphere SDK for Perl script called getNumberOfvMotions.pl that accepts the name of an existing VM and will return the number of vMotions that has been performed on the VM as well as the list of destination hosts and the number of times it has migrated to those hosts. You will need a system that has the vCLI installed or you can you use vMA.

Note:  If you want to look at past vMotion for a VM that no longer exists, this is still possible, but you will need to parse the "message" within the Event as you can no longer look up that VM object in vCenter.

Here is an example of the script running:

You can easily modify the script to audit all VM's in your environment or just use a simple "for" loop to go through a set of VM's you are interested in, but I will leave that as an exercise for you.

Categories // Automation, vSphere Tags // event, VmMigratedEvent, vmotion, vSphere, vSphere API, vsphere sdk for perl

Congratulations to Chris Greer for Winning Automating vSphere with vCenter Orchestrator

03.17.2012 by William Lam // Leave a Comment

A week ago, I ran a simple contest to give a way a free copy of  Automating vSphere with vCenter Orchestrator Book. To enter the contest, you just had leave a comment with 5 things you wish or hope to automate using vCenter Orchestrator. I am happy to announce the winner of Cody Bunch's new book is Chris Greer! Congratulations Chris!

Chris's comment was the following:

1). I would like to put a web ui in front of the request process for a vm.
2). I want to call out to other services like request tracker via their rest interface
3). I want to automate vcloud director with automated task like license tracking
4). I want to automate network appliances like load balancers and firewalls when deploying specific templates (like web servers)
5). I want to be able to kick off vco workflows via a soap/rest call to extend current scripts
Bonus: I'd love to configure SRM but I don't think it's integrated yet.

Chris, hopefully the new Automating vSphere with vCenter Orchestrator book will help you accomplish these tasks!

Thank you to those who enter and if you did not win, you should still go and grab a copy of Cody's book (available in Kindle and paper back format) and learn how easy it is to leverage vCO in your vSphere environment.

Categories // Uncategorized Tags // orchestrator, vCO, vSphere

Win a Free Automating vSphere with vCenter Orchestrator Book

03.10.2012 by William Lam // 22 Comments

Our good friend Cody Bunch has just recently released a new book called Automating vSphere with vCenter Orchestrator (available in Kindle and paper back format) that provides administrators with a complete walk through of installing, configuring and automating your vSphere infrastructure using vCenter Orchestrator. This is a must have book for all vSphere administrators looking to further automate and orchestrate your virtual infrastructure!

I still consider myself a beginner in vCO, but I have found that it has been very easy to create some really cool workflows such as this, this and this and you do not even need to be a developer to start using vCO! I am looking forward to reading Cody's new book.

Both Pearson and Cody Bunch was kind enough to provide me with an additional paper back copy of Automating vSphere with vCenter Orchestrator. Since sharing is caring, I will be giving away this copy to one lucky reader of virtuallyGhetto!

How do you win?

Just leave a comment below with the top 5 things you would like/hope to automate using vCO in your vSphere infrastructure. I will randomly select a winner a week from today. Even if you do not win, you should definitely still grab a copy of Cody's book and learn how easy it is to leverage vCO in your vSphere environment.

Categories // Uncategorized Tags // orchestrator, vCO, vSphere

  • « Previous Page
  • 1
  • …
  • 31
  • 32
  • 33
  • 34
  • 35
  • …
  • 40
  • Next Page »

Search

Thank Author

Author

William is Distinguished Platform Engineering Architect in the VMware Cloud Foundation (VCF) Division at Broadcom. His primary focus is helping customers and partners build, run and operate a modern Private Cloud using the VMware Cloud Foundation (VCF) platform.

Connect

  • Bluesky
  • Email
  • GitHub
  • LinkedIn
  • Mastodon
  • Reddit
  • RSS
  • Twitter
  • Vimeo

Recent

  • Programmatically accessing the Broadcom Compatibility Guide (BCG) 05/06/2025
  • Quick Tip - Validating Broadcom Download Token  05/01/2025
  • Supported chipsets for the USB Network Native Driver for ESXi Fling 04/23/2025
  • vCenter Identity Federation with Authelia 04/16/2025
  • vCenter Server Identity Federation with Kanidm 04/10/2025

Advertisment

Privacy & Cookies: This site uses cookies. By continuing to use this website, you agree to their use.
To find out more, including how to control cookies, see here: Cookie Policy

Copyright WilliamLam.com © 2025