0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

Azure VM 自動起動方法

Posted at

はじめに

Azure VM(仮想マシン)の自動起動・停止は、コスト削減や効率化に非常に有効な方法です。本記事では、その基本的な設定方法を解説します。特に、Azure AutomationアカウントやRunbookを活用することで、簡単かつ柔軟にスケジュールを管理できます。


この記事でできること

  • Azure Automationを利用してVMを自動的に起動・停止する手法を理解できる。
  • Runbookの作成とスケジュール設定をマスターできる。

想定する読者

  • クラウド技術に興味があるエンジニア: Azure初心者でも簡単に実装可能。
  • 企業のIT管理者: コスト削減や効率化を目指す方。
  • テクニカルリーダーやシステムアーキテクト: Azure VMの自動化で運用を改善したい方。

大まかな流れ

  1. Azure Automationアカウントの作成
  2. Runbookの作成
  3. 自動化スケジュールの設定

自動起動の詳細手順

  1. Azure Automationアカウントの作成する
    スクリーンショット 2025-03-22 144607.JPG

  2. IDを選択し、Azureロールの割り当てをクリックする
    スクリーンショット 2025-03-22 183627.JPG

  3. Azureロールを割り当てる
    スクリーンショット 2025-03-22 183901.JPG

  4. Runbookを作成する
    スクリーンショット 2025-03-22 150006.JPG

  5. 「ギャラリーを参照」を選択する
    スクリーンショット 2025-03-22 150723.JPG

  6. 「Start Azure V2 VMs」を検索し、赤枠を選択する
    スクリーンショット 2025-03-22 151201.JPG

  7. 「選択」をクリックする
    スクリーンショット 2025-03-22 151740.JPG

  8. 必要事項を入力し、インポートする
    スクリーンショット 2025-03-22 153648.JPG

  9. テストウィンドウを開く
    スクリーンショット 2025-03-22 153850.JPG

  10. 「リソースグループ名」「VM名」「サブスクリプション名」を入力し、開始をクリックする
    スクリーンショット 2025-03-22 165744.JPG

  11. 下のキャプチャのような画面になることを確認する
    image.png

  12. Runbookを公開する
    スクリーンショット 2025-03-22 190215.JPG

  13. 自動化スケジュールの設定する
    スクリーンショット 2025-03-22 190337.JPG

  14. 「スケジュール」と「パラメータと実行設定」を選択し、設定する
    スクリーンショット 2025-03-22 190816.JPG

  15. 検証
    設定した時刻に、VMが起動することを確認する


自動停止の設定方法

自動停止に関しても、上記の手順で(Stop Azure V2 VMsを利用して)可能ですが、以下の手順で簡単に設定することができます

  1. 仮想マシンの画面で、対象VMを選択する
  2. 「自動シャットダウン」を選択する
  3. 自動シャットダウンしたい時刻を設定し、保存する
    スクリーンショット 2025-03-22 124523.JPG
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?