Quantcast
Channel: VMware Communities : Document List - vSphere PowerCLI
Viewing all articles
Browse latest Browse all 379

Using PowerCLI to migrate VMs in a DRS enabled Cluster

$
0
0

 

We are running ESX 4.0 on HP DL380G6 servers.  I created a cluster with three hosts and enabled HA and DRS.  I can use the VSphere GUI to tell a host to enter Maintenance Mode, and since it is in a DRS enabled cluster, it will migrate it's VMs to the other hosts in the cluster and all is well.  When I try to do the same thing in PowerCLI (i.e. : Set-VMHost -VM <VMHostName> -State "Maintenance"), I get the message: "There are one or more powered on virtual machines on host: <VMHostName>.  The host will go into maintenance mode once all virtual machines are powered off."  We are trying to create some Security Updates scripts and would like the capability to do this without having to specify the migration of each VM manually by name.

 

 

Any ideas?

 

 


Viewing all articles
Browse latest Browse all 379

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>