仮想マシンの状態/バックアップを自動的に取得するには?

仮想マシンの状態/バックアップを自動的に取得するには?

私の質問は、

2日ごとに4つの仮想マシン(VM)の状態/バックアップを自動的にインポートしたいと思います。

私はOracle Virtual Box(VB)を使用しています。私はただ知りたい

上記を達成する方法や施設はありますか?

ベストアンサー1

VirtualBox GUIを使用して実行できるほとんどすべての操作と同様に、コマンドラインツールを使用してこれを実行できますVBoxManage

これはインストールの一部です。最も探しているコマンドは次のとおりです。

VBoxManage snapshot 'MyVM' take "Snapshot of MyVM on $(date)"

snapshot                  <uuid|vmname>
                          take <name> [--description <desc>] [--live] |
                          delete <uuid|snapname> |
                          restore <uuid|snapname> |
                          restorecurrent |
                          edit <uuid|snapname>|--current
                               [--name <name>]
                               [--description <desc>] |
                          list [--details|--machinereadable]
                          showvminfo <uuid|snapname>

私はそれをテストし、それは魅力のように動作します。

2日ごとに実行したい場合は、これがcron最善の選択かもしれません。

次の項目

0 0 */2 * * VBoxManage snapshot 'MyVM' take "Snapshot of MyVM on $(date)". 

遺言状に挿入すると、crontab作業が完了することがあります(テストされていません)。からインポートここ

おすすめ記事