WilliamLam.com

  • About
    • About
    • Privacy
  • VMware Cloud Foundation
  • VKS
  • Homelab
    • Resources
    • Nested Virtualization
  • VMware Nostalgia
  • Apple
You are here: Home / Automation / Instant Clone Microsoft Windows & VM Keystroke VMworld demo and code posted

Instant Clone Microsoft Windows & VM Keystroke VMworld demo and code posted

01.08.2019 by William Lam // 2 Comments

Apologies for the delay in getting my VMworld 2018 demo and code posted online, I know a number of you have been asking about the Windows Instant Clone samples to get an idea on how to create your own customization scripts for managing more "recent" Microsoft Windows releases 😉 and perhaps you might even consider submitting a pull request to share with the community. I have posted both the videos and code samples below. Enjoy and happy Automating!

Instant Clone Microsoft Windows

To demonstrate the power of the newly re-architected Instant Clone feature in vSphere 6.7 and to help make the point clear that the Instant Clone feature is really Guest Operating System agnostic, meaning you can Instant Clone any to Virtual Machine that can run VMware Tools, I thought it would be fun to see how old of a Microsoft OS that I could Instant Clone. After a bit of trial/error, that turned out to be Windows 98 and Windows 2000 🙂

Windows 98 Demo


Windows 2000 Demo



Code
In both the Windows 98 and Windows 200 sub-directories, there is a specific PowerCLI driver script which initiates the actual Instant Cone of the Windows VM. Before running that script, you will need to upload the run.bat script which will "freeze" and prepare the OS for Instant Cloning along with the VBS scripts (for Windows 2000 OS) to perform the actual customization.

  • https://github.com/lamw/instantclone-community-customization-scripts/tree/master/windows98
  • https://github.com/lamw/instantclone-community-customization-scripts/tree/master/windows2000

For more resources on using the new Instant Clone APIs, check out this blog post here and here. For any VMware Cloud on AWS customers, we also have a Tech Preview REST API for Instant Clone (POST /vcenter/vm?action=instant-clone) which can be accessed in addition to the Instant Clone SOAP API. You can refer to the API Explorer for more details when connecting to your VMC SDDC.

VM Keystrokes

One very cool and powerful vSphere API that was released in vSphere 6.5 is the ability to send VM Keystrokes to a VM, which is still not something many folks are aware of. Check out the demo below on why this API can enabled a ton of interesting use cases. Please note, the VM in the demo does NOT have VMware Tools installed and the console is only displayed to show what is happening within the VM, all interactions are through this specific vSphere API.

Demo

Code
For those interested in the specific Tetris application I had used, you can find it here.

  • https://github.com/lamw/vghetto-scripts/blob/master/powershell/vmworld-2018-sendkeys-demo.ps1

More from my site

  • Automating VM keystrokes using the vSphere API & PowerCLI
  • Retrieving vCenter Server certificate (Machine, VMCA Root, STS & Trusted Root) details using the vSphere API 
  • Which VM was this vSphere VM cloned from?
  • Instant Clone Apple MacOS
  • Automating Customer Experience Improvement Program (CEIP) configuration using vSphere API and PowerCLI

Categories // Automation, PowerCLI, vSphere, vSphere 6.7 Tags // instant clone, keystroke, PowerCLI, vmworld, vSphere API

Comments

  1. *protectedbrink668 says

    01/11/2019 at 1:09 pm

    Interesting... had no idea about the keystrokes one,

    Reply
  2. *protectedITborg20 says

    09/11/2019 at 10:20 am

    Would you happen to have an OS customization script for Windows 10? I am terrible at scripting and have no idea how to do this.

    Reply

Leave a Reply to brink668Cancel reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

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