PowerCLI cmdlet `Move-VM` error "Placement failed" when manual migration to same resources succeeds
search cancel

PowerCLI cmdlet `Move-VM` error "Placement failed" when manual migration to same resources succeeds

book

Article ID: 400888

calendar_today

Updated On: 06-13-2025

Products

VMware vCenter Server

Issue/Introduction

When using PowerCLI Move-VM cmdlet an error is received but we do not see this issue when using the migrate virtual machine (VM) option in the vSphere user interface (UI) and pointing to the same resource pool and manually dragging the VM to the resource pool after migrating to the new cluster. 

Example Error in Powershell:

Move-VM: 6/10/2025 8:56:38 AM   Move-VM         Placement failed for: VM 'VirtualMachine-vm-######' - with placement errors: DRS cannot find a host to power on or migrate the virtual machine.

The same behavior is seen when attempting to move any VM

The same behavior is seen when using different resource pools

The same behavior is seen with all users

In the vpxd logs (/var/log/vmware/vpxd/vpxd-{####}.log) you see the following errors:

2025-06-10T19:14:40.447Z info vpxd[06895] [Originator@6876 sub=drmLogger opID=1b41ded0] SDRS recommendation for diskID: 1000000, srcDs: vim.Datastore:datastore-{######}, dstDs: vim.Datastore:datastore-{######}
2025-06-10T19:14:40.447Z info vpxd[06895] [Originator@6876 sub=drmLogger opID=1b41ded0] SDRS recommendation for diskID: 2000, srcDs: vim.Datastore:datastore-{######}, dstDs: vim.Datastore:datastore-{######}
2025-06-10T19:14:40.447Z info vpxd[06895] [Originator@6876 sub=drmLogger opID=1b41ded0] Need disk copy: false
2025-06-10T19:14:40.450Z info vpxd[06895] [Originator@6876 sub=VmCheck opID=1b41ded0] CompatCheck results: (vim.vm.check.Result) [
-->    (vim.vm.check.Result) {
-->       vm = 'vim.VirtualMachine:{vm_moid}:sdrsnewvm-{###################}',
-->       host = 'vim.HostSystem:{host_moid}:host-{######}',
-->       warning = (vmodl.MethodFault) [
-->          (vim.fault.CannotAccessVmDevice) {
-->             device = "CD/DVD drive 1",
-->             backing = "[] /vmfs/volumes/########-########-####-############/ISO/em7_x86_64_12.1.1-605.el8.iso",
-->             connected = false,
-->             msg = "",
-->          }
-->       ],
-->    }
--> ]

Environment

VMware vCenter Server

Powershell

PowerCLI

Cause

During migration, drives are inaccessible, and when there is media mounted to a device access to that media is lost and causes an error.

Resolution

You can manually disconnect the media on the drive with the below command which should allow the migration to proceed:

$cdDrive = Get-CDDrive -VM $vm
if ( $cdDrive ) {
  Set-CDDrive -CD $cdDrive -NoMedia -Confirm:$false
}

Additional Information

There is a possibility if no media is connected to the device that the drive is in a faulted state. You can reset this by unmounting and then remounting the CD/DVD drive.