Tuesday, October 11, 2011

Increasing the size of a virtual disk(VMware)

The procedure for increasing the size of a virtual disk slightly differs between VMware products. Here we are considering VMware workstation and player.
Before doing this, Make sure all snapshots have been removed and virtual machine is powered off.
To increase the virtual disk from command line, go to theVMware product installation dir and run this command,
C:\Program Files\VMware\VMware Workstation\vmware-vdiskmanager -x 100Gb "d:\VM Folder\vmdiskfile.vmdk", Replace 100Gb with the actual size of virtual disk that you want
This will take some time, and once complete the application will give you some sizing messages.
Now you need to expand the capacity of the disk to take advantage of its new size. If the disk is the system volume you will need to mount the disk in a second VM and expand it from there. If its not a system volume do it within the virtual machine it belongs to.
Once you've mounted the disk in a different VM or booted up the VM it belongs to if its not the system volume, do the following.
Go to the command line and start the diskpart utility. By issuing the following command.
diskpartOnce you've started diskpart, list the drives using the following command:
list diskThis will show you the disks assigned to your machine. Now the important command

list volumeThis will show you the drives, their volume number, capacity etc. You now need to select the volume you are about to expand, using the following command. Where n is equal to the number of the volume.select volume=nOnce selected, you can now expand it using the extend command. You can optionally specify the amount extend it by.extendThat's it.For Workstation 7 and later and Player 3.x and later, you can increase the virtual disk from the GUI:
Select the virtual machine from the Inventory.Click Edit Virtual Machine Settings.Click Hard Disk.Click Utilities > Expand, enter the new size, then click Expand.
Once you've extended the disk, it's wise to defrag the drive. If you use the defragment tool in VMWare workstation you will find it much quicker than deframenting the drive from within the machine.
Now use a third party utility to resize disk partitions.
Note: Windows Server 2008, Windows Vista, and Windows 7 can expand the volumes from the Disk Manager in Computer Management. Right-click on the volume and click Extend Volume................


No comments:

Post a Comment