Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Expanding a vmdk size

Posted on 2011-02-22
11
Medium Priority
?
1,220 Views
Last Modified: 2012-08-13
Hi
I have a vCenter server running on Windows XP Pro VM (VM version 7) on ESXi 4.0 host. It only has one volume on which XP has been installed.
I wish to re-install a Full version version of MS-SQL 2005 which is currently running on it so i can migrate the vcenter database to a new platform. I'm unable to increase the volume either through vsphere client (Edit settings of the VM) or using vmkfstools. any suggestions?
0
Comment
Question by:adjaddy
  • 3
  • 3
  • 2
  • +3
11 Comments
 
LVL 4

Expert Comment

by:FireW0lf
ID: 34950300
When you say you are unable to expand it, does it fail? Or does it succeed but when you log into the volume it appears the same size?

If the latter, remember you then need to expand the volume from within the VM - use Windows DiskPart
0
 

Author Comment

by:adjaddy
ID: 34950315
FireW0lf
in vsphere, the box to increase the size of the vmdk file is greyed out.
when i connect via putty to the host, i am unable to add the additional  size to the OS partition volume.
0
 
LVL 4

Expert Comment

by:FireW0lf
ID: 34950316
Oh, and another thing - make sure you're running vmkfstools against the descriptor vmdk file, and NOT against the file with "flat" in the name
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 2

Accepted Solution

by:
shabrez earned 2000 total points
ID: 34950432
Step # 1: Shutdown The Guest Operating System

Shutdown and poweroff.

Delete all your snapshots from snapshot manager by visting VM > Snapshot Manger. Since you are going to resize you virtual disk, these snapshots going to create a problem for you.

Backup your entire virtual machine.

Another option is you can clone your guest in VMware, if you want to keep the existing virtual machine configuration by visiting VM > Clone option.


Step # 2: Increase Your Virtual Machine's Disk Capacity

Open shell prompt and type the following command:

# /usr/bin/vmware-vdiskmanager -x {diskSize}GB yourvm.vmdk

If you are using Windows operating host system change directory to C:\Program Files\VMware\VMware Workstation or add this to your PATH settings.

Click on Start > Run and type cmd to open Windows shell prompt:

vmware-vdiskmanager -x {diskSize}GB "c:\vm\yourvm.vmdk"

OR use full path as follows

C:\Program Files\VMware\VMware Workstation\vmware-vdiskmanager -x {diskSize}GB "c:\vm\yourvm.vmdk"

Example: Increase Size to 32GB

Linux host example:
# /usr/bin/vmware-vdiskmanager -x 32GB /share/vms/WindowsVista/vista.vmdk

Windows host example:
C:\Program Files\VMware\VMware Workstation\vmware-vdiskmanager -x 32GB "c:\vm\centos.vmdk"

Step # 3: Expand The Size Of a Virtual Disk

Now, disk size is increased but operating system will only show 16GB used and 16GB unused. To add new 16GB to C: (i.e. expand the size of a a virtual disk), use GParted. You will need to use a third-party utility such as GParted to resize the expanded partitions.
0
 
LVL 124
ID: 34950795
Are youi using an IDE disk in the Virtual Machine, because you cannot expand them, only SCSI.

If you want to expand an IDE based VM, you'll need to use VMware Convertor.

It's a free download here.

http://www.vmware.com/products/converter/
0
 

Author Comment

by:adjaddy
ID: 34950839
Hanccocka

could give me a step by step instructions to do this. the VM has IDE disk
0
 
LVL 124
ID: 34950851
okay, this is the reason you cannot expand it. IDE disks do not support Expansion.

for conversion steps follow my fellow Expert Bestway's guide

http://www.experts-exchange.com/Software/VMWare/A_3639-VMware-vConverter-P2V-for-Windows-Servers.html
0
 

Author Comment

by:adjaddy
ID: 34950875
Hanccocka

the machine is a VM; would that above process still work
0
 
LVL 124
ID: 34950886
yes, we call that a V2V, but the process is exactly the same, as a P2V.
0
 
LVL 40

Expert Comment

by:coolsport00
ID: 34951078
Doing a conversion can help with increasing the disk size, but won't take care of the underlying problem of the virtual disk being IDE (if that indeed is the issue). If you need to modify your disk size in the future, I recommend modifying your virtual disk now to SCSI. That way you can modify your virtual disk as needed in the future without having to do a conversion. Conversion is good, but takes much longer. See this KB to change your virtual disk to SCSI:
http://kb.vmware.com/kb/1016192

To increase your disk in the future, once it's changed to SCSI, see this KB:
http://kb.vmware.com/kb/1004071; another option to increase your system volume (C:) virtual disk size once it's converted to SCSI, is to power down your VM and go into its Edit Settings and remove this virtual disk (*DO NOT DELETE*). On a 2nd VM, go into its Edit Settings area and Add a Hard Disk -> Use existing virtual disk, and browse to the datastore and VM folder location of the orig VM's vmdk file. Power down the 2nd VM and modify the virtual disk size as needed. Power on this 2nd VM, go into CMD window and use DISKPART to modify the partition size. (http://support.microsoft.com/kb/325590) Once modified, go into this 2nd VM's Edit Settings and remove the virtual disk (again, *DO NOT DELETE*), then re-add it to the orig VM. If the drive is a non-sys volume drive, you can simply power down the VM, modify the disk size, power the VM back up, then use diskpart to change the partition size.

Regards,
~coolsport00
0
 
LVL 24

Expert Comment

by:Luciano Patrão
ID: 34979094
Hi

@coolsport00 You can also change the IDE to SCSI by converting the VM

On the Options step, you just need to choose "Edit Devices". Inside this option you can change the "Disk Controller".

Honestly never test this option, but there is an option to change this.

Jail
0

Featured Post

[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When rebooting a vCenters 6.0 and try to connect using vSphere Client we get this issue "Invalid URL: The hostname could not parsed." When we get this error we need to do some changes in the vCenter advanced settings to fix the issue.
August and September have been big months for VMware—from VMworld last month to our new Course of the Month in VMware Professional - Data Center Virtualization. We reached out to Andrew Hancock, resident VMware vExpert, to have a more in-depth discu…
Teach the user how to use configure the vCenter Server storage filters Open vSphere Web Client:  Navigate to vCenter Server Advanced Settings: Add the four vCenter Server storage filters: Review the advanced settings: Modify the values of the four v…
Teach the user how to join ESXi hosts to Active Directory domains Open vSphere Client: Join ESXi host to AD domain: Verify ESXi computer account in AD: Configure permissions for domain user in ESXi: Test domain user login to ESXi host:

963 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question