VMware Cloud Community
PinesoftSupport
Contributor
Contributor

vmdk file size differs from virtual disk size

Hi there,

I have a strange issue with one of my VMs on ESXi 5.1.  I have a VM running on local datastore1 (c drive) and I have created a new virtual disk on datastore4 which is hosted on iSCSI storage device (v drive) and set the size to 45GB. later on, I increased the size of the datastore4 to 2.3TB, then increase the size of the virtual disk to 2TB and received an error:

The available memory resources in the parent resource pool are insufficient for the operation.

task: Reconfigure virtual machine.

The strange thing is, the vmdk file is now 2TB and windows recognises this and was able to increase the partition size to 2TB, but the virtual disk in vSphere is still only showing 45GB:

vmdk.PNG

vdisk.PNG

The datastore still has over 500GB of free space and when I try and increase the virtual disk size, it gives an error that there is insufficient disk space on the datastore.

datastore.PNG

I'm not using any resource pools and resources are set to unlimited.  I've tried removing the virtual disk from the VM then adding back in using existing disk.  Also tried removing the VM from inventory, then adding back in but disk still shows 45GB.  looks to have failed on the virtual disk reconfiguration and now in a state where I can't change the disk.

Has anyone com across this issue before and is there a way to edit vmx or vmdk files to show true size of the disk?

Only thing I haven't tried is to move the VM to a different host. I don't have vMotion but would this work?

Thanks in advance!

Terry

0 Kudos
11 Replies
continuum
Immortal
Immortal

When you open the vmdk - not the name-flat.vmdk in a text  editor you will see a line starting with RW.
The number following RW displays the nominal size of the vmdk


________________________________________________
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
PinesoftSupport
Contributor
Contributor

Hi continuum,

Thanks for your reply.

How do I open the vmdk file without downloading it? I can't download as its 2TB and got no where to store the file.

Can I open in CLI?

0 Kudos
john23
Commander
Commander

In vmfs datastore you will find <name>.vmdk and <name>-flat.vmdk. The file which is <name>.vmdk is metadata file. you can open using vi and cat command in ESXi console.

You can browse datastore using vSphere and download.

-A

Thanks -A Read my blogs: www.openwriteup.com
0 Kudos
PinesoftSupport
Contributor
Contributor

Thanks,

this is the information I get:

vmdk.PNG

0 Kudos
john23
Commander
Commander

From the metadata CHS count it is coming to 45 GB only.

Can you try to extend from command line and check the vmdk metadata file..

vmkfstools -X <New Disk Size> <VMDK to extend>

For more reference extend from command line :VMware KB: Extending partitions in Windows using DiskPart  

-A

Thanks -A Read my blogs: www.openwriteup.com
0 Kudos
continuum
Immortal
Immortal

this vmdk has not been expanded - its nominal size is 45,640625 Gb


________________________________________________
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
PinesoftSupport
Contributor
Contributor

Ok thanks, will give that a try this evening and let you know the outcome.

0 Kudos
PinesoftSupport
Contributor
Contributor

the vmdk file has expanded and is showing 2TB

vmdk.PNG

And I've also been able to extend the partition size in Windows.

I'm going to try John23 suggestion and post the outcome.

Thanks!

0 Kudos
BOND007James
Contributor
Contributor

Hello All,

Recently, I read that Vmware is deprecating Windows based VI Client. I would suggest checking this information via Web CLient and you should see correct information there.

Thanks,

0 Kudos
PinesoftSupport
Contributor
Contributor

unfortunately trying to extend from command line did not work. Come up with an error:

Failed to extend disk : failed to lock the file (16392).

Also the web client show the same that its 45Gb and unable to extend.

I'm going to create a new virtual disk, move the data over and remove the old disk.

thanks for all your suggestions.

Terry

0 Kudos
john23
Commander
Commander

JFYI: If you get error message related to Lock, power off the virtual machine and then try. It should work..

-A

Thanks -A Read my blogs: www.openwriteup.com
0 Kudos