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

virtuallyGhetto

  • About
  • Privacy
  • VMware Cloud
  • Home Lab
  • Nested Virtualization
  • Automation
    • VMware Kickstart
    • VMware API/SDK/CLI
    • VMware vMA/VIMA
    • VMware OVF / OVFTOOL
  • Apple Mac
  • VCSA
  • VSAN

William Lam

Quick Tip – How to retrieve deleted VM history?

01/21/2021 by William Lam 1 Comment

Here is another question that can be solved by leveraging vCenter Server Events, which provides a lot of useful information, especially for historical operations and auditing purposes. Simliar to identifying where a VM was cloned from use case, we can also use vCenter events to retrieve the historical events for all VM deletions for a given vSphere environment.

One important thing to note is that when a VM or any other vSphere object for that matter that has been deleted, all references to that object is removed from vCenter Server. This means, we can not look for events for a give VM but instead, we need to look at the Task-based Event types to actually retrieve this information.

Putting this together, I have created a PowerCLI function called Get-VmDeleteHistory which can be installed directly from the PowerShell Gallery by running:

Install-Script -Name VmDeleteHistory

After connecting to your vCenter Server using the Connect-VIServer cmdlet, you can then run the Get-VmDeleteHistory function which uses the Get-VIEvent cmdlet and looks at the last 500 events. Below is an example output of what you will see which is the VM that was deleted, the User who performed the action along with the date and time.


If you want to look further back in history, you can provide the optional -MaxSamples parameter and that will allow you to specify the maximum number of events to look through.

Get-VmDeleteHistory -MaxSamples 1000

It is also important to understand that how far back you can go is based on your vCenter Server's Task/Event retention configuration.

Share this...
  • Twitter
  • Facebook
  • Linkedin
  • Reddit
  • Pinterest

Filed Under: Automation, PowerCLI Tagged With: PowerCLI, VmDeleted

E100-9W – A new fanless Supermicro “NUC” platform

01/19/2021 by William Lam 11 Comments

At the end of 2020, I had published a blog article which covers the latest Supermicro kits that are being used and others that can be used for both VMware Homelabs as well as for production workloads. The article was very well received, especially as this is a topic that I frequently get questions about on the latest hardware kits that will work with vSphere, vSAN and NSX-T.

While researching for the article, I had a chance to speak with the Supermicro Product Manager and I came to learn about a new E100-9W platform that was just released last Spring of 2020. This platform is part of Supermicro's Embedded IoT family of servers and focuses on use cases such as Industrial Automation, Retail, Smart Medical Systems, Kiosks and Digital Signage to name a few. Many of these use cases are also applicable to our VMware customer base, especially for running a small and lower power footprint at an Edge or ROBO location. I was also interested in this platform as it could also be interesting for VMware homelabs.


[Read more...] about E100-9W – A new fanless Supermicro “NUC” platform

Share this...
  • Twitter
  • Facebook
  • Linkedin
  • Reddit
  • Pinterest

Filed Under: Home Lab Tagged With: homelab, Supermicro

ESXi on 11th Gen Intel NUC (Panther Canyon) & (Tiger Canyon)

01/13/2021 by William Lam 17 Comments

The highly anticipated 11th Generation Intel NUCs based on the new Tiger Lake processors has just been announced by Intel and I am excited to share my first hand experience with this new NUC platform. There are currently two models in the new 11th Gen lineup: the Intel NUC 11 Performance codenamed Panther Canyon (pictured on the left) which is the successor to the 10th Gen (Frost Canyon) NUC and the Intel NUC 11 Pro codenamed Tiger Canyon (pictured on the right) which is the successor to the 8th Gen (Provo Canyon) NUC.


There are a number of new improvements and capabilities that will make these new NUCs quite popular for anyone looking to build or upgrade their vSphere environment in 2021.

Before diving right in, I must say I love the new aesthetic look of the NUC chassis. In previous versions, the lid had a glossy and shiny finish, which easily left hand prints. These new models now have a clean matte finish. The NUC 11 Performance has a smoother feel compared to the NUC 11 Pro which has more of a texture to the finish, which I personally prefer. The other noticeable change is the power adapter, which is now half the size now which is nice for those looking to have several of these new kits sitting next to each other.

[Read more...] about ESXi on 11th Gen Intel NUC (Panther Canyon) & (Tiger Canyon)

Share this...
  • Twitter
  • Facebook
  • Linkedin
  • Reddit
  • Pinterest

Filed Under: Home Lab, vSphere Tagged With: homelab, Intel NUC, Panther Canyon, Tiger Canyon

Which VM was this vSphere VM cloned from?

01/11/2021 by William Lam Leave a Comment

This was a question that I saw back in December on the VMware {code} Slack which was quickly answered by the always awesome Luc Dekens. The solution is to look at vCenter Server Events, which are super rich in information and can be used for a number of things including identifying the source VM that it was cloned from. When I was a customer, this was something I did all the time, using events for auditing purposes but also identifying who, what and when a certain operation was performed including source VMs for cloning operations.

Although this information maybe known to some, there is still not an elegant solution that can help someone quickly identify the source VM for a specific vSphere VM that was cloned. This topic also intrigued me as I have seen this question come up in the past. I figure I might as well add this to my random scripting backlog and take a look when I had some time.

