Loading

×Sorry to interrupt
Uncaught ReferenceError: addCTracking is not defined
throws at https://kb.vmware.com/resource/KM_TealiumTrackingJS?v=0.5:100:1

Refresh

Cookie Preference Center

General Information on cookies

When you visit our website, we use cookies to ensure that we give you the best experience. This information does not usually directly identify you, but it can give you a more personalized web experience. Because we respect your right to privacy, you can choose not to allow some types of cookies by clicking on the different category headings to find out more and change your settings. However, blocking some types of cookies may impact your experience on the site and the services we are able to offer. Further information can be found in our

Cookie Policy.

Strictly Necessary

Strictly Necessary

Always Active

Strictly Necessary

Strictly necessary cookies are always enabled since they are essential for our website to function. They enable core functionality such as security, network management, and website accessibility. You can set your browser to block or alert you about these cookies, but this may affect how the website functions. For more information please visit www.aboutcookies.org or www.allaboutcookies.org.

Cookie Details‎

Performance

Performance

Performance

Performance cookies are used to analyze the user experience to improve our website by collecting and reporting information on how you use it. They allow us to know which pages are the most and least popular, see how visitors move around the site, optimize our website and make it easier to navigate.

Cookie Details‎

Please confirm your settings by refreshing the page.

Functional

Functional

Functional

Functional cookies help us keep track of your past browsing choices so we can improve usability and customize your experience. These cookies enable the website to remember your preferred settings, language preferences, location and other customizable elements such as font or text size. If you do not allow these cookies, then some or all of these services may not function properly.

Cookie Details‎

Advertising

Advertising

Advertising

Advertising cookies are used to send you relevant advertising and promotional information. They may be set through our site by third parties to build a profile of your interests and show you relevant advertisements on other sites. These cookies do not directly store personal information, but their function is based on uniquely identifying your browser and internet device.

Cookie Details‎

Advertising Cookies

Consent Leg.Interest

Select All Vendors

Select All Vendors

Select All Hosts

Select All

Clear Filters

Information storage and access

Apply

Confirm My Choices Reject All Allow All

Skip to main content

My Subscriptions

Loading

Knowledge Base

Adding space to an ESXi/ESX host virtual disk (994)

Last Updated: 1/5/2015Categories: How toTotal Views: 188433Language:
Chinese (Simplified)JapaneseSpanishEnglish

1 like this article

Subscribe to get an email
newsletter with new updates

1 people found this helpful Please provide article feedback:

Details

This article provides instructions on extending or expanding the size of an ESXi/ESX host virtual disk.

Solution

Notes: Before you begin, see Restarting the Management agent on an ESX or ESXi Server (1003490)for important information on restarting the mgmt-vmware service.

The command-line utilityvmkfstoolsallows you to extend or expand the size of an ESX host virtual disk. For more information on using vmkfstools, see Using vmkfstools in the following documents:

ESX 2.5 - VMware ESX Server 2 Administration Guide

ESX 3.0.x / ESX Server 3.0.1 / VirtualCenter 2.0.1 - ESX Server 3.0.1 and VirtualCenter 2.0.1 Server Configuration Guide

ESX 3.5 U2 - ESX Server 3 Configuration Guide

Note: For ESX 3.5 and later, it is strongly recommendedto use the GUI (virtual machine properties).

ESX 4.1 - ESX Configuration Guide

ESXi 5.0 - vSphere 5 Documentation Center

The following vmkfstools command can be used to extend a virtual disk file to the new specified length:

vmkfstools [-X | --extendfile] #[gGmMkK]

For ESX/ESXi 4.1 and 5.0:

vmkfstools [-X | --extendvirtualdisk] # [gGmMkK]

Caution:This operation makes fundamental, irreversible changes to the virtual machine's disk. VMware strongly recommends making a complete backup of this virtual machine before attempting this operation.

Warning: In current versions of ESX/ESXi 2.5, 3.x, 4.x, and ESXi 5.x, do not extend a disk that has snapshots. Commit or discard snapshots before increasing the size of the virtual disk. Extending the size of a virtual disk that has snapshots invalidates the snapshots. Sometimes the Snapshot Manager reports inaccurate information about the existence of snapshots; the best way to know if the virtual machine is using snapshots is to check what the .vmx is pointing to. For more information, see Determining if a virtual machine is using snapshots (1004343) .If the base disk has already been extended underneath a snapshot tree, see A virtual machine cannot boot after resizing a base virtual machine disk (VMDK) that is part of a snapshot hierarchy (1646892)

Use thevmkfstoolscommand to extend the size of a disk allocated to a virtual machine, after you have created the virtual machine. The virtual machine that uses this disk file must be powered off when you enter this command. Also, the guest operating system must be able to recognize and use the new size of the disk, for example, by updating the file system on the disk to take advantage of the extra space.

You specify the size in kilobytes, megabytes, or gigabytes by adding a suffix ofk(kilobytes), m(megabytes) org(gigabytes), respectively.

For example, to increase the size of an existing Windows 2000 virtual disk on ESX Server 2.x, execute this command:

[root@esxhost]# vmkfstools -X 8000m vms:win2000.vmdk

This example expands the virtual disk file namedwin2000.vmdk that is stored on a VMFS2 volume named vms to a size of 8GB.

