Link to home
Start Free TrialLog in
Avatar of sharingsunshine
sharingsunshineFlag for United States of America

asked on

Need To Expand VMware Disk Size

I am unable to expand the disk using the settings menu in VMWorkstation 12.  I tried this link - http://www.wikihow.com/Increase-Disk-Space-in-VMware option 2 but I keep getting this message.

C:\Program Files (x86)\VMware\VMware Workstation>vmware-vdiskmanager -x 50Gb \Us
ers\rjw\Documents\Virtual Machines\CentOS67-64-disk1.vmdk
Diskname or some other argument is missing.
VMware Virtual Disk Manager - build 4638234.

Open in new window

Avatar of John
John
Flag of Canada image

Try using VMware Converter (Free, Standalone) to rebuild your Centos machine with a bigger drive. I have done this successfully with virtual machines.
Avatar of Andrew Hancock (VMware vExpert PRO / EE Fellow/British Beekeeper)
this command, is typo sensitive...

vmware-vdiskmanager

make sure you use quotation marks.

C:\Program Files (x86)\VMware\VMware Workstation>vmware-vdiskmanager -x 50Gb "c:\Users\rjw\Documents\Virtual Machines\CentOS67-64-disk1.vmdk"

and use full path
Avatar of sharingsunshine

ASKER

tried to d/l VMware converter but getting hung up on end user license agreement.  Keeps flagging a dropdown that I have selected.

when I put in the command like you had it there were many messages flashed up as errors and took me to the guest OS.  One said the file isn't a .vmx file.  That's the only one I can remember.  Now I can't log into the guest.  No password blank is showing anymore.
SOLUTION
Avatar of John
John
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Having written many EE Articles about VMware Converter, it may be quicker for you, just to rebuild your VM on the correct sized disk....!!!

What is the VM OS ? Centos ?

Rather than learning a new trick!

Have a read of my EE Articles

HOW TO:  P2V, V2V for FREE - VMware vCenter Converter Standalone 6.1

HOW TO: FAQ VMware P2V Troubleshooting
I have the vmware converter installed but when I look at the directions they don't seem to be relevant.  Perhaps, it is because there are some version differences.  Anyway, I need some help walking through this change over.

The converter is version 6.1.1

Trying what seems to indicate would be correct without seeing actual directions that correspond to the problem I run into a message saying there needs to be no password required when you do sudo.  However, that requires ssh and the memory issue won't even permit me to login to the guest linux OS.  So please tell me where to go from here.
There are no version differences, all versions are the same.

Select VMware Workstation, browse to the VM Folder, and Select the VMX file.
If it is installed, then as Andy says, browse and select the file, then name the same in the output section with a different size for the output file in the same folder. Make a backup of the input first and then convert.
I got the converter to work and it created a new vm but it seems something is wrong with the disk because when it starts up the progress bar just stays stuck and never brings up the screen.
User generated image
Here is the warning that is still showing up when powered on.
User generated image
Here are the settings and it appears to have created a larger disk since before it was 25 GB.
User generated image
I prefer not to start over since it takes 3-4 hours to rebuild a lamp system.

Thanks,
I would go back to your original and try again.

The conversion may have damaged the VM.
I tried that and I get this message when I start it up for the first time.

User generated image
Additionally, it says the tools aren't  up to date and to log in.  The problem Is I can't log in or get past the task bar.
So what do I need to do differently?
Converter, may not be compatible with the VM OS.

Back to expanding using the command line tool.
are you talking about using this tool?

\Program Files (x86)\VMware\VMware Workstation>vmware-vdiskmanager -x 50Gb "c:\Users\rjw\Documents\Virtual Machines\CentOS67-64-disk1.vmdk"

it is giving this error:
User generated image
correct.

You need to get the command line usage correct.

"C:\Program Files (x86)\VMware\VMware Workstation\vmware-vdiskmanager.exe"

Open in new window


the last time I used it, there is a specific trick....

1. Change directory/folder to the location of the VMDK, so change directory to

CD C:\Users\rjw\Documents\Virtual Machines\

Open in new window


(check your Centos VM is in fact in this folder/directory, and not a subfolder of it! like in my example!)

and then execute

"C:\Program Files (x86)\VMware\VMware Workstation\vmware-vdiskmanager.exe" -x 50G CentOS67-64-disk1.vmdk

Open in new window


My Working Example

C:\Users\Andrew Hancock\Documents\Virtual Machines>cd CentOS67-64

C:\Users\Andrew Hancock\Documents\Virtual Machines\CentOS67-64>dir
 Volume in drive C is SystemOS
 Volume Serial Number is 161E-1038

 Directory of C:\Users\Andrew Hancock\Documents\Virtual Machines\CentOS67-64

01/03/2017  19:53    <DIR>          .
01/03/2017  19:53    <DIR>          ..
01/03/2017  19:53         2,686,976 CentOS67-64.vmdk
01/03/2017  19:53                 0 CentOS67-64.vmsd
01/03/2017  19:53             1,520 CentOS67-64.vmx
01/03/2017  19:53    <DIR>          CentOS67-64.vmx.lck
01/03/2017  19:53               266 CentOS67-64.vmxf
               4 File(s)      2,688,762 bytes
               3 Dir(s)  103,744,765,952 bytes free

