FrontPage 差分 一覧 ソース 検索 ヘルプ ログイン

vSphere(ESXi)のvmdkをバックアップする

vSphere(ESXi)のvmdkをバックアップする

[カテゴリ:vSphere][カテゴリ:VMware]

とりあえずメモ代わりに。

Service for UNIXとか入れてNFS領域を用意しておく。詳細略。


.nvram, .vmsd, .vmx, .vmxf についてはコピーすればよろしい。vmdkについてはまずESXi側でGuestのsnapshotを作成しロック解除。そのあとこんな感じで。

 # vmkfstools -i /vmfs/volumes/disk/guest/orig_not_flat.vmdk -d monosparse /where/to/bkup.vmdk

flatファイルじゃない方を指定。


多分戻しはこんなんでいけるはず。未テスト(ぇ

 # vmkfstools -i /where/to/bkup.vmdk -d thin /vmfs/volumes/disk/guest/orig_not_flat.vmdk

ちなみにmonosparseとは……

 `monosparse`
     A monolithic sparse disk. You can use disks in this format
     with other VMware products.

らしい。多分VMwareServerとかで使ってたthin disk format. たぶんだけど。

ESX(i)で直接扱えるのは以下の3種.

zeroedthick. いわゆる普通のディスクタイプ。作成時に領域確保は行うけど、確保した領域の物理フォーマットは行わない。

 `zeroedthick`
     Space required for the virtual disk is allocated at creation time.
     Any data remaining on the physical device is not erased during
     creation, but will be zeroed out on demand at a later time on
     first write from the virtual machine. The virtual machine does not
     read stale data from disk.

eagerzeroedthick. FTをサポートするとこうなる。作成時に領域確保をした上で全領域をzeroで埋めるらし。

 `eagerzeroedthick`
     Space required for the virtual disk is allocated at creation
     time. In contrast to zeroedthick format, the data remaining on
     the physical device is zeroed out during creation. It might take
     much longer to create disks in this format than to create other
     types of disks.

thin. みんな大好きシンプロビジョニング。作成時には領域確保すらしない。

 `thin`
     Thin-provisioned virtual disk. Unlike the ´zeroedthick´ or
     ´eagerzeroedthick´ format, space required for the virtual disk is
     not allocated during creation, but, it is allocated on demand during
     first write issued to the block. Virtual disk size is zero at
     creation time.  This format provides more efficient user of storage
     space and enables thin provisioning of virtual disks. This format is
     recommended when space utilization is the main concern, and for all
     types of applications except clustering.

ちなみにちなみに

vmdkのrenameは -E オプションで可能。詳しくはman vmkfstools