VMware Communities
gneuner
Contributor
Contributor

problem with virtual disk file

Hi all,

I'm running Workstation Pro 12.5.9 build-7535481 on Windows 7.  The client is CentOS 6.9 64-bit.  The vmdk is a single file, but with incremental allocation: it's about ~6GB in size now, with a limit of 20GB.  The symptoms scream file corruption, but I can't figure it out.

I was trying to back up the (host side) files with the VM shut down.  The backup proceeded to about 80% and then got stuck.  The host became unusable due to I/O (virtually no CPU activity: huge numbers of interrupts and DPCs according to Process Explorer).  I killed the backup and tried again with the same result.

I ran vmware-vdiskmanager -R on the file and it found no errors.

I ran vmware-vdiskmanager -e on the file and it said the chain consistency was ok.  [not sure what this means anyway].

I tried to run defrag on the vmdk with vmware-vdiskmanager -d.  It got to ~83% and hung there for hours until I finally killed it.  It left a temporary file about 4.8GB in size.

I ran chkdsk on Windows and found no errors on the host disk.

I restarted the VM, ran fdsk in CentOS and found no errors on the client disk.

The client runs fine - I can find no problems with it.  But any attempt to copy or archive the vmdk file from the host side sends the host into spasms.

I have a few other VMs that likewise are incrementally allocated.  Am I likely to see this with them eventually also?  Is it a bad idea to incrementally allocate disk space?

Anything I can do about the bad file?  Apart from abandoning it and creating a new VM?

Thanks,

George

0 Kudos
2 Replies
continuum
Immortal
Immortal

> Is it a bad idea to incrementally allocate disk space?
IMHO it is a bad idea to use one piece growing disks - for several reasons:
1. vmware-vdiskmanager -R function is unreliable  - so a single error can be enough to corrupt the complete VMDK
2. defragmenting one piece growing disks requires a lot of free space on the host filesystem

3. split growing vmdks are less error prone and if one piece of such a vmdk gets corrupted it can be replaced with an empty piece
4. preallocated vmdks are way more reliable
Also see VMDK-Handbook-Basics
Regarding your question I would suggest that you convert the existing vmdk into a split growing or a preallocated type with vmware-vdiskmanager -r.
If that also fails do the following.
Add another 20GB vmdk ( use a split growing or preallocated type )
Boot your Centos VM into a Centos LiveCD and run the following command as root:
dd if=/dev/sda of=/dev/sdb bs=1M conv=notrunc   (make sure that /dev/sda is the existing disk and /dev/sdb is the new one)
When that command is done power off the VM.
Remove the original disk and switch the new one to SCSI0:0
Then you can power on the VM again.


________________________________________________
Do you need support with a VMFS recovery problem ? - send a message via skype "sanbarrow"
I do not support Workstation 16 at this time ...

0 Kudos
gneuner
Contributor
Contributor

Boot your Centos VM into a Centos LiveCD and run the following command as root:

dd if=/dev/sda of=/dev/sdb bs=1M conv=notrunc   (make sure that /dev/sda is the existing disk and /dev/sdb is the new one)

When that command is done power off the VM.

Remove the original disk and switch the new one to SCSI0:0

Doesn't work.  Trundles along for several minutes and then host becomes unusable.  Can't even stop the VM.

I guess I have to reconstruct the machine.  I just hope I can delete the damaged vmdk file once I'm done with it.

Thanks,

George

0 Kudos