VMdawg
Enthusiast
Enthusiast

Vmotion Everything?

Jump to solution

Would like to know if there is a way to vmotion everything off a host at once? Have never really tried multiple vmotions from 1 host to another host or multiple host's at one time for fear of time-out's etc...Also what does relocating VM files even accomplish? I have tried this and it doesn't seem to do anything (unlike remove from inventory).

0 Kudos
1 Solution

Accepted Solutions
Ken_Cline
Champion
Champion

Nope. When you put a host into Maintenance mode, it will prevent powering on additional VMs, and - if you are in a DRS-enabled environment, it will automatically begin using VMotion to migrate VMs off of the Maintenance mode-enabled host to other hosts within the cluster. If you don't have DRS turned on, you can manually migrate VMs to other hosts using VMotion.

Ken Cline VMware vExpert 2009 VMware Communities User Moderator Blogging at: http://KensVirtualReality.wordpress.com/

View solution in original post

0 Kudos
21 Replies
Jazzer
Enthusiast
Enthusiast

Sure, put the host in Maint Mode. Or select one server, hold down the shift key and left click. Right click the group and select migrate. My experience is two transfer at a time, which is fine for our needs. I'm sure there may be a way to script the move, but I'll just share my two pennies. Smiley Happy

Lfrisino
Enthusiast
Enthusiast

When you put the host in Maint Mode, all vms have to be powered off. That migration would be a 'cold migration.' VMotion would be a 'live' migration, which is not possible in Maint Mode...

Ken_Cline
Champion
Champion

Nope. When you put a host into Maintenance mode, it will prevent powering on additional VMs, and - if you are in a DRS-enabled environment, it will automatically begin using VMotion to migrate VMs off of the Maintenance mode-enabled host to other hosts within the cluster. If you don't have DRS turned on, you can manually migrate VMs to other hosts using VMotion.

Ken Cline VMware vExpert 2009 VMware Communities User Moderator Blogging at: http://KensVirtualReality.wordpress.com/
0 Kudos
Anders
Expert
Expert

Would like to know if there is a way to vmotion

everything off a host at once? Have never really

tried multiple vmotions from 1 host to another host

or multiple host's at one time for fear of time-out's

etc...Also what does relocating VM files even

accomplish? I have tried this and it doesn't seem to

do anything (unlike remove from inventory).

You cannot do it "at once", there is a maximum of 2 concurrent Vmotions per host in VC.

If you do more than that, it will queue up, and continue until finished.

All in all it will happen pretty quick anyway.

\- Anders

0 Kudos
Lfrisino
Enthusiast
Enthusiast

See the post from pangchen on http://www.vmware.com/community/thread.jspa?messageID=543377

"Maintenance mode prevents all VMs from being powered on that host. If there are any running VMs, the host cannot go into maintenance mode until the VMs are powered off. "

Message was edited by:

ken.cline@hp.com to remove trailing ? from URL

0 Kudos
Ken_Cline
Champion
Champion

That is true, with one small caveat. It should read "...until the VMs are powered off or migrated via VMotion to another host[/i]" - basically, a host cannot enter maintenance mode until there are no longer VMs running on it...doesn't matter how you achieve that - you can kill them, or you can move them

Ken Cline VMware vExpert 2009 VMware Communities User Moderator Blogging at: http://KensVirtualReality.wordpress.com/
0 Kudos
VMdawg
Enthusiast
Enthusiast

This is what I was hoping for...all my farm clusters have DRS enabled, so as long as I can go into maintenance mode and have DRS vmotion all the VM's off onto other host's automatically...good to go, tx

0 Kudos
Ken_Cline
Champion
Champion

You're set...it's like magic!

Ken Cline VMware vExpert 2009 VMware Communities User Moderator Blogging at: http://KensVirtualReality.wordpress.com/
0 Kudos
VMdawg
Enthusiast
Enthusiast

I think the VM Forums are like magic...I ask a question and the answers magically appear...Who'd a thunk!

0 Kudos
JDLangdon
Expert
Expert

You're set...it's like magic!

During my Install and Config course the instructor revealed the secerets to the VMotion magic trick.

Even now that I know how it's done, I'm still impressed. Smiley Wink

0 Kudos
derekn
Enthusiast
Enthusiast

I use maint mode all the time for switching out hardware. One thing to remember is make sure there are no hardware dependencies tied to your vm. Example is keeping the physical cd-rom attached.

It will not automatically move when you vmotion it using maint mode. Found that out the hard way. Smiley Happy Remember to detach the cd-rom's...

-go easy
0 Kudos
VMdawg
Enthusiast
Enthusiast

So I'm not ready to test this yet (because we have so many VM's running on 1 host)...if a VM is unable to vmotion off will it warn you before the host goes into maintenance and shuts off the vm???

0 Kudos
derekn
Enthusiast
Enthusiast

Correct. It will actually go into maintenance mode but it will not automatically move the vm off. The vm will function fine, but will be stuck on the host until user interaction is completed. The vm will not shut off when you vmotion between two esx host when you have fibre or san storage. If you are vmotion between physical storage on the host and another....you have to shut down the vm's and vmotion through Virtual center.

-go easy
0 Kudos
Ripley8
Enthusiast
Enthusiast

I use maint mode all the time for switching out

hardware. One thing to remember is make sure there

are no hardware dependencies tied to your vm.

Example is keeping the physical cd-rom attached.

t will not automatically move when you vmotion it

using maint mode. Found that out the hard way. Smiley Happy

Remember to detach the cd-rom's...

And the same applies to floppy disk image connections (the CD/Floppy needs only to be disconnected, not unmounted) also watch out for VMs that communicate acroiss an internal only Vswitch (no NIC) attached.

0 Kudos
dpomeroy
Champion
Champion

FYI,

If DRS is set to Fully Automated then when you put the host in Maintenance Mode VMs will be automatically moved off. If set to a lower level the VMs will not move, at least this is how it works in my environment.

0 Kudos
VMdawg
Enthusiast
Enthusiast

This explains why none of my VM's would vmotion off a host going into maintenance mode...all my DRS cluster's are set to 4 stars, so they wouldn't move. It has to be set more agressively for it to work...thanks!

0 Kudos
Ken_Cline
Champion
Champion

Not at all. The number of stars has nothing to do with your problem. The only thing that would cause VMs to not be automatically migrated off the host when entering MM is to have the automation level set to something other than "Fully Automated"

Ken Cline VMware vExpert 2009 VMware Communities User Moderator Blogging at: http://KensVirtualReality.wordpress.com/
0 Kudos
VMdawg
Enthusiast
Enthusiast

Not at all. The number of stars has nothing to do

with your problem. The only thing that would cause

VMs to not be automatically migrated off the host

when entering MM is to have the automation level set

to something other than "Fully Automated"

Have you tested that? Because I have and my DRS is set to fully automated and at 4 stars it will not vmotion the VM's going into MM.

0 Kudos
VMdawg
Enthusiast
Enthusiast

Still looking for answers

0 Kudos