Hi
I run an ESX farm of four ESX servers and am looking for a way to migrate all VM's off a host prior to performing patching
Could someone please let me know if it is possible to do this from the command line via a script as migrating each VM one at a time is very time consuming
Thanks for any help in Advance
Ste
Yes that is correct. You need fully automated for the DRS automation to work. For what ever it is worth mine is set pretty aggressive to apply with 2 or more stars
VMotion is a feature of VC. You can not do it through command line.
How may hosts do u have?
don't have VC in place?
Shamim
you may be able to script something via the VC SDK, labourious but repeatable once done. but AFAIK there is no command line interface for VMotion, only Storage VMotion via the RCLI
Tom Howarth
VMware Communities User Moderator
Do you have DRS setup to automatic? If you do then all you need to do is issue a command to put the host in maintenance mode and DRS wll do the rest.
Steve Beaver
VMware Communities User Moderator
====
Co-Author of "VMware ESX Essentials in the Virtual Data Center"
Coming soon to a store near you!
*Virtualization is a journey, not a project.*
Seems faily simple to script in powershell (with VI Toolkit).....
Q: How do I VMotion a VM?
A: This script can be used to VMotion from ESSX1 to ESX2.
Get-VIServer -Server <Server> -User <user> -Password <password> get-vmhost ESX1 | get-vm namevm | move-vm –destination (get-vmhost ESX2)
I must admit I have played with the powershell toolkit, but missed that command-applet, well pointed out
Tom Howarth
VMware Communities User Moderator
Wow that was quick!!! Many thanks for all your replies.
I will look into the powershell options for sure.
Steve my current DRS settings are Partially Automated, i am right in thinking that if i set this to Fully Autmated when iput the host in maintenance mode all vm's will then be migrated?
Thanks again guys for your valuable help
Yes that is correct. You need fully automated for the DRS automation to work. For what ever it is worth mine is set pretty aggressive to apply with 2 or more stars
Works a treat, i wondered why my VM's were not evacuated when the host was placed in mainenance mode and now i know
Thanks again for your help.
Everydays a school day
actually, when you using hostops.pl, it does not allow you enter into maintenance or reboot/disconnect when there is any vm power on.
So any idea is there a way to run vmotion remotely using CLI? It seems to be only Vmtion is enabled where there is accident (ie, host crash).
Is that so? I am using hostpops.pl, but can't find any userful info for vmotion.
The same here. hostops.pl seems to be fine, but how to evacuate all vms bevore?
The hostevacuate.pl is not what i need, because you've to give storage information. i just want host-vmotion, no storage vmotion.
As above said - I want to enter maintenance mode and bevore move all running vm's from that host.