Link to home
Create AccountLog in
VMware

VMware

--

Questions

--

Followers

Top Experts

Avatar of ndidomenico
ndidomenico

autostart of vm's in a HA environment
With the latest versions of Esxi 5.x and VCenter, is the autostart of vm's on clustered hosts configured with HA still not possible ? We are running Esxi 5.0.0 623860 on each esxi host, and vCenter Server 5.0.0, 755629. The autostart properties are greyed out when in vCenter Server.

As taken from the Vmware 5.0 documentation at : http://pubs.vmware.com/vsphere-50/index.jsp?topic=%2Fcom.vmware.vsphere.vm_admin.doc_50%2FGUID-6CA3CCF8-71A7-4167-AA5D-86BB67CF060D.html

"... The Virtual Machine Startup and Shutdown (automatic startup) feature is disabled for all virtual machines residing on hosts that are in (or moved into) a vSphere HA cluster. Automatic startup is not supported when used with vSphere HA."

We mostly need the vm's to start automatically in the event of a power failure, where the ups will gracefully shutdown the vm's and the esx hosts. When power is restored, the vm's won't start automatically, unless done manually in vSphere client. And often these situations occur during the weekend (building maintenance, etc) when no IT staff is present, and people need to work on the servers, locally or remotely.

If not possible with vmware, are there any other options ?

Thanks.
.

Zero AI Policy

We believe in human intelligence. Our moderation policy strictly prohibits the use of LLM content in our Q&A threads.


ASKER CERTIFIED SOLUTION
Avatar of Andrew Hancock (VMware vExpert PRO / EE Fellow/British Beekeeper)Andrew Hancock (VMware vExpert PRO / EE Fellow/British Beekeeper)🇬🇧

Link to home
membership
Log in or create a free account to see answer.
Signing up is free and takes 30 seconds. No credit card required.
Create Account

Avatar of ndidomenicondidomenico

ASKER

Any documentation or examples you could provide me on how to do it with PowerCLI ?

# filtering machines by name and start those that are not started
Get-VM <name-filter> | where { $_.PowerState –eq "PoweredOff" } | Start-VM

# stopping virtual machine, defining that we do not want to confirm
# each stop operation
Get-VM <name-filter> | Stop-VM –confirm:$false

I would recommend using the following, also VMware recommends the use of PowerCLI, which is PowerShell interface with vSphere-specific additions.

http://communities.vmware.com/community/vmtn/server/vsphere/automationtools/powercli

One of the simplest PowerCLI examples, and something which is actually extremely useful on its own, is the Get-VM cmdlet. Which lists VMs.

PowerCLI can be a bit overwhelming to use,  But it can be enhanced with a nice toolset and a library of preconfigured scripts to jump-start your mass changes, which is possible with PowerGUI

http://powergui.org/index.jspa

and

VMware Community Pack
http://www.virtu-al.net/featured-scripts/vmware-powerpack/

Thanks hanccocka. Will go through these links and samples and will try to get familiar with PowerCLI in order to configure this shutdown.

Does the script have to be run from the vCenter Server machine ? Because if so, our vCenter Server is running in one of the vm's (that would be shut down in this case). We don't have any other server where to install vCenter Server on. Can it be launched from a PC on the network ?

Reward 1Reward 2Reward 3Reward 4Reward 5Reward 6

EARN REWARDS FOR ASKING, ANSWERING, AND MORE.

Earn free swag for participating on the platform.


No, any computer with access to vCenter, and the PowerCLI and PowerGUI installed on your LAN!

One last thing: is it a "not-recommended" practice to try to autostart the vm's using this method with PowerCLI ? Would I be interfering with the normal mechanisms of HA ?

Free T-shirt

Get a FREE t-shirt when you ask your first question.

We believe in human intelligence. Our moderation policy strictly prohibits the use of LLM content in our Q&A threads.


You mean that it could or might interfere with HA ?

Would you personnaly recommend or not trying to autostart using PowerCLI ?

It will interfere with VMware HA, hence why it's not recommended to use Auto Start in combination with HA.

I would test

1. what happens to your VMs, if you pull the plug? HA will auto start them, at power on, like magic - do they come up fine do you have any issues?

2. do you need to shutdown cleanly? if so you will need a way to bring them up. If so you will need to use Auto Start/PowerCLI

I did test HA on the 2 hosts and HA kicks in fine. If I pull the plug on HostA, then HostB starts properly the vm's that were running on HostA. So no problem there concerning an unplanned failure.

But my problem is that I would like to have my Ups to shutdown cleanly each host and its vm's in case of power failure. This works fine too, except that when power comes back on later on, the hosts reboot but none of my vm's start. So when users come in the morning, no one can work until someone goes in vSphere Client to start them manually. Not very practical for a small office that does not have dedicated IT staff , or if this happens during the weekend and people have to work.

On a previous call with Vmware, they told me that when the hosts reboot, they will put back the vm's in their last known state. Meaning that if I let the vm's die as the battery runs out of power (instead of triggering a proper shutdown from the ups), then the hosts will automatically power on the vm's when power is restored, since they were in a "running" state when everything crashed. I'm not too crazy about this option in order to get autorestart running ... I will try to test this to see if it works in my environment.

Reward 1Reward 2Reward 3Reward 4Reward 5Reward 6

EARN REWARDS FOR ASKING, ANSWERING, AND MORE.

Earn free swag for participating on the platform.


What I meant was Test the VMs are OKAY for you, when restarting from crash conditions!

You need to make a decision about using HA or AutoStart, or Both (unsupported!), and do you VMs come back cleanly!

Ok. So far, they come back ok. So I think we will stick with standard HA features, and no automatic shutdown of vm's in case of power failure.

Thanks again.

Free T-shirt

Get a FREE t-shirt when you ask your first question.

We believe in human intelligence. Our moderation policy strictly prohibits the use of LLM content in our Q&A threads.

VMware

VMware

--

Questions

--

Followers

Top Experts

VMware, a software company founded in 1998, was one of the first commercially successful companies to offer x86 virtualization. The storage company EMC purchased VMware in 1994. Dell Technologies acquired EMC in 2016. VMware’s parent company is now Dell Technologies. VMware has many software products that run on desktops, Microsoft Windows, Linux, and macOS, which allows the virtualizing of the x86 architecture. Its enterprise software hypervisor for servers, VMware vSphere Hypervisor (ESXi), is a bare-metal hypervisor that runs directly on the server hardware and does not require an additional underlying operating system.