ITJS
Contributor
Contributor

VMWare Infrasctructure Scheduled Task Issue

I'm running VMWare IClient 2.5 with ESX 3.5 (neither is update 2 or greater....yet) and i've come across an issue / turning it into a request for scheduled tasks.

What i want to do is schedule a task to shut down an image, migrate it, and power it back on (vmotion isn't fully working yet)

I would like to have this all done in a tiered single task, but would settle for two separate tasks.

It's easy enough to schedule a power state change to shutdown a VM Image but then the tricky part is with the migration. With migration if you're scheduling an event even for a later time if the image you want to migrate is currently powered on, you can't select the datastore. the option disappears.

in my case that's what i want to do, power it off, move it to a shared datastore (in preparation for getting vmotion working) and power it back on.

has this been addressed in any later version or am i missing anything?

thanks!

0 Kudos
6 Replies
djciaro
Expert
Expert

Hi,

The options that you have available are correct, you cannot migrate the machine via a scheduled task unless the VM is powered off.

The only possible work around via VirtualCenter tasks would be:

1. Temporarily power off the machine

2. Setup your scheduled task to migrate the VM

3. Power back on

4. Schedule the power off of the VM for a few minutes before the scheduled migration.

5. Schedule a task to power on the machine after the migration (you will need to time this to allow enough margin to migrate before the power on starts)

If you found this information useful, please consider awarding points for "Correct" or "Helpful". Thanks!

If you found this information useful, please consider awarding points for "Correct" or "Helpful". Thanks!
0 Kudos
ITJS
Contributor
Contributor

i believe that to be true, but in my situation the key is moving to a different datastore, not necessarily migrating the VM. If you go through what you described and watch the columns on the left of that scheduled task window, you'll see the option to migrate datastore disappear based on what i layed out in my above post, and that's what i'd like to do.

thanks for the reply Smiley Happy

0 Kudos
djciaro
Expert
Expert

You have confused me with your response, have you tried the following:

The only possible work around via VirtualCenter tasks would be:

1. Temporarily power off the machine

2. Setup your scheduled task to relocate the VM

3. Power back on

4. Schedule the power off of the VM for a few minutes before the scheduled migration.

5. Schedule a task to power on the machine after the relocation(you

will need to time this to allow enough margin to move before the

power on starts)

If you found this information useful, please consider awarding points for "Correct" or "Helpful". Thanks!

If you found this information useful, please consider awarding points for "Correct" or "Helpful". Thanks!
0 Kudos
ITJS
Contributor
Contributor

double post .

0 Kudos
ITJS
Contributor
Contributor

i've gone through setting up those steps but stopped because of what

i saw. what you'll see in the attached photos is the result of trying

to "relocate a virtual machine" as the chosen scheduled task while it

is powered on, vs "relocating a virtual machine" while it is powered

off (diff image for the sake of easy photo taking and not turning off a

vm).

the problem with this is, if i want to take a VM that is powered on, and schedule

to power it off, THEN i want to "relocate a virtual machine" (this same virtual machine), right

after i setup the schedule to power it off, it is still seen as powered

on....and when it is seen as powered on....you get what you see in the

first picture...no option to select a datastore. it's like the

scheduled task does not respect the fact that you've scheduled a

separate task on the same vm image.

0 Kudos
AWoroch
Contributor
Contributor

DJCIARO:

Thank you, that's exactly what I was looking for. After reading your post it makes sense, as it's just a matter of tricking the VM/Task into believing it is off, which passes the checks for the Scheduled Task to be created. The only catch however, is it doesn't help me schedule the downtime for after hours, as I have to at some point shut down the VM to set up the scheduled task Smiley Happy But I'll play with this, as it's at least getting me the direction I'm looking for.

Thank you very much.

0 Kudos