Softlayer如何处理Vsphere上的安装后脚本?

时间:2017-07-17 17:08:24

标签: ibm-cloud ibm-cloud-infrastructure

我正在使用slcli重新加载ESXi的主机。以下是呼叫示例:slcli hardware reload <hwd_id> --postinstall <url_to_post_install_script>。重新加载后,我的后安装脚本没有被执行。由于这些是ESXi,因此它们具有执行安装后脚本的不同方式。如何在重新加载后执行安装后的操作?我将附加我想要在启动后运行的脚本。

&#13;
&#13;
#!/bin/sh

esxcli vsan storage automode set --enabled=false >> ${logfile} 2>&1
esxcli vsan cluster leave >> ${logfile} 2>&1
esxcli vsan storage list|grep "Is SSD: true" -C5| grep "Display Name" |awk '{print $3}' | 
while IFS= read -r line
do
    echo "removing: [$line]" >> ${logfile} 2>&1 
    esxcli vsan storage remove -s $line >> ${logfile} 2>&1
    sleep 10
done

echo "VSAN cleanup script has finished" >> ${logfile} 2>&1
&#13;
&#13;
&#13;

1 个答案:

答案 0 :(得分:0)

我担心重新加载后你的脚本不会执行,Vsphere有一个不同的系统,后脚本功能不支持。

此处列出了支持的系统https://knowledgelayer.softlayer.com/topic/provisioning-scripts

相关问题