VMware Cloud Community
fveggerby
Contributor
Contributor
Jump to solution

Cutting power on ESXi?

Hi.

Regarding UPS shutdown.

I have ESXi and a UPS with RS232 communication. (no network)

Shutting down guests is no problem. (I hope)

Making com port connection to a Windows guest, install software, which shutdown other Windows guests and it self.

But when power cuts on ESXi, is there possibility of chrash?

Windows has great possibilities of data corruption, does ESXi??

0 Kudos
1 Solution

Accepted Solutions
maxsupremicus
Contributor
Contributor
Jump to solution

It is pretty unlikely that you will experience any corruption of the ESXi host itself after your VMs are down. I believe once an hour the ESXi host will run an autobackup.sh script that writes configurations of the ESXi host to disk -- so there always is some possibility of corruption, but unlikely.

In my lab, I have a real physical server that monitors the power outage and shuts down all VMs on the ESXi host, then runs an SSH script that logs on the ESXi host and does a "busybox halt" command which shuts down the ESXi server, but leaves it in the powered on state. That way the ESXi server turns on again when power is restored, but there is no chance of corrupting the hard drive since I halted the ESXi server.

Of course my physical machine then powers itself off last. In your situation, I am not sure how you could do this other than schedule some sort of cron job to do the busybox halt command on the ESXi host a minute after you shutdown your VM that monitors the UPS in the first place. Would be fun to work that out.

View solution in original post

0 Kudos
3 Replies
fveggerby
Contributor
Contributor
Jump to solution

btw, HD controller has battery backup.

0 Kudos
maxsupremicus
Contributor
Contributor
Jump to solution

It is pretty unlikely that you will experience any corruption of the ESXi host itself after your VMs are down. I believe once an hour the ESXi host will run an autobackup.sh script that writes configurations of the ESXi host to disk -- so there always is some possibility of corruption, but unlikely.

In my lab, I have a real physical server that monitors the power outage and shuts down all VMs on the ESXi host, then runs an SSH script that logs on the ESXi host and does a "busybox halt" command which shuts down the ESXi server, but leaves it in the powered on state. That way the ESXi server turns on again when power is restored, but there is no chance of corrupting the hard drive since I halted the ESXi server.

Of course my physical machine then powers itself off last. In your situation, I am not sure how you could do this other than schedule some sort of cron job to do the busybox halt command on the ESXi host a minute after you shutdown your VM that monitors the UPS in the first place. Would be fun to work that out.

0 Kudos
fveggerby
Contributor
Contributor
Jump to solution

Sounds good.

1st I need to upgrade to 4.1 to get rs232 to work.

Will try to cook something together using cron commands.

I probably wont succeed, but I will try. Smiley Happy

0 Kudos