Since Microsoft released: KB5022842 a lot of customers has experienced Windows Server 2022 not being able to boot. On vSphere 7 this might be a problem if you have installed the patch at enabled secure boot for the server.
If you need to find VM that are running Windows Server 2022 and have enabled Secure Boot it is not that easy.
The problem is that your cannot always be sure that the OS selected for the VM is the OS actually installed in the VM. If for instance you installed Windows Server 2022 before is was officially supported in vSphere you might have chosen Windows Server 2019. So you will need to use the OS name that VMware tools are reporting.
But what is VMware tools is not running. That’s a problem.
The following script will find VMs with Secure Boot enabled that are running Windows Server 2022, but also VM’s where we are not certain because VMware Tools is not running.
vRealize Orchestrator (vRO) is a powerful automation platform that enables you to automate and orchestrate various IT processes, including the execution of Python scripts. In this article, we will show you how to set up vRO to run Python scripts and provide some tips along the way.
Before you can run Python scripts in vRO, you need to have the following:
A working installation of vRealize Orchestrator (8.10.2+).
A vCloud Suite Advanced or Enterprise license. You cannot run Python scripts with the standard vCenter license for vRO
Setting up vRO to run Python scripts
To set up vRO to run Python scripts, follow these steps:
Open the vRealize Orchestrator client and log in with your administrator credentials. (https://<servername>/orchestration-ui)
In the main menu, go to the “Assets” and select “Environments” from the submenu.
Click the “New Environment” button to create a python3.7 environment.
In the “General” tab, enter a name and a description for the environment.
When ever you need to migrate to from one vCenter instance to another there are lots of things you need to migrate.
This PowerCLI script will help you migrate members from one DRS VM group to another. It can easily be modified to be part of a bigger context, or migrate all groups available.
The prerequisites are that you have both the new and the old vCenter running, and that you have disconnected you hosts in the old vCenter and connected them to the new one. Do NOT remove them from you old vCenter. Leave them disconnected.
The purpose of this script is to migrate from one vCenter to another when using dvSwitches. The dvSwitch is bound to vCenter, so in order to migrate hosts from one vCenter to another you can map the networks using this script. All you need to do is disconnect the host from the original vCenter with the VMs still running, but not remove it. Then you connect it to the new vCenter.
When upgrading to vSphere 7 or any other version, you might choose to create a brand new vCenter instead of migrating the old one. But what about folder structure, tags, distributed switches and so on.
Here I will demonstrate how you can easily migrate your tags from one vCenter to another using VMware PowerCLI.
Todays announcement of vRealize Automation 8.1 reveals the possibility to use Custom resources in vRA.
I am super exited about that ability. Those who know me, knows that I am a HUGE fan of vRO (vRealize Orchestrator) and the possibility to add anything as a resource in a vRA really opens the product to so many possibilities.