Before taking a look at the solution, it is important to understand the different types of clones that exists in vSphere today and also the respective vCenter Server events that can help us correlate to both the source VM but also the specific clone type.

Cloning Types

  • Full Clone - An independent copy of a virtual machine that shares nothing with the parent virtual machine after the cloning operation. Ongoing operation of a full clone is entirely separate from the parent virtual machine
  • Linked Clone - A copy of a virtual machine that shares virtual disks with the parent virtual machine in an ongoing manner. This conserves disk space, and allows multiple virtual machines to use the same software installation
  • Instant Clone - An independent copy of a virtual machine that starts executing from the exact running state of the source powered on virtual machine. Instant Clone uses rapid in-memory cloning of a running parent virtual machine and copy-on-write, simliar to that of Linked Cloning to rapidly deploy virtual machines

[Read more...] about Which VM was this vSphere VM cloned from?

Share this...
  • Twitter
  • Facebook
  • Linkedin
  • Reddit
  • Pinterest

Filed Under: Automation, PowerCLI, vSphere Tagged With: clone, instant clone, linked clones, PowerCLI

Tanzu Kubernetes Grid (TKG) Demo Appliance 1.2.1

01/05/2021 by William Lam 3 Comments

Check out the newest release of the Tanzu Kubernetes Grid (TKG) Demo Appliance Fling which includes the following new features:

  • Support for the latest TKG 1.2.1 release
  • Support for TKG Workload Cluster upgrade workflow from Kubernetes v1.18.10 to v1.19.3
  • Updated embedded Harbor to use self-sign TLS certificate

One of the biggest feature I was excited for in the new TKG 1.2.1 release was support for an external container registry that was configured with a self-signed TLS certificate. Previously, TKG only supported container registries that were configured with a trusted CA signed certificate and that made it difficult for proof of concept/testing but also for environments that were air-gapped.

With previous releases of the TKG Demo Appliance, a valid TLS certificate was acquired from Let's Encrypt (LE) with the help of my good friend Ryan Johnson who owns the domain rainpole.io. The one downside to LE-based certificates is the short expiry period, which is every 90 days. This meant that any TKG Demo Appliance deployed after the expiry would stop functioning due to the certificate no longer being valid. Although I have been able to manage this by updating the appliance roughly every 90 days, usually in-conjunction with new release of TKG, it was less than ideal.

[Read more...] about Tanzu Kubernetes Grid (TKG) Demo Appliance 1.2.1

Share this...
  • Twitter
  • Facebook
  • Linkedin
  • Reddit
  • Pinterest

Filed Under: Kubernetes Tagged With: Tanzu Kubernetes Grid, TKG

Record and Replay vSphere Inventory using govc and vcsim 

01/04/2021 by William Lam 2 Comments

Happy New Year! 🥳

I wanted kick off 2021 with something I had just learned about right at the end of 2020 which I think this will be useful going into the new year for a number of different use cases. Back in 2017, I wrote about a new and lighter weight version of the vCenter Simulator (vcsim) which had been developed as part of the govmomi (vSphere SDK for Go) project. Since then, the govmomi project has grown exponentially and is now integral to a number of popular open source projects such as Packer builder for vSphere, Terraform provider for vSphere and Kubernetes Cluster API for vSphere (CAPV) to just name a few.

Govmomi is also heavily used internally by VMware for both development and testing purposes. In fact, it has been used to build a number of new VMware features such as the vSphere Integrated Containers (VIC) solution and most recently the vSphere with Tanzu capability that was introduced in vSphere 7.0.

Getting back to vcsim, this has been an invaluable tool for both our VMware developers but also the general VMware community. The ability to "simulate" a mocked vSphere environment with a basic inventory can be extremely useful for learning about the vSphere API and interacting with this endpoint using any vSphere SDK including PowerCLI. For automation folks, this can be useful for designing and creating your scripts in an offline mode before testing it against a real environment. For folks building 3rd party solutions that includes a visual interface, this is an easy way to test out your UI and ensure that there are no issues for large vSphere inventories which can be difficult to validate in a development environment.

Simulating a fake vSphere inventory is great, but it also has its limitations. There are so many unrealized use cases if you could capture a real vSphere inventory and then replay that back using vcsim. Just think about a bug reproduction use case and being able to share a real vSphere inventory with a development or QA team without needing to provide them direct access to the production environment?

In my opinion, this was the missing key feature from the original vcsim. To my surprise, this functionality was actually added to govc/vcsim earlier last year and I was quite happy with its implementation! Let's now take a closer look at how the record and replay functionality of govc/vcsim works.

[Read more...] about Record and Replay vSphere Inventory using govc and vcsim 

Share this...
  • Twitter
  • Facebook
  • Linkedin
  • Reddit
  • Pinterest

Filed Under: Automation, vSphere Tagged With: govc, govmomi, vcsim

  • Go to page 1
  • Go to page 2
  • Go to page 3
  • Interim pages omitted …
  • Go to page 202
  • Go to Next Page »

Primary Sidebar

Author

William Lam is a Senior Staff Solution Architect working in the VMware Cloud team within the Cloud Services Business Unit (CSBU) at VMware. He focuses on Automation, Integration and Operation for the VMware Cloud Software Defined Datacenters (SDDC)

  • Email
  • GitHub
  • LinkedIn
  • RSS
  • Twitter
  • Vimeo

Sponsors

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