VMware Cloud Community
jlazkano
Contributor
Contributor

Stop a VM from local access

Hello again, thank to this forum users I can access localy to my server. I have problems with a VM (has the same IP as ESXi) so I need to power down the VM.

I read on some pages how to do that. I need to access to a console and tye this:

1. List all registered VM on the server: # vmware-cmd -l

2. Stop a VM: # vmware-cmd <path.vmx> stop

I don't know how to access to the console, when I enter with root/pass on local access, I get this screen: IMG_20101215_121037.jpg

I read this page to stop a VM: http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=101416...

Are thoose steps correct?

Thanks for all your help.

Best regards.

0 Kudos
13 Replies
idle-jam
Immortal
Immortal

i would suggest changing the management IP to another temp IP then login to vsphere client to shut down the VM or change the ip of the the VM. then revert the management IP.

0 Kudos
pauljawood
Enthusiast
Enthusiast

Hi,

You can access the console on a ESXi server by following this link http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=101791....

Once you have access to the console on your ESXi host then you will be able to run the commands you have listed.

If this helps then please leave some points.

If you found this helpful then please leave some points.
0 Kudos
mwpreston
Hot Shot
Hot Shot

The following is the link for tech support mode for esxi 4.0

http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=100367...

Don't forget about the ALT-F1 component...

You should only be entering tech support mode if instructed to do so by vmware support however...

0 Kudos
vmroyale
Immortal
Immortal

Hello.

If the VM is on the network, can you manage it remotely to shut it down?  Then you don't have to do anything to the ESXi box.

Good Luck!

Brian Atkinson | vExpert | VMTN Moderator | Author of "VCP5-DCV VMware Certified Professional-Data Center Virtualization on vSphere 5.5 Study Guide: VCP-550" | @vmroyale | http://vmroyale.com
0 Kudos
jlazkano
Contributor
Contributor

Thanks again for your help. I just access to the tech support mode. I try to execute the "vmware-cmd -l" command but I can not:

IMG_20101216_095147.jpg

If I write "vmware"+tab there is no "vmware-cmd" command available.

I can not access remotely to the VM, I need to stop it from command line.

I am apreciating all your help. Thanks and best regards.

0 Kudos
a_p_
Leadership
Leadership

IMO, idle-jam's first suggestion would be the easiest way to handle the situation. Just temporarily use another IP address for the management network.

BTW you should consider to update the host, it's still running on the GA build and there have been a lot of fixes and improvements in the meantime.

André

0 Kudos
jlazkano
Contributor
Contributor

Thanks again, the ESXi server is on housing service, I must call by phone and guide step by step.

I prefer to stop the VM on the server. I don't have more IPs avalable, there are public IPs. And I don't know how is configured the network.

Sorry for my english, but I don't know what that is means "GA build". I really prefer to stop the VM and get management the ESXi on the original IP.

Thanks for all your help and best regards.

0 Kudos
a_p_
Leadership
Leadership

Maybe tab completion does not work, because there are a lot of commands which start with "vmware". You can see all of them by pressing TAB twice. I'd suggest you just type the full command instead of using TAB in this case.

However, shutting down the VM does not solve the issue with the duplicate IP address. Unless you find a way to remotely access the VM and modify its IP settings you actually had to reinstall it.

GA means "General Availability". Build 164009 was the initial release of ESXi which was released in May 2009.

André

0 Kudos
jlazkano
Contributor
Contributor

Thanks again. The duplicate IP problems becomes when a user of a VM change its IP and puts the same as the ESXi one. The VM is a Ubuntu, but there is no any access option (no ssh, no VNC...). I am not sure, but I think if I shutdown the the VM, the ESXi will response to the original IP. First I want to try on a local ESXi before start to call to the housing service.

I try to press the tab twice, I attached an image with command options that start with "vmware". I try to write "vmware-cmd", but there is any command with this name.

The ESXi server is on production, so I can update the version. The others servers works well, but I have any management of the ESXi.

Thanks for all you help. Best regards.

0 Kudos
mwpreston
Hot Shot
Hot Shot

Oh

You are on esxi…

You will have to either access it via vma or the rcli…

Instructions to install are located in the following kb

http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=101416...

jlazkano
Contributor
Contributor

Thanks for the links!

It looks that it works. I can list all VM on the machine.

I try 2 methods:

# vm-support -x

#vim-cmd vmsvc/getallvms

I will try tomorrow to power down the VM. I found 2 methods:

# vim-cmd vmsvc/power.off <vmid>

# vm-support -X <World_ID> –w <dir>

Which one I must choose?

It looks that I will solve this tomorrow.

Thanks for all your help.

Kind regards.

0 Kudos
satishchirala
Enthusiast
Enthusiast

install power cli  for a better knowledge

0 Kudos
DSTAVERT
Immortal
Immortal

You can't use the rcli tools or the vMA to shut down or restart a VM in the free version of ESXi. If you need to do this from the command line you will need to do it from the local console using the unsupported method. There is no vmware-cmd on ESXi. You will need to use vim-cmd.

vim-cmd vmsvc/getallvms (lists all the vms and their vmid's)

vim-cmd vmsvc/power.off [vmid]

-- David -- VMware Communities Moderator
0 Kudos