Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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.

share|improve this question

1 Answer 1

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'
share|improve this answer
    
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

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.