Modifying a VMware Server Virtual Disk Configuration

Modifying a VMware Server Virtual Disk Configuration will include enlarging, shrinking and removing a VMWare Server Virtual Disk. 

The current configuration of a virtual disk can be viewed and modified by logging into the VI Web Access interface and selecting the virtual machine to which the disk is attached from the Inventory panel. Once the workspace updates to reflect the selected virtual machine, locate the disk drive from the Hardware panel, click on it and select Edit… from the menu. This will display the hard disk settings dialog.

 

 

An important point to note is that many of the settings will be read-only (and consequently grayed out) if the selected virtual machine, or any other virtual machine which shares the disk, is currently powered on. In addition, the Increase capacity… link shown in the above figure will not be visible if the virtual machine is powered on. To make changes to configuration values, or to increase disk capacity, it will be necessary to power off all virtual machines that utilise the virtual disk.

Enlarging a VMware Server Virtual Disk

The capacity of a virtual disk may be increased using the disk settings dialog (described above). As with most other virtual disk settings, a disk may only be increased in size when all virtual machines sharing the disk are powered off. Once this is achieved, select a virtual machine which uses the virtual disk from the Inventory panel of the VI Web Access interface, click on the required hard disk from the Hardware panel and select Edit… from the menu. Once the disk settings dialog appears, click on the Increase capacity… link to display the disk capacity fields.

The current size of the virtual disk is listed, together with two text boxes for the amount by which the disk is to be increased and the new capacity. Both are specified in gigabytes (GB), and either may be used to increase the size of the virtual disk. The amount of space available for allocation to the virtual disk is dictated by the available space on the datastore in which the virtual disk file resides. The current free space on the datastore is also listed beneath the capacity text boxes. The increase in virtual disk capacity cannot exceed this value.

Shrinking a VMware Server Virtual Disk

Unlike increasing the capacity of virtual disks, which is performed outside the virtual machine using the VI Web Access interface, virtual disks can only be reduced in capacity from within the virtual machine’s guest operating system and requires the installation of VMware Tools.  If VMware Tools are not currently installed on the guest operating system, then it is good idea to install them.

Once VMware Tools are installed into the guest operating system, the next step is to access the VMware Tools Control Panel. The default configuration for VMware Tools on Windows should have placed a VMware Tools icon in the Windows notification area in the bottom right hand corner of the Windows task bar (where the date and time are typically displayed) and also as an icon in the Windows Control Panel (accessed via Start->Control Panel). Double clicking on either of these options will invoke the control panel.

To invoke the VMware Tools control panel on Linux and Solaris systems, simply execute the following at a command-line prompt:

/usr/bin/vmware-toolbox&

 

The “Shrink” tab of the VMware Tools control panel allows virtual disks associated with the virtual machine to be reduced in size by reclaiming unused areas on the disk. In the first instance, free space on the disk is reclaimed within the guest operating system. Subsequently, the virtual disk image on the host file system is then reduced in size by the VMware Server software.

In order to be able to perform a shrink operation the virtual disk must not have been created as a pre-allocated disk and there must be no current snapshots of the virtual machine.

If the virtual disk is an independent disk it must be in persistent mode. In the case of Linux guest operating systems, the operation must be performed as superuser.

Removing a VMware Server Virtual Disk

Virtual disks are removed using the VI Web Access interface. As with previous tasks, any virtual machines which access the virtual disk must first be powered off. Assuming this to be case, select the virtual machine to which the disk is attached from the Inventory panel, click on the disk drive in the Hardware panel and select either Remove or Delete from disk. The Remove option simply removes the disk from the configuration of the currently selected virtual machine. The physical .vmdk file which represents the virtual disk remains intact in the datastore in which it was created and is available for use by other virtual machines.

The Delete from disk option, on the other hand, both removes the disk from the configuration of the select virtual machine and also physically removes the .vmdk file from the datastore. As such the disk is no longer available and the space it used is released.

Be Sociable, Share!

2 thoughts on “Modifying a VMware Server Virtual Disk Configuration”

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>