• 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
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
  • Which VM was this vSphere VM cloned from?
  • Instant Clone Apple MacOS
  • Automating Customer Experience Improvement Program (CEIP) configuration using vSphere API and PowerCLI
  • Retrieving detailed per-VM space utilization on VSAN
Share this...
  • Twitter
  • Facebook
  • Linkedin
  • Reddit
  • Pinterest

Filed Under: Automation, PowerCLI, vSphere, vSphere 6.7 Tagged With: instant clone, keystroke, PowerCLI, vmworld, vSphere API

Reader Interactions

Comments

  1. brink668 says

    01/11/2019 at 1:09 pm

    Interesting… had no idea about the keystrokes one,

    Reply
  2. ITborg20 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

Thanks for the comment! Cancel reply

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

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