WilliamLam.com

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

PowerCLI 13.0 on Photon OS

12.08.2022 by William Lam // 3 Comments

I received a question from Andrea Peetz, asking whether the new Image Builder cmdlets, which is part of the new PowerCLI 13.0 release would work with Photon OS 3.0 (PH3)? After speaking with the PowerCLI team, it looks like Photon OS 3.0 is not compatible with the new cmdlets. If you attempt to use one of the Image Builder cmdlets like Get-EsxSoftwareDepot, you will get the following error:

Unable to cast object of type 'System.IO.FileStream' to type 'System.IO.Pipes.PipeStream'.


With that said, if you do not require the Image Builder cmdlets, then the rest of the PowerCLI cmdlets should work just fine.

While I have not used PH3 for quite some time now, I do use Photon OS 4.0 (PH4) on a regular basis. I was curious if I would have better luck with the new Image Builder cmdlets. Unlike PH3 which ships with Python 3.7, which is the required version for the Image Builder cmdlets, PH4 ships with a newer version of Python which is 3.10 and will not work with PowerCLI. We can still meet this requirement, but we will need to install Python via pyenv.

After a quick test, I was able to get the basic Image Builder cmdlets working and while going through a complete end-to-end workflow to make sure everything was working, I ran into a slightly different issue. When using the Export-EsxImageProfile cmdlet to export an ESXi Image Profile to an ISO file, I got the following error:

Can not instantiate 'certified' policy: VibSign module missing.

Quickly debugging the issue with the PowerCLI team, it looks like the VibSign module that has been compiled has a dependency on OpenSSL 1.1 and PH4 ships with OpenSSL 3.0 by default. Luckily, I was able to find a workaround by building the required file from the latest stable OpenSSL 1.1 release. Once the dependency was fulfilled, I was able successfully complete the Image Builder workflow!


Similiar to PH3, if you do not require the use of the Image Builder cmdlets, PowerCLI 13.0 can be installed on PH4 using the instructions below. If you do need to use the Image Builder cmdlets on PH4, you will need to run Step 2 below as that is a required step. I have also reported both of these issues with the PowerCLI team.

[Read more...]

Categories // Automation, PowerCLI Tags // auto deploy, image builder, PowerCLI

Identifying ESXi boot method & boot device

01.09.2018 by William Lam // 13 Comments

There was an interesting discussion on our internal Socialcast platform last week on figuring out how an ESXi host is booted up whether it is from local device like a disk or USB device, Auto Deploy or even boot from SAN along with its respective boot device? Although I had answered the question, I was not confident that we actually had a reliable and programmatic method for identifying all the different ESXi boot methods, which of course piqued my interest.

With a bit of trial and error in the lab, I believe I have found a method in which we can identify the ESXi boot type (Local, Stateless, Stateless Caching, Stateful or Boot from SAN) along with some additional details pertaining to the boot device. To demonstrate this, I have created the following PowerCLI script ESXiBootDevice.ps1 which contains a function called Get-ESXiBootDevice.

The function can be called without any parameters, in which it will query all ESXi hosts for a given vCenter Server and/or standalone ESXi host. You can also specify a specific ESXi host by simply passing in the -VMHostname option.

Here is an example output for one of my lab environments which shows several ESXi hosts and their different boot methods from local disk to Auto Deploy which can include stateless, stateless caching and stateful deployments. Depending on the BootType, the boot device shown in the Device column will either be the MAC Address of the NIC used to network boot the ESXi host or the identifier of a disk device. I have also included some additional details such as vendor/model along with the media type (SAS, SSD or USB) which is available as part of ESXCLI.


This script also supports ESXi environments that boot from SAN (FC, FCoE or iSCSI) and you can easily identify that with the word "remote" for the BootType. I would like to give a huge thanks to David Stamen who helped me out with the boot from SAN testing.

Categories // Automation, ESXi, PowerCLI, vSphere Tags // /UserVars/ImageCachedSystem, auto deploy, boot from SAN, ESXi, PowerCLI, stateful, stateless, stateless caching, vSphere API

Using vSphere Auto Deploy to Netboot ESXi onto Apple Mac Hardware

01.17.2017 by William Lam // 4 Comments

Last week I published an article that demonstrated for the first time on how to netboot an ESXi installation onto Apple Mac Hardware. As you can imagine, this was very exciting news for our VMware/Apple customers, who historically have not had this capability before. Customers can now automate and install ESXi over the network onto their Apple Mac Hardware just like you would for other non-Apple hardware.

With the ability to boot ESXi over the network for Apple Mac Hardware, it is now also possible for customers to take advantage of the vSphere Auto Deploy feature. Auto Deploy allows customers to easily and quickly provision ESXi hosts at scale and integrates directly with vCenter Server to automatically join and apply specific defined host configuration policies. This is a great time to check out Auto Deploy, especially with all the new enhancements that were introduced in vSphere 6.5 like custom script bundles for example.

Below are the instructions on how to setup Auto Deploy to work with Apple Mac Hardware.

[Read more...]

Categories // Apple, Automation, ESXi, vSphere 6.0, vSphere 6.5 Tags // apple, auto deploy, BSDP, ESXi 6.0, ESXi 6.5, iPXE, mac mini, mac pro, snponly64.efi.vmw-hardwired, tftp, tramp

  • 1
  • 2
  • 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

 

Loading Comments...