VMDK 恢复工具 (ESX 3.5 Update 3)
VMDK 恢复工具 (ESX 3.5 Update 3) (2087172)
Symptoms
免责声明:本文为 VMDK Recovery Tool (ESX 3.5 Update 3) (1007243) 的翻译版本。尽管我们会不断努力为本文提供最佳翻译版本,但本地化的内容可能会过时。有关最新内容,请参见英文版本。
目的
使用 VMDK 恢复工具工具可以实现以下目的:
- 创建 VMDK 文件的阻止列表。阻止列表文件是纯文本文件,用于记录虚拟机的所有 VMDK。
- 当 VMDK 文件被删除,或 VMFS 数据存储被删除或损坏时,恢复 VMDK 文件。
限制
VMDK 恢复工具是 VMware 在 ESX 3.5 Update 3 中提供的实用工具,是具有实验性质的软件。
- 实验性意味着该工具不受所有客户环境的支持,并且可能无法按预期方式运行。
- 该工具不可用于 VMware ESXi 产品。
- 无法还原多个阻止列表文件。
- 该工具不可用于 VMware ESX 4.0 及以上版本。有关详细信息,请参见 VMware ESX 4.0 Update 1 Release Notes 中 Known Issues 下的 Storage 部分。
Resolution
要使此工具正常工作,必须保存虚拟机的当前阻止列表。无法恢复没有其阻止列表的 VMDK 文件。
要使用 VMDK 恢复工具创建阻止列表,请执行以下操作:
- 启动 VMDK 恢复工具,以 root 身份登录到服务控制台,然后运行以下命令:
# vmfs-undelete. - 选择选项 [b] 以列出注册到主机的所有虚拟机。
- 要创建阻止列表,请执行以下可选方案之一:
- 选择 [99] 以备份所有虚拟机的 vmdk 阻止列表。
或 - 从列表中选择虚拟机 ID 以备份特定的虚拟机。
- 选择 [99] 以备份所有虚拟机的 vmdk 阻止列表。
- 在创建阻止列表期间,此工具将提示您指定用于备份数据的文件名。您可以提供一个绝对路径(此工具将创建一个新文件),也可以将其保存在当前的工作目录中。
示例会话:
[root@esx11]# vmfs-undelete
########################################################
# VMFS Data Recovery and Backup #
# #
# This tool is NOT a replacement for regular backups #
# Please backup your data on a regular basis #
# There is absolutely no guarantee #
# Use at your own risk #
# #
# VMs with Raw Disks (virtual or physical) are #
# Not supported!!!! #
########################################################
# VMFS Data Recovery and Backup #
# #
# This tool is NOT a replacement for regular backups #
# Please backup your data on a regular basis #
# There is absolutely no guarantee #
# Use at your own risk #
# #
# VMs with Raw Disks (virtual or physical) are #
# Not supported!!!! #
########################################################
--------------------------------------------------
Select [b]ackup, [r]estore [q] to quit: b
------------------------------------------
0 ) /vmfs/volumes/48b033a5-b8c3c297-424d-0019bbd51b56/Win2k3DC-64/Win2k3DC-64.vmx
1 ) /vmfs/volumes/48b033a5-b8c3c297-424d-0019bbd51b56/mandel-rhel3-32/mandel-rhel3-32.vmx
2 ) /vmfs/volumes/48da37be-22e0d1a4-b076-0019bbd51b56/spanis/spanis.vmx
3 ) /vmfs/volumes/48da37be-22e0d1a4-b076-0019bbd51b56/rhel4/rhel4.vmx
4 ) /vmfs/volumes/48da37be-22e0d1a4-b076-0019bbd51b56/spanfc/spanfc.vmx
5 ) /vmfs/volumes/48932bc1-a4b8a07e-ac22-0019bbd51b58/Win2k3DC-32/Win2k3DC-32.vmx
------------------------------------------
1 ) /vmfs/volumes/48b033a5-b8c3c297-424d-0019bbd51b56/mandel-rhel3-32/mandel-rhel3-32.vmx
2 ) /vmfs/volumes/48da37be-22e0d1a4-b076-0019bbd51b56/spanis/spanis.vmx
3 ) /vmfs/volumes/48da37be-22e0d1a4-b076-0019bbd51b56/rhel4/rhel4.vmx
4 ) /vmfs/volumes/48da37be-22e0d1a4-b076-0019bbd51b56/spanfc/spanfc.vmx
5 ) /vmfs/volumes/48932bc1-a4b8a07e-ac22-0019bbd51b58/Win2k3DC-32/Win2k3DC-32.vmx
------------------------------------------
found 6 vms
Choose a VM to backup, [99] for all registered VMs or [q] to quit: 1
number of vms to backup 1
Ready to write to data to disk
Enter path and filename of where to save the recover log to:/back/test
________________________________________
working on VM: /vmfs/volumes/48b033a5-b8c3c297-424d-0019bbd51b56/mandel-rhel3-32/mandel-rhel3-32.vmx
Checking for VM Snapshots...
Creating Snapshot...
read block list for /vmfs/volumes/48b033a5-b8c3c297-424d-0019bbd51b56/restore/mandel-32.vmdk
removing snapshot....
Done......
Choose a VM to backup, [99] for all registered VMs or [q] to quit: 1
number of vms to backup 1
Ready to write to data to disk
Enter path and filename of where to save the recover log to:/back/test
________________________________________
working on VM: /vmfs/volumes/48b033a5-b8c3c297-424d-0019bbd51b56/mandel-rhel3-32/mandel-rhel3-32.vmx
Checking for VM Snapshots...
Creating Snapshot...
read block list for /vmfs/volumes/48b033a5-b8c3c297-424d-0019bbd51b56/restore/mandel-32.vmdk
removing snapshot....
Done......
########################################################
# VMFS Data Recovery and Backup #
# #
# This tool is NOT a replacement for regular backups #
# Please backup your data on a regular basis #
# There is absolutely no guarantee #
# Use at your own risk #
# #
# VMs with Raw Disks (virtual or physical) are #
# Not supported!!!! #
########################################################
# VMFS Data Recovery and Backup #
# #
# This tool is NOT a replacement for regular backups #
# Please backup your data on a regular basis #
# There is absolutely no guarantee #
# Use at your own risk #
# #
# VMs with Raw Disks (virtual or physical) are #
# Not supported!!!! #
########################################################
--------------------------------------------------
Select [b]ackup, [r]estore [q] to quit: q
在先前示例中,用户执行了以下操作:
- 以 root 身份登录到服务控制台,并输入 vmfs-undelete 命令。
[root@esx11]# vmfs-undelete - 按 b 键(表示 [b]ackup ),然后按 Return 键。
Select [b]ackup, [r]estore [q] to quit: b
从 0 到 5 列出了六个虚拟机。 - 输入 1 备份第二个虚拟机。
Choose a VM to backup, [99] for all registered VMs or [q] to quit: 1
(但可以输入 99 以选择列表中的所有虚拟机。) - 将 /back/test 指定为备份文件的位置。
Enter path and filename of where to save the recover log to:/back/test
阻止列表备份将完成,而未出现任何错误,且将创建 /back/test 文件。 - 输入 q 退出此工具。
Select [b]ackup, [r]estore [q] to quit: q
要还原 VMDK 文件,请执行以下操作:
运行此工具,并选择 [r] 以还原缺失的文件。
示例会话:
[root@esx11 /]# vmfs-undelete
########################################################
# VMFS Data Recovery and Backup #
# #
# This tool is NOT a replacement for regular backups #
# Please backup your data on a regular basis #
# There is absolutely no guarantee #
# Use at your own risk #
# #
# VMs with Raw Disks (virtual or physical) are #
# Not supported!!!! #
########################################################
# VMFS Data Recovery and Backup #
# #
# This tool is NOT a replacement for regular backups #
# Please backup your data on a regular basis #
# There is absolutely no guarantee #
# Use at your own risk #
# #
# VMs with Raw Disks (virtual or physical) are #
# Not supported!!!! #
########################################################
--------------------------------------------------
Select [b]ackup, [r]estore [q] to quit: r
enter file name to restore from: /back/test
----------------------------------------
1) /vmfs/volumes/48b033a5-b8c3c297-424d-0019bbd51b56/mandel-rhel3-32/mandel-rhel3-32.vmx
Found 1 VMs available to restore
select VM to restore [1 - 1] or 'q' to quit:1
Available VMDKs to restore:
----------------------------------------
1) /vmfs/volumes/48b033a5-b8c3c297-424d-0019bbd51b56/restore/mandel-32.vmdk
1) /vmfs/volumes/48b033a5-b8c3c297-424d-0019bbd51b56/restore/mandel-32.vmdk
select VMDK to restore [1 - 1 ]: 1
1) /vmfs/volumes/spannedISCSI ------> [VMFS UUID: 48ad7ec0-e325a051-b085-0019bbd51b56]
1) /vmfs/volumes/spannedISCSI ------> [VMFS UUID: 48ad7ec0-e325a051-b085-0019bbd51b56]
2) /vmfs/volumes/esx11:storage1 ------> [VMFS UUID: 48ad95b7-a4fbcfd2-3ae5-0019bbd51b58]
3) /vmfs/volumes/datastore4 ------> [VMFS UUID: 48da37be-22e0d1a4-b076-0019bbd51b56]
4) /vmfs/volumes/100gb ------> [VMFS UUID: 48932bc1-a4b8a07e-ac22-0019bbd51b58]
5) /vmfs/volumes/spannedFC ------> [VMFS UUID: 48ada29d-e6f0dd4b-c312-0019bbd51b58]
6) /vmfs/volumes/templib ------> [VMFS UUID: 000a8416-362eaee8-b274-00145e5a474f]
select VMFS DataStore to restore to [1 - 6] : 4
Enter the directory to restore to: restore
/vmfs/volumes/100gb/restore already exists
Are you sure you want to restore to /vmfs/volumes/100gb/restore [y/n]: y
Enter the file name to restore to: [ex: recovered.vmdk]: test.vmdk
restoring VM: /vmfs/volumes/48b033a5-b8c3c297-424d-0019bbd51b56/mandel-rhel3-32/mandel-rhel3-32.vmx
Disk: /vmfs/volumes/48b033a5-b8c3c297-424d-0019bbd51b56/restore/mandel-32.vmdk
to : /vmfs/volumes/100gb/restore/test.vmdk
Enter the directory to restore to: restore
/vmfs/volumes/100gb/restore already exists
Are you sure you want to restore to /vmfs/volumes/100gb/restore [y/n]: y
Enter the file name to restore to: [ex: recovered.vmdk]: test.vmdk
restoring VM: /vmfs/volumes/48b033a5-b8c3c297-424d-0019bbd51b56/mandel-rhel3-32/mandel-rhel3-32.vmx
Disk: /vmfs/volumes/48b033a5-b8c3c297-424d-0019bbd51b56/restore/mandel-32.vmdk
to : /vmfs/volumes/100gb/restore/test.vmdk
restoring data....
[==> 4%
在先前示例中,用户执行了以下操作:
- 输入选项 r。
Select [b]ackup, [r]estore [q] to quit: r - 指定要还原的 /back/test 文件。
enter file name to restore from: /back/test
将从备份文件中列出虚拟机。
1) /vmfs/volumes/48b033a5-b8c3c297-424d-0019bbd51b56/mandel-rhel3-32/mandel-rhel3-32.vmx
Found 1 VMs available to restore
(如果已使用 99 选项创建备份文件,则将列出所有虚拟机。) - 输入 1 以选择特定的虚拟机。
select VM to restore [1 - 1] or 'q' to quit:1
将列出所有可用的数据存储。 - 选择 4 以保存已还原的 vmdk。
select VMFS DataStore to restore to [1 - 6] : 4 - 将要还原到的目录指定为“restore”。
Enter the directory to restore to: restore - 输入 y 以确认此选择。将自动创建此目录。
Are you sure you want to restore to /vmfs/volumes/100gb/restore [y/n]: y - 将 test.vmdk 指定为 vmdk 的还原文件名。
Enter the file name to restore to: [ex: recovered.vmdk]: test.vmdk
Tags
简体中文 Mandarin
See Also
Request a Product Feature
更多文章推荐
- 华为云21天转型微服务实战营全部资源
- kubernetes离线安装KubePi
- OpenEuler/Centos安装containerd容器,cni,nerdctl,buildkit,runc
- K8s网络组件之Flannel:VXLAN模式
- 在 Kubernetess 中使用 DNS 和 Headless Service 发现运行中的 Pod
- K8s网络组件之Calico:IPIP工作模式
- K8s网络组件之Calico:Route Reflector 模式(RR)
- K8s 高性能网络组件 Calico 入门教程
- 华为云基于ServiceStage的微服务开发与部署的实验过程问题
- 如何体验华为云ServiceStage的源码部署功能?
目录 返回
首页