WilliamLam.com

  • About
    • About
    • Privacy
  • VMware Cloud Foundation
    • VMware Cloud Foundation 9.1
    • VMware Cloud Foundation 9.0
  • VKS
  • Homelab
    • Hardware Options
    • Hardware Reviews
    • Lab Deployment Scripts
    • Nested Virtualization
    • Homelab Podcasts
  • VMware Nostalgia
  • Apple

Search Results for: Invoke-VMScript

VMware Cloud

VMware Cloud on AWS (VMConAWS)

    • Decoding Services Roles/Permissions from a VMware Cloud Services Platform (CSP) Token
    • VMware Cloud on AWS 1.13 adds support for VMRC vCenter Proxy
    • New SDDC Linking capability for VMware Cloud on AWS
    • Automated Nested Lab Deployment on SDDC Part 1: VMware Cloud on AWS
    • VMworld 2020 Demo - Voice activated workload migration to VMware Cloud SDDCs
    • Retrieving network statistics on VMware Cloud on AWS using NSX-T Policy API
    • Custom notification and automation based on host failure in VMware Cloud on AWS
    • Extending VMware Cloud on AWS Notifications using the Notification Gateway API
    • Tanzu Kubernetes Grid (TKG) Demo Appliance for VMC and vSphere
    • VMware Cloud Services Status APIs
    • New vCenter events for vSphere 7, VMware Cloud on AWS 1.10 and vSphere with Kubernetes
    • Sneak peak at deploying Tanzu Kubernetes Grid Plus on vSphere & VMware Cloud on AWS
    • Automating the creation of NSX-T "Disconnected" Segments for DR testing on VMware Cloud on AWS 
    • Simulating the VMware Cloud on AWS API using Stoplight Prism Tool
    • RSS feed for VMware Cloud on AWS and VMware Release Notes
    • ESX 3.x on VMware Cloud on AWS? 
    • Configuring Standalone vRealize Orchestrator with VMware Cloud on AWS
    • Automating HCX Multi-Site Service Mesh configuration using the new HCX PowerCLI cmdlets
    • Automating HCX Add On for VMware Cloud on AWS
    • Forwarding VMC Events to AWS Lambda/CloudWatch using Log Intelligence Webhook
    • Forwarding VMC Events to Slack using Log Intelligence Webhook
    • Connecting to NSX-T Policy API using NSX-T Private IP in VMC
    • Automating VMware Site Recovery (DRaaS) with VMC
    • NSX-T Policy API Explorer, Docs and Sample Updates for VMC
    • Deploying a vCenter Server Appliance (VCSA) in VMC?
    • NSX-T Opaque Networks now supported with Cross vCenter Workload Migration Fling
    • Integrating Github Actions with vSphere and VMware Cloud on AWS
    • ESXTOP and VMware Cloud on AWS
    • vSphere Tag Attach/Detach events now in VMware Cloud on AWS
    • Automating complete HCX deployment and configuration to first cloud migration using PowerCLI
    • Running sk8s (Simple Kubernetes) on VMC with an AWS Elastic Load Balancer
    • Which NSX-T Policy APIs are used in the NSX-T UI in VMC?
    • How to retrieve the NSX-T Overview Info (SDDC Public IP, Appliance & Infra Subnet, etc.) in VMC?
    • Common PowerCLI examples for VM Provisioning in VMware Cloud on AWS
    • Using NSX-T Policy API to retrieve the Routing Table in VMC
    • Changing the default behavior of the NSX-T Distributed Firewall (DFW) in VMC to Deny All
    • Quick Tip – Import OVF/OVA as VM Template using OVFTool 4.3 Update 1
    • New VMC API to rename SDDC
    • How to retrieve the CSP Refresh Token expiry using the CSP API
    • Managing Distributed Firewall Rules in VMC using PowerShell & NSX-T Policy API
    • Learning more about the Nitro platform which will power VMware Cloud on AWS Outposts
    • VMware Cloud on AWS reInvent sessions posted
    • Can a VM in the VMC Compute Network access the SDDC Management Network?
    • Automating Hybrid Cloud Extension (HCX) Manager initial configuration for VMC
    • Quick Tip – How to clear all Hybrid Cloud Extension (HCX) Migrations in the vSphere UI
    • Enhancements to Hybrid Linked Mode (HLM) in VMC using the new vCenter Cloud Gateway
    • Nested ESXi on VMware Cloud on AWS (VMC)
    • Automating new Cloud Motion with vSphere Replication using Hybrid Cloud Extension (HCX) API
    • Automating Hybrid Cloud Extension (HCX) Manager OVA deployment
    • NSX-T Policy PowerShell Community Module for VMC
    • Create vCenter Alarms for monitoring HCX migration events
    • vMotion across different VDS version between onPrem and VMC
    • Getting started with the Hybrid Cloud Extension (HCX) APIs
    • How to unregister Hybrid Cloud Extension (HCX) from your onPrem vCenter Server?
    • Getting started with the new NSX-T Policy API in VMC
    • Using VMC API to answer commonly asked questions about your SDDC
    • Quick Tip – Requirements for using Guest Operation APIs (Invoke-VMScript & Copy-VMGuestFile) in VMC
    • Creating a vSphere Content Library directly on Amazon S3
    • Automation with the VMware Cloud Services Platform (CSP)
    • VMworld US 2018 sessions on VMware Cloud on AWS
    • Resource Pools, Folders & VMC now supported with Cross vCenter vMotion Utility Fling
    • Automating VM Template management using Content Library in VMC
    • Auditing detailed operations within VMware Cloud on AWS using the Activity Log API
    • OVFTool and VMware Cloud on AWS
    • New Adventure
    • Getting started with Hybrid Cloud Extension (HCX) on VMware Cloud on AWS
    • VMware Cloud on AWS – VM Creation Date available in vSphere API
    • VPN Configuration to VMware Cloud on AWS using pfSense
    • VMworld Hackathon Hardware/Software BOM

