迁移ESXi过程中由于断电的原因丢失了部分配置文件,以下为恢复过程的笔记。

丢失vmx文件

使用dsfok工具从vmsn(快照)文件中导出vmx文件
Extract the embedded vmx-file from a vmsn-snapshot file

dsfo "C:\test-area\test-snapshot.vmsn" 100 10000 "C:\test-area\test.vmx"
OK, 10000 bytes, 0.000s, MD5 = 4da8884abfdf56021bd47393b00ad785

http://faq.sanbarrow.com/index.php?action=artikel&cat=47&id=111
注:vmx文件第一行开头是.encoding,导出的有时需手动修改下

生成的vmx文件, 右键菜单“添加到清单”为灰色

  • 检查虚拟机文件是否有锁定 参考文章
    1.png
    VMware的知识库里面告诉我们,在一台虚拟主机启动之后,这些类型的文件(如下所示)都会被所在ESXi主机通过vmfs这个集群式文件系统给锁定。

    VMNAME.vswp
    DISKNAME-flat.vmdk
    DISKNAME-ITERATION-delta.vmdk
    VMNAME.vmx
    VMNAME.vmxf
    vmware.log

使用RVTools找出锁定的MAC所在虚拟机  本地下载3.6版2.png

  • 同一虚拟机的vmsn文件对应同一个vmsd文件,检查是否有误

    .encoding = "UTF-8"
    snapshot.lastUID = "3" --快照最大UID
    snapshot.current = "3"--虚拟机目前位于哪个快照
    snapshot0.uid = "1" --快照0的UID
    snapshot0.filename = "VM-Snapshot1.vmsn" --快照文件名
    snapshot0.displayName = "1" --快照显示名
    snapshot0.createTimeHigh = "320241"
    snapshot0.createTimeLow = "-1109657233"
    snapshot0.numDisks = "1"
    snapshot0.disk0.fileName = "VM.vmdk"--快照对应的vmdk
    snapshot0.disk0.node = "scsi0:0"
    snapshot1.uid = "2"
    snapshot1.filename = "VM-Snapshot4.vmsn"
    snapshot1.parent = "1"--父快照ID
    snapshot1.displayName = "2"
    snapshot1.createTimeHigh = "329678"
    snapshot1.createTimeLow = "173539597"
    snapshot1.numDisks = "1"
    snapshot1.disk0.fileName = "VM-000001.vmdk"
    snapshot1.disk0.node = "scsi0:0"
    snapshot2.uid = "3"
    snapshot2.filename = "Kerio_Wire-Snapshot5.vmsn"
    snapshot2.displayName = "3" 
    snapshot2.createTimeHigh = "329679"
    snapshot2.createTimeLow = "173539598"
    snapshot2.numDisks = "1"
    snapshot2.disk0.fileName = "VM-000002.vmdk" 
    snapshot2.disk0.node = "scsi0:0"
    snapshot.numSnapshots = "3" --总共几个快照

虚拟机文件说明:https://kb.vmware.com/selfservice/microsites/search.do?cmd=displayKC&externalId=2030447