Failed to change guest OS settings when a VM is running: The attempted operation cannot be performed in the current state ("Powered on"
search cancel

Failed to change guest OS settings when a VM is running: The attempted operation cannot be performed in the current state ("Powered on"

book

Article ID: 406948

calendar_today

Updated On:

Products

VMware vSphere ESX 8.x VMware vSphere ESX 7.x

Issue/Introduction

A virtual machine that was upgraded from Windows Server 2019 to Windows Server 2025.  Need to update the Guest OS setting in vCenter from "Windows Server 2019" to "Windows Server 2025".     However, this setting is grayed out and cannot be modified while the VM is powered on. It only becomes editable when the virtual machine is powered off.

 

Running powercli also fails: 

      Get-VM -Name vm1 | Set-VM -GuestId windows2022srvNext_64Guest -Confirm:$false | Out-Null

The operation for the entity "vm1" failed with the following message: "The attempted operation cannot be performed in the current state (Powered on)."

Environment

vSphere 7.0.x

vSphere 8.0.x

 

Cause

This is an expected result ,  there is no way to change the Guest OS setting while the VM is powered on.

Resolution

The VM must be powered off first, then change the guest OS settings.

This can be done in vCenter Web GUI manually, or via  Powercli:

   Get-VM -Name vm1 | Set-VM -GuestId windows2022srvNext_64Guest -Confirm:$false | Out-Null