C:\Users\Andrew Hancock\Documents\Virtual Machines\CentOS67-64>"C:\Program Files (x86)\VMware\VMware Workstation\vmware-vdiskmanager.exe" -x 50G CentOS67-64.vmdk
  Grow: 100% done.
Disk expansion completed successfully.

WARNING: If the virtual disk is partitioned, you must use a third-party
         utility in the virtual machine to expand the size of the
         partitions. For more information, see:
         http://www.vmware.com/support/kb/enduser/std_adp.php?p_faqid=1647

C:\Users\Andrew Hancock\Documents\Virtual Machines\CentOS67-64>

Open in new window

looks like we are getting closer

User generated image
are you cutting and pasting my command


"C:\Program Files (x86)\VMware\VMware Workstation\vmware-vdiskmanager.exe" -x 50G CentOS67-64-disk1.vmdk

Open in new window


make sure VM is off, and VMware Workstation is closed down.

Is this a fixed size virtual disk ?
Good comment. The same needs to be true for VMware Converter (if the VM is compatible).
yes, except I discovered I need to add a subfolder

here you can see
User generated image
I did state you need to add a subfolder, depending where you've stored your VM.

can you check disk settings ?

I can see a lck file ? is the VM off ?
I turned everything off and got same error.  Yes the max is 50 GB allowed by Workstation Pro 12
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
it is now

User generated image
here are the settings

User generated image
That is the maximum size you assigned for disk. I have machines where I assigned 100 GB as the machine size. That is a user assigned limit for the machine. VMware Workstation can manage much bigger machines.
Okay, the issue is probably because you will need to EXPAND the current disk to 50GB.

You did not create a FIXED SIZE disk, So Click EXPAND, and EXPAND it up to 50GB.

e.g. your disk will grow to 50GB as you use it......

So it makes no sense to use the command line to Expand it, it is already set to 50GB.

This is what we call a Thin Disk, it grows up to the maximum limit, as defined by you e.g. 50GB, as you use it in the OS.

SO what are you attempting to do.....ran out of space in the VM ?
yes, I need more disk size.  The expand button is grayed out.

User generated image
That is because it needs to be made bigger either by the commands you and Andy are working on or by standalone Converter. I don't think you can just make a fixed disk bigger - Andy, please correct me if my statement is out of date.
OK, I went ahead and expanded it even before your comment John.  So now I am getting this message

User generated image
See if that made another disk file for you. I think you can do that.
how do you repartition the disk and expand the file capacities?
I have not done that - just made my disks bigger. That is a question for Andy.
So now that you have made your virtual disk bigger, you've now got to turn your attention to expanding the partition in the OS.

(which was not required, because you are not using ALL the current space in the current disk by the OS!)

(I did state, it's quicker to rebuild your OS!).

and to do that you need to use a Partition Tool, GPartedUtil is one tool, and you will have to select partitions in the OS, and expand them from 25GB to 50GB/60GB  etc

is your current disk full in Linux ?
no, it's not full by any means.  I know you mentioned to rebuild the OS but I can only find images that won;'t let you change anything with yum or add s/w to them.  If you know of a LAMP option I'm ready to take that option.  Otherwise, I will need a link for GPartedUtil.  I have looked online and most are referring to ESX.
http://gparted.org/livecd.php

it's available in Linux as standard, but here's a bootable cdrom.

try typeing gpart, gparted
getting this error:

User generated image
This has be done in the Guest OS. e.g. Centos VM, if you have the desktop version you may even have this as an application in tools/system/utilities.

and this may give you the ability to expand the OS partitions, remember there are many partitions used on Linux, and depending on how you installed, may or may not be expandable.
Ok, then I guess my VM is toast.  Because I can't get it up enough to login and then I can't ssh into the server to set the mnt to pass the iso to the VM.

I haven't built a LAMP stack on a VM in a long time.  So can you recommend a way that is quickest to do it?  I would like to have yum on the system if at all possible.
If your VM is toast, best way forward is to create a new one. Download the newest version of Centos, build a new machine, make sure you have allocated enough space (100 GB min), update it and install software.

That is what I do when a machine expires.
Not sure why the VM is toast, maybe you can rollback to your backup, or as I stated, easier and quick to build a new one.

As for LAMP, that's just Apache, MySQL and PHP, very quick to pull down from the Repo, build time 15 mins.
I know all of that, John.  I am looking for an image or something that will make it less time to build the stack.
what is a link to the repo
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thanks for the link but I need it to be CentOS since that is what I have now.  I can go to CentOS 7 if need be but don't want to have the test site be different than the actual site.
It is Centos!

see Apache 2 Test Page powered by CenTos!
i didn't want to have docker simply because I am not skilled in it.  So I went with this one http://twiki.org/cgi-bin/view/Blog/BlogEntry201310x2

I appreciate you and John's help so I am going to close this out.
Thanks for the update and I was pleased to assist you.
Andrew, can you show me how to get the docker solution going.  I am going slower than I need to the other way.  I have a new question posted.

https://www.experts-exchange.com/questions/29006316/HOw-To-Install-Docker-on-VMware-Workstation.html