nnoel
Contributor
Contributor

Migrate Guests when host is disconnected in VC

I have lost a drive on my host server that will be replacing it this evening. In the meantime, all my guests on the host are still up and running; however I would like to migrate them to another ESX server before I bring down their current host. My two ESX servers have shared storage but I haven't had a chance to enable v-motion yet. I tried browsing the datastore and registering from there on my second ESX server but I receive the message that the specified key, name or identifier already exists. I tried running a schedule task to relocate the guest but it failed because the host is disconnected. Is there any way to unregister the guest from one host so I can register it with another host?

0 Kudos
3 Replies
GCR
Hot Shot
Hot Shot

Hello,

you have 2 options, or shutdown/suspend that VM, unregister it from the present ESX server and register it in the new ESX server and Power on/resume it.

Or you can research better the SDK Programing guide and on it's page 232 it shows an exemple of a script to do VMotion using SDK scripting.

Hope this will help you.

Cheers,

Gonçalo

0 Kudos
nnoel
Contributor
Contributor

Do you have a command to unregister the VM?

0 Kudos
cheeko
Expert
Expert

/usr/bin/vmware-cmd -s unregister

cheers,

cheeko

0 Kudos