Solved

Expanding a vmdk size

Posted on 2011-02-22
11
1,216 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
NEW Veeam Agent for Microsoft Windows

Backup and recover physical and cloud-based servers and workstations, as well as endpoint devices that belong to remote users. Avoid downtime and data loss quickly and easily for Windows-based physical or public cloud-based workloads!

 
LVL 2

Accepted Solution

by:
shabrez earned 500 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 121
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 121
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 121
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 23

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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

It’s been over a month into 2017, and there is already a sophisticated Gmail phishing email making it rounds. New techniques and tactics, have given hackers a way to authentically impersonate your contacts.How it Works The attack works by targeti…
Giving access to ESXi shell console is always an issue for IT departments to other Teams, or Projects. We need to find a way so that teams can use ESXTOP for their POCs, or tests without giving them the access to ESXi host shell console with a root …
Teach the user how to configure vSphere Replication and how to protect and recover VMs Open vSphere Web Client: Verify vsphere Replication is enabled: Enable vSphere Replication for a virtual machine: Verify replicated VM is created: Recover replica…
With the advent of Windows 10, Microsoft is pushing a Get Windows 10 icon into the notification area (system tray) of qualifying computers. There are many reasons for wanting to remove this icon. This two-part Experts Exchange video Micro Tutorial s…
Suggested Courses

631 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