Increasing the size of a virtual disk (1004047)
Important information before you begin
For more information, see Increasing the size of a disk partition (1004071).
- All snapshots have been removed. For additional information, see Working with snapshots (1009402).
- The virtual machine is powered off.
Note: In ESX 4.1, you can extend and add virtual disks to a virtual machine when it is powered on (after installing VMware Tools).
Instructional Notes: About File Names
Note: If you have multiple .vmdk files with the same base name, use the file that does not include -flat or -s0 in its file name.
You may need to:
- Locate the full path to a hosted (non-ESX host) virtual machine's virtual disk (.vmdk ) file. For more information, see Locating a hosted virtual machine's files (1003880).
Locate the full path to an ESX host's virtual machine's virtual disk (.vmdk ) files. For more information, see Verifying that ESX/ESXi virtual machine storage is accessible (1003751).
Workstation / Player / ACE Manager / Server / GSX
To increase the virtual disk from the command line:
- Open a command prompt. For more information, see Opening a command or shell prompt (1003892).
- Navigate to the product's installation directory. For more information, see Locating the installation directory of a VMware product (1003897).
Type vmware-vdiskmanager -x 100Gb vm.vmdk and press Enter.
Note: Replace 100Gb with the actual size of virtual disk that you want. You can also specify Kb and Mb.
- 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.
- Complete the steps in Increasing the size of a disk partition (1004071), so that the guest operating system is aware of the change in disk size.
VMware Player 2.x / ACE Instance
If you are using an ACE Instance, the virtual disk size must be changed from the ACE Manager, then repackaged and redeployed.
If you are using VMware Player's 2.x, upgrade to VMware Player 3. This is a free download, available from the VMware Download Center.
ESX / VI Client / vSphere
- In ESX 4.1, you can extend and add virtual disks to a virtual machine when it is powered on (after installing VMware Tools).
- Ensure the user has sufficient permissions to carry out this task.
- Warning: If the disks are clustered, they cannot be expanded through vSphere Client but instead through CLI.
Please use the following command as an example:
# vmkfstools -X 6G -d eagerzeroedthick vm.vmdk
Note: For more information on using vmkfstools commands, see Cloning and converting virtual machine disks with vmkfstools (1028042).This error may occur because of a number of different issues:
If you experience this error, ensure that you can power on the virtual machine successfully and ensure that you remove all snapshots. For additional information, see Determining if a virtual machine is using snapshots (1004343). If the error persists, contact VMware Support.
Open VMware Infrastructure (VI) Client and connect to VirtualCenter or the ESX host.
Right-click the virtual machine.
Click Edit Settings.
Select Virtual Disk.
Increase the size of the disk.
Note: If this option is greyed out, the disk may be running on snapshots or the disk may be at the maximum allowed size depending on the block size of the datastore.
For earlier versions of ESX, you must use the Console. For more information, see Adding space to an ESXi/ESX host virtual disk(994).
For further details on Virtual Disk Configuration, see the vSphere Virtual Machine Administration Guide.
Note: Increasing the size of an IDE virtual disk using the vSphere Client is not supported. SCSI virtual disks are the only supported disk that can be expanded via the vSphere Client.
Open Lab Manager.
Consolidate and then deploy the template to be resized. For instructions, see the Lab Manager User's Guide.
Connect to the ESX host where the template was deployed using VI Client.
Perform the disk resize according to the ESX section above.