Hi All,
I'm hoping that I'm placing this query in the right section of the forums...
I installed ESXi 5 on my home server (HP Proliant) recently and am now up and running with an Ubuntu Server Virtual machine.
Prior to transferring to ESXi I used to shutdown my server each evening using cronjob on Ubuntu Server
I can't see an easy way to do the same for the ESXi host , so I can shutdown my ubuntu virtual machine easily but it still leaves the HP Proliant on running ESXi.
Any thoughts on the best way to do something like this - am I missing something obvious (I've searched the forums)?
Many thanks,
Shaun
Hi,
Here is the Link for Automatically shutting down ESX Servers and Vservers
http://communities.vmware.com/docs/DOC-4931
Hi,
Here is the Link for Automatically shutting down ESX Servers and Vservers
Many thanks for your quick response!
I don't think this link helps with ESXi v5.
When I ssh to server there is no standard shutdown command there, so I can't do a"shutdown -h now" as I would on Linux.
I've also read previously, via google, that modifications to crontab on ESXi 5 get wiped out on the next boot of the server as the file system from "/" gets replaced. I confirmed this by modifying the crontab file in /var/spool/cron/crontabs/. On reboot all changes are lost (and any files I create in the ESXi filesystem disappear as well)
I'd like to know if there if there is any recommended way around the above (I know that probably most people here will be running their servers 24/7 which is probably why I haven't seen much around this subject)?
Thanks,
Shaun
Hi,
As per the query I think you want to reboot the VM where you have now Ubuntu Server
In the VMware Infrastructure Client (VI Client), you will notice a Scheduled Tasks button on the main toolbar.
OR
In the VMware Infrastructure Client (VI Client) ,Home under Management --> Scheduled Tasks
There you will get the option of rebooting the VM at the scheduled time ie
Change the power state of a virtual machine – say that you wanted to create scheduled tasks that would reboot the VM for the stability of the underlying applications.
_______________________________________________________________________________________________________________________________
Regards
Umesh Ahuja
In case your problem is resolved Request you to provide the points marking
Hi Umesh,
Thanks for your reply.
As per the query I think you want to reboot the VM where you have now Ubuntu Server
No, it's not the Virtual Machine I want to reboot or shutdown.
I want to shutdown the (real physical) Computer which is running ESXi 5 ( I want to turn off the physical PC at midnight each night and then I'll start it again the next day at 5pm when I return home - this is to prevent electricity wastage primarily).
Thanks,
Shaun
the answer is :
"C:\Program Files (x86)\VMware\VMware vSphere CLI\bin\vicfg-hostops.pl" -a poweroff -f --server=aaaaa --username bbbbbb --password ccccccc --operation shutdown
if you have a windows x32 remove the (x86)
You must run this command from a computer with vSphere CLi installed
VMware vSphere CLI 5.0 U1 / 30 march 2012 http://downloads.vmware.com/d/details/vcli50u1/dCV0YndkdGVidCVkKg==
NOT vSphere Power CLi
I recommand you to configure Virtual Machine Startup/Shutdown in vCenter for your host in the Configuration Tab. Put your VM in the Automatic Startup. This will also properly shutdown your vm and start them when the host reboot. Otherwise, they will shutdown as a crash, power remove, bang. In this configuration area, change the "shutdown action:" to Guest Shutdown.
Vm will shutdown properly if the VMware tools are installed, then the host will shutdown.
create a task in windows that will trigger a .bat file at the time you want. You can even run that command on a VM that will have to shutdown itself before the host shutdown. I work, that's what I do.
This command can also be used to shutdown VM and host after a power failure. One VM must have a software that will receive the trap and execute this command. This solved my problem with my tripp lite product hhiiiiaaaa