1

I am running SCVMM 2008 R2 with 3 hosts. Right now I am patching the hosts, so I am running the command

disable-vmhost hostA -MoveWithinCluster

Is there a command that I can run or switch I can enable to direct where the machines on hostA get migrated to? What happened last time I ran it was all the machines migrated to a host that was already hosting numerous VMs and there was another host that was completely empty.

Mike
  • 828
  • 1
  • 7
  • 18

1 Answers1

2

That option doesn't exist in that specific commandlet.

However you can achieve the result you want by getting all the hosts on the node with the get-vm command and then piping them to the move-vm to a host you specify. After that you can run disable-vmhost to prevent machines from moving back there during maintenance.

Example:

Get-VM|?{$_.VMHost -eq 'hostA'}|Move-VM -VMHost 'HostB'
Nate
  • 3,378
  • 14
  • 21
  • Thanks. I will give that a try. I believe though I would have a similar problem since it would move all the moves to HostB. I have seen a script that evaluates the Host Rating and moves all the VMs to the highest rated host. I appreciate your answer – Mike Feb 22 '12 at 15:36