目錄表

CentOS 6 KVM Snapshot

確認 VM Image 格式

建立 snapshot

查詢目前 snapshot

復原到特定版本 snapshot

  • revirt 後 VM 會自動啟動在當時 snapshot-create 的狀態
  • 原本在 1349071788 (2012-10-01 14:09:48) 時所執行的程式還會繼續運作
  • VM 內的系統時間還是在 1349071788 (2012-10-01 14:09:48) 所以要考慮時間矯正議題

刪除不需要的 snapshot

  • snapshot 主要在 image file 內增加 tag, 因此可以透過 qemu-img info 指令來瞭解
    qemu-img info /var/lib/libvirt/images/e-plast-mail.qcow2
    [root@asus-ts100e7 images]# qemu-img info /var/lib/libvirt/images/e-plast-mail.qcow2
    image: /var/lib/libvirt/images/e-plast-mail.qcow2
    file format: qcow2
    virtual size: 9.8G (10485760000 bytes)
    disk size: 7.0G
    cluster_size: 65536
    Snapshot list:
    ID        TAG                 VM SIZE                DATE       VM CLOCK
    1         1349058343             977M 2012-10-01 10:25:43 1290:29:38.005
    3         1349071788             965M 2012-10-01 14:09:48 1291:18:26.283

參考網址