このページの情報の一部またはすべては、S3NS の Trusted Cloud には適用されない場合があります。
起動スクリプトについて
起動スクリプトは、仮想マシン(VM)インスタンスの起動時に実行されるコマンドを含むファイルです。Compute Engine では、Linux VM と Windows VM 上で起動スクリプトを実行するためのサポートが提供されています。
次の表に、起動スクリプトの使用方法に関するドキュメントへのリンクを示します。
起動スクリプトのタスク |
最適な用途 |
手順へのリンク |
起動スクリプトを直接渡す |
256 KB までのスクリプト |
|
ローカル ファイルから起動スクリプトを渡す |
256 KB までのスクリプト |
|
Cloud Storage から起動スクリプトを渡す |
256 KB を超えるスクリプト |
|
起動スクリプトからメタデータにアクセスする |
同じスクリプトを使用する VM ごとに異なる値を渡す |
|
起動スクリプトを再実行する |
VM を再起動せずにスクリプトを実行する |
|
起動スクリプトの出力を表示する |
スクリプトの進行状況をモニタリングする |
|
次のステップ
特に記載のない限り、このページのコンテンツはクリエイティブ・コモンズの表示 4.0 ライセンスにより使用許諾されます。コードサンプルは Apache 2.0 ライセンスにより使用許諾されます。詳しくは、Google Developers サイトのポリシーをご覧ください。Java は Oracle および関連会社の登録商標です。
最終更新日 2025-07-21 UTC。
[[["わかりやすい","easyToUnderstand","thumb-up"],["問題の解決に役立った","solvedMyProblem","thumb-up"],["その他","otherUp","thumb-up"]],[["必要な情報がない","missingTheInformationINeed","thumb-down"],["複雑すぎる / 手順が多すぎる","tooComplicatedTooManySteps","thumb-down"],["最新ではない","outOfDate","thumb-down"],["翻訳に関する問題","translationIssue","thumb-down"],["サンプル / コードに問題がある","samplesCodeIssue","thumb-down"],["その他","otherDown","thumb-down"]],["最終更新日 2025-07-21 UTC。"],[[["Startup scripts are files containing commands that execute upon the boot of a virtual machine (VM) instance, supported by both Linux and Windows VMs."],["Startup scripts can be passed directly, from a local file, or from Cloud Storage, depending on the script's size, with direct and local files limited to 256 KB, and Cloud Storage for larger scripts."],["You can use startup scripts to pass different values to each VM via metadata."],["You can rerun a startup script without having to restart the VM."],["There is documentation to describe how to monitor the progress of a script when it is running, and also how to add a shutdown script."]]],[]]