Solved

How to schedule shutdown of ESXi from Virtual Machine?

Posted on 2008-10-31
9
10,926 Views
Last Modified: 2012-06-21
Hi,

my customer wanted some additional functionality, but was not compatible with Windows Server 2008, so I reconfigured the existing server, installed ESXi on it, and put back existing Windows 2008 server and additional Windows Server 2003.

Now, the problem is what to do with UPS automatic shutdown, which was fully functional on previous installation of Windows Server 2008? I have ESXi now, and things got complicated.

MY THINKING:
I might try to put thru the UPS signal, either via COM port, or via USB port, depending on what will ESXi let thru directly to Virtual Machine.
Then I would use UPS software on Windows 2008 server to shutdown this Virtual Machine, and configured the second VM (server 2003) in ESXi to shutdown too, when first machine shuts down. This is possible with ESXi.

But what about host ESXi? How could I shutdown host machine?
Couldn't I have some script, which would watch  - let's say - guest's RAM usage and shutdown host ESXi when guest RAM usage is 0? Or something like this.

There was a discussion on the same subject http://communities.vmware.com/message/1002520;jsessionid=49C105BC09DFAA3F0B28925A99EA62AC which ended with conclusion to just shutdown guest OS when power outage, and let host ESXi die.

But my question is:
any idea how to go one step further and shutdown also host ESXi with some script?
0
Comment
Question by:Andrej Pirman
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 4
9 Comments
 
LVL 5

Expert Comment

by:giovannicoa
ID: 22859323
Hi,

I'm not sure and I've not tried but I think you can do something like that :

# In case of a serial or usb UPS connector

a) You need a esx host and 1 physical machine
b) Connect the esx host and physical machine to the usp
c) Connect the physical machine (not the esx host) to the usb or serial of the ups
d) Install the UPS software on the physical
e) Install the remote CLI on the physical
f) Use remote CLI script to start ESXi shutdown

 # In case of network connection to UPS

a) Only the esx host is needed
b) Install a virtual machine with UPS network software
c) Configure this vm to start at ESXi startup
d) Install the remote CLI on the vm
e) Use remote CLI script to start ESXi shutdown

Hope this can help you,
Giovanni Coa
0
 
LVL 18

Author Comment

by:Andrej Pirman
ID: 22860729
Giovani, thanx for your input.

Your theory is by my oppinion good, except the last step, which I was already wondering about: "remote CLI script to shutdown ESXi".
ESXi does not, in contrary to ESX, support host scripting, so I actually do not know how to communicate with host ESXi from guest OS.
0
 
LVL 5

Accepted Solution

by:
giovannicoa earned 500 total points
ID: 22861078
Hi,
with the use of remote CLI installed on the guest (physical or virtual), you are able to send vmware commands throught network to the ESXi server (you need to specify the vmware server on the command line).

You can find how to download and install it on this link:
http://searchvmware.techtarget.com/tip/0,289483,sid179_gci1306901,00.html

I'm not sure that you can shutdown entirely the host server but surely you can shutdown the virtual machines.

You can also (I've not tested) enable SSH access to ESXi.
Try follow these steps: http://www.vm-help.com/esx/esx3i/ESXi_enable_SSH.php

Hope this can help you,
Giovanni Coa
0
Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

 
LVL 5

Expert Comment

by:giovannicoa
ID: 22942985
Have you tried to automatically shutdown every vmware machines throught CLI ?

Giovanni Coa
0
 
LVL 18

Author Comment

by:Andrej Pirman
ID: 23234480
I am currently solving problem on how to pass-thru COM port communication from UPS to VM, for VM to be able to shut down all other VM's.
0
 
LVL 5

Expert Comment

by:giovannicoa
ID: 23234758
Have you used a LAN2COM device ?

Giovanni Coa
0
 
LVL 18

Author Comment

by:Andrej Pirman
ID: 23263491
No Giovanni,
not yet. My UPS is connected to COM port, but I did not manage to pass-thru COM port to Virtual Machine. Is there any option to do that in ESXi? Or is it reserved only for ESX?

If there won't be any other option, I'll buy a SMTP card for my UPS and additional NIC adapter for ESXi, so one of VM's will have UPS connected directly via NIC LAN adapter and will be able to shut down properly all other machines.
0
 
LVL 5

Expert Comment

by:giovannicoa
ID: 23465517
I've used COM port in the past with ESX server and some times there a lot of issue in communicating, but I've not troubleshooted them in deep.

Have you choosen how to startup your virtual machines after the power outage ?

Hope this can help you,
Giovanni Coa
0
 
LVL 18

Author Comment

by:Andrej Pirman
ID: 23481970
Hi Giovanni, thanx for info.

I decided to go parallel way, which means to install another physical machine with Windows XP parallel to ESXi machine, so I will have controll over ESXi all the time.
This XP machine will have central UPS console installed, with UPS clients on virtual machines, so it will be able to shutdown all virtual machines.
The only thing to find out is how to power off the host ESXi after virtual machines are shutdown....or even better, how to send power down command to ESXi, which would then nicely shutdown first all virtual machines, and finally ESXi itself. That would be the best sollution, even for power up.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Which vmware product do I need. 8 106
Cannot unmount datastore 5 108
NFS Share vs SysLog 8 52
setup VMWare environment on Windows 10 17 49
When converting a physical machine to a virtual machine using VMware vCenter Converter Standalone or vCenter Converter Enterprise, if an adapter type is not selected during the initial customization the resulting virtual machine may contain an IDE d…
In this step by step tutorial with screenshots, we will show you HOW TO: Enable SSH Remote Access on a VMware vSphere Hypervisor 6.5 (ESXi 6.5). This is important if you need to enable SSH remote access for additional troubleshooting of the ESXi hos…
This tutorial will walk an individual through the steps necessary to enable the VMware\Hyper-V licensed feature of Backup Exec 2012. In addition, how to add a VMware server and configure a backup job. The first step is to acquire the necessary licen…
This Micro Tutorial walks you through using a remote console to access a server and install ESXi 5.1. This example is showing remote access and installation using a Dell server. The hypervisor is the very first component of your virtual infrastructu…

740 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question