VMware virtual disk needs repair 的修复方法

本文分享了一种解决VMware虚拟机中Ubuntu系统虚拟磁盘损坏问题的方法。通过下载并使用VMware官方development kit中的vmware-vdiskmanager工具,执行修复命令成功恢复了无法启动的虚拟机。

事情是这样的, 我的代码工作都在vmware 虚拟的 ubuntu上做的, 有一次,虚拟机在软件更新, 主机crash开机后虚拟机开机提示virtual disk needs repair不能进入虚拟机,在网上找了很多办法都不能解决。 在我后来不懈努力下,在官方网站搜索这个问题,在回答中看到一些解决办法,有些不可行,有些没条件尝试(太繁琐)。后来看到中间有一句好像是说可以是用 官方提供的 development kit 里面工具进行修复,就下载尝试了一下。果然可行。下面是我的具体解决步骤:

1,到以下网址下载并安装 development kit , http://www.vmware.com/support/developer/vddk/

2, 使用cmd进入安装目录下的bin目录, 下面有一个vmware-vdiskmanager.exe文件。

3,执行命令 vmware-vdiskmanager.exe -R yourMachine.vmdk。

然后重新启动虚拟机问题就解决了。 

声明, 这只是我解决我个人问题的方法,并不代表其他人的情况都适合,我写出来只是给自己做一个备份。还有方便其他人解决问题。如果遇到不能解决的,欢迎跟帖交流。

转载于:https://www.cnblogs.com/gy-zhou/archive/2011/03/01/1967904.html

D:\Program Files (x86)\VMware\VMware Workstation>vmware-vdiskmanager.exe -k D:\UserData\Documents\Virtual Machines\xxc_ubt16\xxc_ubt16-000003.vmdk Diskname or some other argument is missing. VMware Virtual Disk Manager - build 24583834. Usage: vmware-vdiskmanager.exe OPTIONS <disk-name> | <mount-point> Offline disk manipulation utility Operations, only one may be specified at a time: -c : create disk. Additional creation options must be specified. Only local virtual disks can be created. -d : defragment the specified virtual disk. Only local virtual disks may be defragmented. -k : shrink the specified virtual disk. Only local virtual disks may be shrunk. -n <source-disk> : rename the specified virtual disk; need to specify destination disk-name. Only local virtual disks may be renamed. -p : prepare the mounted virtual disk specified by the mount point for shrinking. -r <source-disk> : convert the specified disk; need to specify destination disk-type. For local destination disks the disk type must be specified. -x <new-capacity> : expand the disk to the specified capacity. Only local virtual disks may be expanded. -R : check a sparse virtual disk for consistency and attempt to repair any errors. -e : check for disk chain consistency. -D : make disk deletable. This should only be used on disks that have been copied from another product. -U : delete/unlink a single disk link. Other Options: -q : do not log messages Additional options for create and convert: -a <adapter> : (for use with -c only) adapter type (ide, buslogic, lsilogic). Pass lsilogic for other adapter types. -s <size> : capacity of the virtual disk -t <disk-type> : disk type id -z <level> : compression level for -t 5. Valid range: [0,9] Default: 1 Disk types: 0 : single growable virtual disk 1 : growable virtual disk split into multiple files 2 : preallocated virtual disk 3 : preallocated virtual disk split into multiple files 4 : preallocated ESX-type virtual disk 5 : compressed disk optimized for streaming 6 : thin provisioned virtual disk - ESX 3.x and above The capacity can be specified in sectors, KB, MB or GB. The acceptable ranges: ide/scsi adapter : [1MB, 8192.0GB] buslogic adapter : [1MB, 2040.0GB] ex 1: vmware-vdiskmanager.exe -c -s 850MB -a ide -t 0 myIdeDisk.vmdk ex 2: vmware-vdiskmanager.exe -d myDisk.vmdk ex 3: vmware-vdiskmanager.exe -r sourceDisk.vmdk -t 0 destinationDisk.vmdk ex 4: vmware-vdiskmanager.exe -x 36GB myDisk.vmdk ex 5: vmware-vdiskmanager.exe -n sourceName.vmdk destinationName.vmdk ex 6: vmware-vdiskmanager.exe -k myDisk.vmdk ex 7: vmware-vdiskmanager.exe -p <mount-point> (A virtual disk first needs to be mounted at <mount-point>)这是什么意思
12-11
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符  | 博主筛选后可见
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值