Failed to move a VM out of maintenance mode candidate host since the VM is in manual mode!

The vSphere 7 to 8 upgrade (and soon to vSphere 9) series continues successfully, this time I had the above-mentioned challenge during the Check Compliance or Run Pre-Check State inside Image Based Patching.

The error message says that there are VMs that cannot be migrated Fully Automated, which is very useful in the context of Image Based Patching. You want to use the luxury of clicking on Remediate All and the hosts update themselves bit by bit. However, the customer has set his DRS settings to Fully Automated, so the source of the error lies elsewhere.

In the next step I checked the settings at cluster level, here I noticed under VM Overrides that various (22) VMs in the DRS context were switched to manual.

After consulting with the customer, we changed the setting of all VMs from ‘Manual‘ to ‘Fully Automated‘, at least for the upgrade phase. Lo and behold, the pre-run check worked perfectly and the upgrade to vSphere 8 was flawless.

That’s it from this short but important post, if you have any question use the comment section below. 🙂
Thank you for the post. This was a start to identify vMotion blockers. I have created a script to identify this as well as a few other vMotion blockers. Sharing for others to add to.
Clear-Host
# Connect to vCenter
$VCServer = read-host “Enter Vcenter server to query for VM issues?”
Connect-VIServer -Server $VCServer
Clear-Host
Write-Host ” ”
(get-cluster).Name
write-host “”
#Getting Cluster to check for any manual DRS setting per VM.
$BaseCluster = Read-host “Enter cluster name to check?”
# Get all VMs
$VMs = Get-VM -Location $BaseCluster
$Report = “c:\temp\” + $BaseCluster + “_Issues.txt”
# Initialize results array
$results = @()
# Check for Manual DRS settings
$drsOverrides = (Get-Cluster $BaseCluster).ExtensionData.ConfigurationEx.DrsVmConfig
if ($drsOverrides.Behavior -eq “manual”) {
Write-Output “VM Manual DRS settings” `n | out-file $Report
}
foreach ($vm in $VMs) {
$issues = @()
$vmView = Get-View -Id $vm.Id
$config = $vmView.Config
$hardware = $config.Hardware
# Check for Passthrough Devices
if ($hardware.Device | Where-Object { $_ -is [VMware.Vim.VirtualPCIPassthrough] }) {
$issues += “Passthrough device”
}
# Check for SCSI Bus Sharing
if ($hardware.Device | Where-Object { $_ -is [VMware.Vim.VirtualSCSIController] -and $_.sharedBus -ne “noSharing” }) {
$issues += “SCSI Bus Sharing”
}
# Check for Shared HardDisks
$SDisks = $hardware.device.backing.sharing
if ($SDisks -eq “sharingMultiWriter”) {
$issues += “Shared HardDisk”
}
# Check for Mounted ISO
if ($hardware.Device | Where-Object { $_ -is [VMware.Vim.VirtualCdrom] -and $_.Backing -is [VMware.Vim.VirtualCdromIsoBackingInfo] }) {
$issues += “Mounted ISO”
}
# Check for Serial or Parallel Ports
if ($hardware.Device | Where-Object { $_ -is [VMware.Vim.VirtualSerialPort] -or $_ -is [VMware.Vim.VirtualParallelPort] }) {
$issues += “Serial/Parallel port”
}
# Check for CPU Affinity
if ($config.CpuAffinity -and $config.CpuAffinity.AffinitySet) {
$issues += “CPU Affinity”
}
# Check for Encryption
if ($config.VmEncryption) {
$issues += “VM Encryption”
}
# Check for Unsupported Devices (e.g., Floppy)
if ($hardware.Device | Where-Object { $_ -is [VMware.Vim.VirtualFloppy] }) {
$issues += “Floppy drive”
}
# Check for Advanced Settings that may block vMotion
$advSettings = $vmView.Config.ExtraConfig | Where-Object {
$_.Key -match “sched.cpu.affinity” -or $_.Key -match “monitor_control.pinned”
}
if ($advSettings) {
$issues += “Advanced settings (e.g., CPU pinning)”
}
# Add to results if any issues found
if ($issues.Count -gt 0) {
$issues += $vm
$results += $issues -join “, ”
$results | Out-File -Append -FilePath $Report
}
if ($results.count-lt 1) {Write-Output “No issues found” | Out-File -FilePath $Report}
$issues = “”
$vm = “”
$vmView = “”
$config = “”
$hardware = “”
$drsOverrides = “”
$results = “”
}
Thats to kind, thank you so much!!