VMware Cloud Community
mfoley
Contributor
Contributor

Shut down a disconnected virtual machine

Is it possible to shut down a VM on a physical server that's disconnected? For example, if the power supply on my server fails I want to migrate the running VM's on that server onto my other working server. I don't have HA or VMotion (can't afford it) and know I'll have to do it manually do it but the migrate option isn't available for me. I know if the VM is shut down and the server looses power I can migrate it to another server but was wondering if it can be done while a VM was in a running state.

Thanks in advance.

Tags (2)
0 Kudos
8 Replies
SelvaMK
Enthusiast
Enthusiast

Hi,

I am not pretty sure of your plans with your VM. But for your first comment "Is it possible to shut down a VM on a physical server that's disconnected?"

Well, one way is by vmware-cmd <path of the vmx file> stop soft

Selva

0 Kudos
SelvaMK
Enthusiast
Enthusiast

Hi, I am not sure about your plans with your VM. But if you want to power off a VM that is not connected to an ESX but still the vm is in the ESX server, then you can use the command:

vmware-cmd <path of the vmx file> stop <stop/hard>

Selva

0 Kudos
mfoley
Contributor
Contributor

Let me clarify what I mean by disconnected. If the physical server crashes (say the power supply dies) the running VM's (as well as the dead server) shows disconnected in virtual center. I can't right click and migrate that VM to a working server where as if the VM is shut down on a disconnected server I am able to migrate it.

0 Kudos
SelvaMK
Enthusiast
Enthusiast

Hi,

If that is the case, then you may register the VM to another server in shared storage or if the physical server comes back again, you can select connect in VI.

Thanks,

Selva

0 Kudos
mfoley
Contributor
Contributor

How do I register the VM in another server?

0 Kudos
SelvaMK
Enthusiast
Enthusiast

hi,

You can browse to the datastore and right click on the vmx file and click Add to inventory and select the host. also u can fire the command from the new ESX like vmware-cmd -s register <path of .vmx file>

Selva

0 Kudos
IB_IT
Expert
Expert

Hey,

In response to Selva, this should do the trick...before you do just make sure you remove the disconnected VM from inventory (do NOT delete from disk) in Virtual Center and you should be able to readd under a different host in your cluster.

0 Kudos
EmersonP
Contributor
Contributor

Hi!, im in the same situation but the option 'remove from inventory' is grayedout... any ideas? (using vSphere 4.1.0 r381591)

Thanks in advance

0 Kudos