1 2 Previous Next 23 Replies Latest reply on Dec 3, 2008 8:23 AM by garysoucy1 Go to original post
      • 15. Re: vmkfstools -X fails to expand VMDK file
        cookrob Lurker

        I was having the same issue, running vmkfstools -M and then vmkfstools -X worked like a champ. Thanks for taking the time to post.

        • 16. Re: vmkfstools -X fails to expand VMDK file
          VMwareUserR Novice

          I used vmkfstools -X to expand VMDK file for a VM that was runing in Redhat. After the command, I saw the size of vmdk indeed was expanded in VI. But after reboot the redhat, the expanded size was not recognized by Redhat, how do I make Redhat know that the disk size is enlarged?

           

          Thanks.

          • 17. Re: vmkfstools -X fails to expand VMDK file
            Jae Ellers Master

            Right.  You've extended the size of the disk, but the original data is still there intact.  Download the latest gparted iso and boot from that.  Edit the partition sizes to use the new space you've added.

            • 18. Re: vmkfstools -X fails to expand VMDK file
              Jeff_Shaw Enthusiast

              Hi, you can find a detailed answer to your question here: http://www.vmweekly.com/articles/expanding_the_virtual_disk_size_in_4_steps/1/

               

              The article gives an easy way to expand vmdk and even provides screenshots to make it clear)

               

              Jeff

              • 19. Re: vmkfstools -X fails to expand VMDK file
                Oczkov Enthusiast

                Dear All,

                 

                I think the option which has to be given after -X is kind of confusing (10g, 50g) - it is not an extent size by which you want to expand your disk but this

                seems to be the final TOTAL size of the virtual disk as the outcome of the resize operation.

                 

                A good way to diagnose the problem is to use "-v 9" flag which is increasing the vmkfstools verbosity:

                 

                If your disk is e.g. 112GB e.g. and you try -X 50G then you will receive the most common error (without verbosity switched ON you will see only the last line):

                 

                \# vmkfstools -X 50g -v 9 CentOS\ SMTP_1.vmdk

                DISKLIB-VMFS : "./CentOS SMTP_1-flat.vmdk" : open successful (0) size = 140660178944, hd = 1060. Type 3

                DISKLIB-DSCPTR: Opened : "CentOS SMTP_1-flat.vmdk" (0)

                DISKLIB-LINK  : Opened 'CentOS SMTP_1.vmdk' (0): vmfs, 230686720 sectors / 112640 Mb.

                DISKLIB-LIB   : Opened "CentOS SMTP_1.vmdk" (flags 0). 0x8d740d8

                DISKLIB-LIB   : Growing disk 'CentOS SMTP_1.vmdk' : createType = vmfs

                DISKLIB-LIB   : Growing disk 'CentOS SMTP_1.vmdk' : capacity = 230686720 sectors - 110.0 Gb

                DISKLIB-LIB   : Growing disk 'CentOS SMTP_1.vmdk' : new capacity = 104857600 sectors - 50.0 Gb

                DISKLIB-LIB   : capacity needs to be bigger than : 230686720 (104857600)

                .DISKLIB-VMFS : "./CentOS SMTP_1-flat.vmdk" : closed.

                DISKLIB-LIB   : Failed to grow disk 'CentOS SMTP_1.vmdk' : One of the parameters supplied is invalid. (1)

                Failed to extend disk : One of the parameters supplied is invalid. (1)

                 

                The root cause of the problem is that capacity of the new disk size needs to be bigger than it is now. So you cannot decrease the size of the disk.

                 

                And when you try to expand your 78GB disk to 79GB is work OK.

                 

                 

                \# vmkfstools -X 79g -v 9 CentOS\ SMTP_1.vmdk

                 

                DISKLIB-VMFS : "./CentOS SMTP_1-flat.vmdk" : open successful (0) size = 83751862272, hd = 13341. Type 3

                DISKLIB-DSCPTR: Opened : "CentOS SMTP_1-flat.vmdk" (0)

                DISKLIB-LINK  : Opened 'CentOS SMTP_1.vmdk' (0): vmfs, 163577856 sectors / 79872 Mb.

                DISKLIB-LIB   : Opened "CentOS SMTP_1.vmdk" (flags 0). 0x92760d8

                DISKLIB-LIB   : Growing disk 'CentOS SMTP_1.vmdk' : createType = vmfs

                DISKLIB-LIB   : Growing disk 'CentOS SMTP_1.vmdk' : capacity = 163577856 sectors - 78.0 Gb

                DISKLIB-LIB   : Growing disk 'CentOS SMTP_1.vmdk' : new capacity = 165675008 sectors - 79.0 Gb

                DISKLIB-VMFS :ExtentCreate "CentOS SMTP_1-flat.vmdk" : success

                DISKLIB-LINK  : "CentOS SMTP_1.vmdk.dfgshkgrw-tmp" : creation successful.

                DISKLIB-VMFS : "./CentOS SMTP_1-flat.vmdk" : closed.

                DISKLIB-VMFS : "./CentOS SMTP_1-flat.vmdk" : open successful (0) size = 84825604096, hd = 2078. Type 3

                DISKLIB-DSCPTR: Opened : "CentOS SMTP_1-flat.vmdk" (0)

                DISKLIB-LINK  : Opened 'CentOS SMTP_1.vmdk' (0): twoGbMaxExtentSparse, 165675008 sectors / 80896 Mb.

                DISKLIB-LIB   : Opened "CentOS SMTP_1.vmdk" (flags 0). 0x9276338

                DISKLIB-DDB   : "geometry.cylinders" = "10312" (was "10182")

                DISKLIB-VMFS : "./CentOS SMTP_1-flat.vmdk" : closed.

                AIOMGR-S : stat o=3 r=0 w=0 i=5 br=0 bw=0

                 

                I hope this will help.

                 

                Best regards,

                • 20. Re: vmkfstools -X fails to expand VMDK file
                  nfailla Novice

                  I have followed the same instructions with no luck.  It is not a migrated disk, used the full path, executed from the directory where the vmdk lives.  The disk I want to expand is a d: drive on the current vm.  So it is vmname_1.vmdk because it is the second  disk on this vm.

                  I get the error "Failed to extend disk : One of the parameters supplied is invalid. (1)

                  • 21. Re: vmkfstools -X fails to expand VMDK file
                    Jeff_Shaw Enthusiast

                    Hi,

                     

                    Try to use the way described here:

                     

                    http://www.vmweekly.com/articles/expanding_the_virtual_disk_size_in_4_steps/1/

                     

                    The method is very fast and simple. I think it should help.

                     

                    Jeff

                    • 22. Re: vmkfstools -X fails to expand VMDK file
                      Capt.Byte Lurker

                      The Command is Ubuntu Linux. You should use CFDISK instead of Diskpart (MSwindows).

                      The following is working with our ESX 3 Production VM server:

                       

                      12. How to increase Virtual Disk Capacity

                      Step 1:

                      \[root@vm2 cx100gb (1)]# ls -lah VM-Ubuntu1-Byte

                      \[root@vm2 VM-Ubuntu1-Byte]# vmkfstools -X 40G VM-Ubuntu1-Byte-flat.vmdk

                      Failed to extend disk : The file specified is not a virtual disk. (15)

                      \[root@vm2 VM-Ubuntu1-Byte]# pwd

                      /vmfs/volumes/cx100gb (1)/VM-Ubuntu1-Byte

                      \[root@vm2 VM-Ubuntu1-Byte]# vmkfstools -X 40G /vmfs/volumes/cx100gb\ \(1\)/VM-Ubuntu1-Byte/VM-Ubuntu1-Byte-flat.vmdk

                      Failed to extend disk : The file specified is not a virtual disk. (15)

                      \[root@vm2 VM-Ubuntu1-Byte]# vmkfstools -X 40G /vmfs/volumes/cx100gb\ \(1\)/VM-Ubuntu1-Byte/VM-Ubuntu1-Byte.vmdk

                      Check new size

                      root@vm2 cx100gb (1)]# ls -lah VM-Ubuntu1-Byte

                      Step 2:

                      Sudo su

                      Cfdisk

                      Create/check new partition >type>write

                      Step 3:

                      System>Administration>disks

                      Storage List> Partition List

                      Format >extended 3 > Access Path> enable>ok

                      • 23. Re: vmkfstools -X fails to expand VMDK file
                        garysoucy1 Lurker

                        The other thing I just discovered, is that the -X switch is NOT how much you are extending the VMDK file, but what you want the final size to be. Took me a while to wrap my head around that one.

                        1 2 Previous Next