VMware
--
Questions
--
Followers
Top Experts
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.
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/
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 ?






EARN REWARDS FOR ASKING, ANSWERING, AND MORE.
Earn free swag for participating on the platform.

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.
Would you personnaly recommend or not trying to autostart using PowerCLI ?
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
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.






EARN REWARDS FOR ASKING, ANSWERING, AND MORE.
Earn free swag for participating on the platform.
You need to make a decision about using HA or AutoStart, or Both (unsupported!), and do you VMs come back cleanly!
Thanks again.

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
--
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.