Azure VMware Solution (AVS)

  • Automated Nested Lab Deployment on SDDC Part 2: Azure VMware Solution
  • VMworld 2020 Demo - Voice activated workload migration to VMware Cloud SDDCs

Google Cloud VMware Engine (GVCVE)

  • Automated Nested Lab Deployment on SDDC Part 3: Google VMware Cloud Engine
  • VMworld 2020 Demo - Voice activated workload migration to VMware Cloud SDDCs

Oracle Cloud VMware Solution (OCVS)

  • Automated Nested Lab Deployment on SDDC Part 4: Oracle Cloud VMware Solution
  • VMworld 2020 Demo - Voice activated workload migration to VMware Cloud SDDCs

New Instant Clone Architecture in vSphere 6.7 – Part 2

04.30.2018 by William Lam // 5 Comments

In the previous article, I provided an overview of the new "Parentless" Instant Clone feature which was introduced in vSphere 6.7 and some of the architectural differences between prior versions of Instant Clone. In this post, I will show you how to use the new Instant Clone feature, which is currently only available with the vSphere API.

There are two important parts when using Instant Clone:

  1. A user defined script which runs within the GuestOS and is responsible for customizing the network identity of the Instant Clone. This script is not just limited to network configurations but can also be used to customize other OS and/or application settings.
  2. The deployment script which runs outside of the GuestOS and instantiates new Instant Clones using the vSphere API. This script is responsible for passing in data (network configuration, OS and/or application settings) to the GuestOS which can then be accessed directly by the user defined script running within each Instant Clone for actual customization.

To demonstrate the use of the Instant Clone API, I will be using PowerCLI and have also created an Instant Clone PowerCLI module called InstantClone.psm1. However, the API is not limited to just PowerCLI and can be consumed using any of the new vSphere 6.7 SDKs. For our example, we will be exercising the creating Instant Clones from a "Frozen" Source VM workflow since that is the most efficient method, especially as you scale to larger number of Instant Clones. For those that wish to experiment with the other workflow of creating Instant Clones from a "Running" Source VM, feel free to take a look at the previous post for the required steps.

