When I try to move-vm a powered off VM to a DRS cluster destination, it says it can't migrate a powered off VM to a DRS cluster. I can explicitly name host destination and it works, but that defeats the purpose of using DRS and requires me to script out the destination hosts.
Am I doing something wrong or should I be able to migrate a powered off VM to a DRS cluster?
Thanks,
-MattG
Hello, MattG-
I get the same behavior as you when trying to move a PoweredOff VM to a DRS cluster and specifying the cluster as the value for the -Destination parameter to Move-VM (using both PowerCLI v5.1 Rel 2 and v5.5 Rel 1). Not quite what I would expect.
As a workaround, and without having to name a particular host as a destination, you could employ some Get-Random, doing something like:
Move-VM myVM0 -Destination (Get-Cluster myDestDRSCluster | Get-VMHost | ?{$_.State -eq "Connected"} | Get-Random) -RunAsync
That should get the machine to said cluster, and onto some host that is in Connected state. A subsequent power-on operation (whenever you eventually do that) should then see DRS starting up the VM on a suitable host in the cluster.
Maybe the dev team can comment on whether this behavior is the expected/desired behavior.
Anyway, how does that do for you?
Hello, MattG-
I get the same behavior as you when trying to move a PoweredOff VM to a DRS cluster and specifying the cluster as the value for the -Destination parameter to Move-VM (using both PowerCLI v5.1 Rel 2 and v5.5 Rel 1). Not quite what I would expect.
As a workaround, and without having to name a particular host as a destination, you could employ some Get-Random, doing something like:
Move-VM myVM0 -Destination (Get-Cluster myDestDRSCluster | Get-VMHost | ?{$_.State -eq "Connected"} | Get-Random) -RunAsync
That should get the machine to said cluster, and onto some host that is in Connected state. A subsequent power-on operation (whenever you eventually do that) should then see DRS starting up the VM on a suitable host in the cluster.
Maybe the dev team can comment on whether this behavior is the expected/desired behavior.
Anyway, how does that do for you?
Matt,
As you pointed out while this seems to be a bug, it is not necessary to specify the cluster as DRS will automatically migrate the VMs to other hosts in the cluster on Power-On.
Thanks,
-MattG