Expanding Vsphere Replicated Disk

I have a VM with a disk that I need to expand. This VM is replicated via vsphere replication.

I disabled replication for the disk in question at the production site.
Expanded the disk in vmware and windows.
SSH'd to the DR site and navigated to the folder that contains the replicated VM.

I then ran the command vmkfstools -X 25G diablo_11-flat.vmdk

I received an error message: Failed to extend disk :  the file specified is not a virtual disk (15)

I'm thinking maybe I chose the wrong file?

This is a LS of the volume directory for that VM
/vmfs/volumes/503d564e-45450988-c9b5-ac162d79e741/Diablo # ls -l
total 241657872
-rw-------    1 root     root     64424509440 Jul 27 18:51 Diablo-flat.vmdk
-rw-------    1 root     root           588 Jul 27 18:51 Diablo.vmdk
-rw-------    1 root     root     16106127360 Jun 23 13:33 Diablo_11-flat.vmdk
-rw-------    1 root     root           587 Jun 23 16:47 Diablo_11.vmdk
-rw-------    1 root     root     64424509440 Jul 27 18:50 Diablo_12-flat.vmdk
-rw-------    1 root     root           591 Jul 27 18:50 Diablo_12.vmdk
-rw-------    1 root     root     16106127360 Jul 27 18:50 Diablo_21-flat.vmdk
-rw-------    1 root     root           587 Jul 27 18:50 Diablo_21.vmdk
-rw-------    1 root     root     64424509440 Jul 27 18:54 Diablo_8-flat.vmdk
-rw-------    1 root     root           587 Jul 27 18:51 Diablo_8.vmdk
-rw-------    1 root     root          8684 Jun 23 13:32 hbrcfg.GID-667b2083-269f-402c-88f2-30609c51e00d.7544.nvram.22629
-rw-------    1 root     root          6224 Jun 23 13:32 hbrcfg.GID-667b2083-269f-402c-88f2-30609c51e00d.7544.vmx.22627
-rw-------    1 root     root           261 Jun 23 13:32 hbrcfg.GID-667b2083-269f-402c-88f2-30609c51e00d.7544.vmxf.22628
-rw-------    1 root     root          8684 Jul 27 16:02 hbrcfg.GID-667b2083-269f-402c-88f2-30609c51e00d.8836.nvram.26502
-rw-------    1 root     root          6189 Jul 27 16:02 hbrcfg.GID-667b2083-269f-402c-88f2-30609c51e00d.8836.vmx.26500
-rw-------    1 root     root           261 Jul 27 16:02 hbrcfg.GID-667b2083-269f-402c-88f2-30609c51e00d.8836.vmxf.26501
-rw-------    1 root     root        126976 Jul 27 16:02 hbrdisk.RDID-1c29e6b2-a6ae-4fb2-9a32-1ed22b378503.24214.86199836528437-delta.vmdk
-rw-------    1 root     root           376 Jul 27 18:50 hbrdisk.RDID-1c29e6b2-a6ae-4fb2-9a32-1ed22b378503.24214.86199836528437.vmdk
-rw-------    1 root     root         32768 Jul 27 16:02 hbrdisk.RDID-1e270529-db88-48ed-88f9-78510dcf552b.24215.36769388958666-delta.vmdk
-rw-------    1 root     root           375 Jul 27 18:50 hbrdisk.RDID-1e270529-db88-48ed-88f9-78510dcf552b.24215.36769388958666.vmdk
-rw-------    1 root     root     9445605376 Jul 27 16:04 hbrdisk.RDID-35e24449-9099-4bf6-9522-58154c8bc563.20722.122185878678401-delta.vmdk
-rw-------    1 root     root           376 Jul 27 16:04 hbrdisk.RDID-35e24449-9099-4bf6-9522-58154c8bc563.20722.122185878678401.vmdk
-rw-------    1 root     root         32768 Jul 27 16:03 hbrdisk.RDID-35e24449-9099-4bf6-9522-58154c8bc563.24218.143179486828614-delta.vmdk
-rw-------    1 root     root           438 Jul 27 16:04 hbrdisk.RDID-35e24449-9099-4bf6-9522-58154c8bc563.24218.143179486828614.vmdk
-rw-------    1 root     root     12515930112 Jul 27 16:04 hbrdisk.RDID-76359cc2-ef94-4d2e-adf6-828fe5d4a5b5.20721.32971337393641-delta.vmdk
-rw-------    1 root     root           375 Jul 27 16:04 hbrdisk.RDID-76359cc2-ef94-4d2e-adf6-828fe5d4a5b5.20721.32971337393641.vmdk
-rw-------    1 root     root        126976 Jul 27 16:03 hbrdisk.RDID-76359cc2-ef94-4d2e-adf6-828fe5d4a5b5.24217.9321336014237-delta.vmdk
-rw-------    1 root     root           436 Jul 27 16:04 hbrdisk.RDID-76359cc2-ef94-4d2e-adf6-828fe5d4a5b5.24217.9321336014237.vmdk
-rw-------    1 root     root        126976 Jul 27 16:03 hbrdisk.RDID-bec2e8ef-cc0f-4d85-916b-cbbf1f129a39.24216.5990402247669-delta.vmdk
-rw-------    1 root     root           372 Jul 27 18:51 hbrdisk.RDID-bec2e8ef-cc0f-4d85-916b-cbbf1f129a39.24216.5990402247669.vmdk
-rw-------    1 root     root         12882 Jul 27 16:04 hbrgrp.GID-667b2083-269f-402c-88f2-30609c51e00d.txt

Open in new window

Specifically I want to expand the Diablo_11 VMDK and I chose the -flat version but maybe I should of chose the diablo_11.vmdk file instead?

I went with the -flat because it was the larger file and I assumed that was my actual disk, but perhaps my logic was flawed and before I continue wanted to see if anyone here can clarify.
Who is Participating?
Andrew Hancock (VMware vExpert / EE MVE^2)Connect With a Mentor VMware and Virtualization ConsultantCommented:
just specify the disk name, which is Diablo_11.vmdk and make sure it's case correct.


 vmkfstools -X 25g Diablo_11.vmdk

Open in new window

and remember the VM must be off, and the command is extend by Xg.

For example, to extend a 25g virtual disk by 1g, enter: vmkfstools -X 26g disk name.

This can be done from the GUI, and once done, you will need to expand the OS partition within the VM. This command does not perform or expand any functions in the VM.

HOW TO:  Resize a VMware (VMDK) Virtual Disk
themightydudeAuthor Commented:
Thanks Andrew.

I just wasn't sure about the -flat vs the non -flat file. To me I would think I would grow the -flat since it's the larger file, but I guess in this case since it's a replicated VM the smaller diablo_11.vmdk file is the real file.
Andrew Hancock (VMware vExpert / EE MVE^2)VMware and Virtualization ConsultantCommented:
the descriptor is always the file you manipulate, because it contains the disk geometry.

the flat file is the raw data.

if you are interested you can read this article, and ALL the comments, about the descriptor file and disk geometry.

HOW TO: Shrink a VMware Virtual Machine Disk (VMDK) in 15 minutes
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.