For my setup, I will be using an Ubuntu Server 16.04 system as my Source VM and I will create 30 Instant Clones from this system. Each Instant Clone will immediately be available for use and will be fully customized and reachable from a network perspective (e.g. unique IP and MAC Address). Here is a screenshot of one of my deployments to give you an idea of how blazing fast Instant Clone is 🙂

Here is a short video that I just recorded that demos the Instant Clone APIs using PowerCLI (this demo is using an Ubuntu VM configured with 2GB memory where as the original screenshot was 1GB)

Demo of Instant Clone in vSphere 6.7 from lamw on Vimeo. [Read more...]

Categories // PowerCLI Tags // ESXi 6.7, instant clone, vSphere 6.7, vSphere API

Using vSphere Guest Operations API on macOS Guests? 

07.05.2017 by William Lam // 2 Comments

I have written a number of articles exploring the usage and some of the cool tricks that the vSphere Guest Operations (GuestOps) feature provides which you can be found here, here, here and here. I have been a huge fan and supporter of GuestOps since the early days where it was formally known as the VIX API. Having used GuestOps across many different GuestOS types including Nested ESXi, I have to admit, I had never tried it against an Apple macOS guests. I recently had a customer reach out who was looking to use the GuestOps API via PowerCLI (Invoke-VMScript) to automate updates against his guestOS templates that span across Windows, Linux and macOS (from 10.7 to latest). The customer was able to get all guestOSes working except for macOS.

Since I had never tried this before, I spun up my Apple Mac Mini which happen to have a macOS 10.11 (El Capitan) guests running. I tried using the vSphere API GuestOps directly to see if this was a PowerCLI and/or API issue. I too ran into issues and after enabling VMware Tools debugging on the guests (which you can find more details below), I found that it hit the following error:

[Jun 28 06:35:42.805] [   debug] [vix] >VixToolsImpersonateUser
[Jun 28 06:35:42.925] [ warning] [vmsvc] Failed to set gid for user root

Reaching out to Engineering regarding the problem, I came to learn that this particular issue was due to a syscall change made by Apple starting with macOS 10.10.3 and newer. Although the change was a positive thing from a security standpoint, it did break the GuestOps functionality. The good news was that this was already resolved with VMware Tools 10.1 or later. When I had initially provisioned the macOS guests, the latest VMware Tools at the time was 9.10.5. After I applied the latest version which is currently 10.1.7, the issue went away and I was able to successfully use the GuestOps API on my macOS guests.

Below are examples of running the system_profiler SPSoftwareDataType command using both the Invoke-VMScript cmdlet as well as the vSphere API and PowerCLI to consume the GuestOps APIs. Both approaches delivers the exact same outcome, the one benefit of using Invoke-VMScript is that if you want to easily return output from a given command, the cmdlet already does the heavy lifting. If you notice in the native vSphere API case, you do not get output but rather just the PID ID. If you want to return the output, you need to first save it into a file and then download the file to your client system, which may not be ideal for interactive usage but it all depends on your use case.

[Read more...]

Categories // Apple Tags // apple, guest operations, macOS, osx, vix api, vmware tools

  • « Previous Page
  • 1
  • 2
  • 3
  • 4
  • 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

  • VCF 9.1 - Enabling High Availability for a Small VCF Management Services (VCFMS) Deployment 06/22/2026
  • Clarifying Minimum Required ESX Hosts for VCF Deployments 06/18/2026
  • VCF 9.1 - Auditing VCF Management Services (VCFMS) IP Pool Usage  06/17/2026
  • VCF 9.1 - Auditing vCenter Server Connections using the Connection Utilization API 06/15/2026
  • Quick Tip: Resolving OVFTool "Failed to Send File" Errors on macOS 06/13/2026
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 © 2026

Loading Comments...