管理者は、コストを節約するために夜間に仮想マシンをシャットダウンする cron ジョブを作成しています。このタスクを達成するための最良の方法は次のうちどれですか?
正解:C
Option C is the correct script for shutting down virtual machines that are currently running. It iterates through a list of VMs, checks if the status of each VM is 'running', and if so, proceeds to shut down the VM. The script then prints a message stating that the VM has been stopped. This approach ensures that only VMs that are actively running are targeted for shutdown, optimizing resource utilization and cost savings.