Note: You must specify the size you want like to Extend To and not how much you want like to Extend By. Otherwise, the disk shrinks to the new smaller size and data inside the VMDK file might get corrupted. This is not the case with ESX 3.5.0 where vmkfstools -X allows only growing the disk but not shrinking.

This is an example from ESX 3.5.0 showing a failed attempt to extend disk to smaller size than the current vmdk size:

-rw------- 1 root root 392 Apr 16 14:17 slax.vmdk
-rw------- 1 root root 2.0G Apr 16 13:47 slax-flat.vmdk
[root@localhost slax]# vmkfstools -X 800M slax.vmdk
Failed to extend disk : One of the parameters supplied is invalid (1).
[root@localhost slax]#

Note: ESX 2 virtual disks may optionally use .dskextensions.

For ESX 3.x and later, you must specify the location of the.vmdkfile or issue the command while in the directory containing the file. Always specify the virtual disk descriptor file with thevmkfstoolscommand. For example:

[root@esxhost]# vmkfstools -X 8000m /vmfs/volumes/storage1/win2000/win2000.vmdk

To extend a virtual disk that was initially created with EagerZeroedThick format, run this command:

vmkfstools -X #[gGmMkK] -d eagerzeroedthick /vmfs/volumes/datastore/file.vmdk

After expanding the disk file, you must run a partition manipulation tool such as PartitionMagic, Volume Manager or ServerMagic in the virtual machine to expand the partition seen by the virtual machine guest operating system into the newly created space on the virtual disk.

For examples of third party utilities that can be used as an alternative to diskpart, see Increasing the size of a disk partition (1004071).

Notes:

You may need to restart the management services for the changes to be visible in VirtualCenter and the Virtual Infrastructure Client (mgmt-vmware). If this fails, check the size of the.vmdkfile. If the file has been extended and the change is not reflected, try removing and re-adding the.vmdkfile to the virtual machine.

Some older ESX 2.x files may have a.dskfile extension instead of a.vmdkfile extension.

ESX 3.5.0 does have this disk extending feature already in GUI accessible in Virtual Machine Properties.

In the GUI of ESX 3.5.0, when extending the size on a virtual machine with snapshots, the task Reconfigure Virtual Machine does finish as Completed but the disk is not extended. This prevents corruption of the snapshots.

Growing virtual disks larger than 1TB using the GUI interface in ESX 3.5 can fail. Growing virtual disks with the command line works without issue. This issue was resolved in ESX 4. For more information, see Cannot extend a vmdk over 1TB (1008528)

If growing a virtual disk fails using the GUI please verify the disk has no snapshots, bus sharing in the virtual machine is set to None and that there is sufficient disk space on the datastore.

Note: If a cluster node virtual machine powers off due to a growing disk, messages similar to the following may be reported in vmware.log. This can also occur when growing a non-shared disk. If any bus is shared in the virtual machine, then you cannot grow any disk in the virtual machine while it is running.

2012-08-09T09:18:48.650Z| vcpu-0| [msg.disk.notCheckpointed3] Resuming virtual disk scsi1:1 failed. The disk has been modified since a snapshot was taken or the virtual machine was suspended.
2012-08-09T09:18:48.650Z| vcpu-0| [msg.checkpoint.continuesync.fail] An error occurred while restarting virtual machine after taking a snapshot. The virtual machine will be powered off.

Additional Information
For translated versions of this article, see:

Español: Agregar espacio al disco virtual de un host ESXi/ESX (2073028)

日本語: ESXi/ESX ホスト仮想ディスクへの領域の追加 (2078466)

简体中文: 为 ESXi/ESX 主机虚拟磁盘增加空间 (2074814)

Detectable by VMware SkylineTM

Actions

Copy

link to clipboard
copied!

Print

Language:
Chinese (Simplified)JapaneseSpanishEnglish

Attachments

Additional Resources

KB
•
End Of General Availability of the Free vSphere Hypervisor (ESXi 7.x and 8.x) (2107518)

Result 1 of 1

Ask The Community

Get answers quickly from VMware experts in the community

Post Subject

CONTINUE IN COMMUNITIES

Related Products:

VMware vSphere ESXi

VMware ESX Server

Related Versions:

VMware vSphere ESXi 5.5

VMware vSphere ESXi 5.1

VMware vSphere ESXi 5.0

VMware ESXi 4.1.x Installable

VMware ESXi 4.1.x Embedded

VMware ESXi 4.0.x Installable

VMware ESXi 4.0.x Embedded

VMware ESXi 3.5.x Installable

VMware ESXi 3.5.x Embedded

VMware ESX Server 3.5.x

VMware ESX Server 3.0.x

VMware ESX Server 2.5.x

VMware ESX Server 2.1.x

VMware ESX Server 2.0.x

VMware ESX Server 1.x

VMware ESX Server 1.5.x

VMware ESX 4.1.x

VMware ESX 4.0.x

view all

Take Our Survey

Was this article helpful?

YES

NO

Copyright © 2005-2024 Broadcom. All Rights Reserved. The term “Broadcom” refers to Broadcom Inc. and/or its subsidiaries.

Terms of Use

Your California Privacy Rights

Privacy

Accessibility

Cookie Settings

Support Assistant