Загрузите HP Power Protector для ESXI

Это должно работать независимо от того, содержат ли имена файлов пробелы или двоеточия:

find -maxdepth 1 -type f -exec sh -c 'file -b "{}" | grep -sq ASCII' \; -print0 | xargs -0 chmod -x

Можно удалить -maxdepth 1 сделать это рекурсивным.

Могут быть ложные положительные стороны, если сами имена файлов содержат строку "ASCII".

Править:

Я включил предложение pepoluan использования -b опция для file таким образом, имя файла не производится для теста grep. Это должно устранить ложные положительные стороны.

2
задан 12 November 2013 в 03:58
1 ответ

As with APC Powerchute UPS software, you're not supposed to install UPS management agents directly on an ESXi host. I still think VMware should build something like this into the ESXi distribution.

In practice, my small and large VMware environments do not have any provisions for graceful UPS-led shutdown. There's too much to coordinate (SAN, networking, etc.) and bigger installations have facility-level UPS and generator. Smaller sites just deal with the risk.

Anywho, for your situation, you'll need to make use of the VMware Management Assistant (vMA) virtual machine appliance. This appliance sits in your virtual infrastructure and can be used to execute scripts on your hosts.

From there, see HP's documentation here about installing the HPPP Linux RPM onto the vMA appliance and modify the execute bit on the shutdown script located at: /usr/local/HP/PowerProtector/bin/virt_tools/shtdownESXi.pl

The script has the typical remote execution parameters and will need to be modified to taste:

perl /usr/local/HP/PowerProtector/bin/virt_tools/shtdownESXi.pl --server ip_address --username root --password rootpassword

1
ответ дан 3 December 2019 в 12:57

Теги

Похожие вопросы