Managing VMware Server 2.0 Virtual Disks

Rather than using a physical disk drive to store the system and user files for a guest operating system, VMware Server virtual machines use files (known as virtual disks) located on the disk drives attached to the host system.

This guide will provide an overview of the creation and management of virtual disks. VMware Server Virtual Disk and Device Types

Virtual disks provide the storage for guest operating system and user files. Each VMware Server virtual machine will likely have one or more virtual disks configured and during the lifecycle of a virtual machine virtual disks may be added and removed as needed. The size of a virtual disk is specified at creation time and can range from 1MB up to a maximum of 950GB.

When a virtual disk is first created (either during the virtual machine creation process or later) it may be configured as growable or pre-allocated. The virtual disk type may subsequently be converted using the vmware-vdiskmanager command line tool. A growable disk is initially created smaller than the specified disk size, and subsequently grows as space is needed up until the maximum specified size is reached. This has the advantage that the disk creation process is shorter and less disk space on the host is used initially. A further advantage of growable disks is that the size of the disk can be reduced at a later time using the VMware Tools Shrink Disk feature. These features, however, come at the cost of reduced performance.

In the case of a pre-allocated virtual disk, the entire space required for the disk is allocated at creation time. This has the advantage that virtual disk performance is not degraded due to the need to increase the disk size as more space is needed. Disadvantages include an increased amount of time needed to create the disk (taking several hours for a 950GB virtual disk) and the inability to reduce the size of the disk at a later time unless the disk is converted to growable.

An additional option allows virtual disks to be split amongst multiple 2GB files on the host, rather than contained in a single file. This option has little benefit unless VMware Server is hosted on a file system which limits file sizes to 2GB.

To the guest operating system running inside a virtual machine, virtual disks appear as though they are physical devices. As such, the disk can be configured to appear to the virtual machine as either an IDE or SCSI device. In the case of SCSI virtual disks, VMware uses a virtual SCSI controller which appears to the guest as either an LSI Logic or BusLogic controller. As such, guest operating system hardware drivers for these devices may need to be installed accordingly.

VMware Server Disk Modes

VMware Server virtual disks may be configured to run in Independent mode which provides two additional options in terms of disk configuration:

Persistent – Data written to the disk by the guest operating system is retained when the system is powered off. This is the normal mode of operation for most virtual disks.

Nonpersistent – Data written to the disk during a virtual machine session are discarded after the virtual machine is powered off or reset. This is useful if the guest operating system is required to be started with a clean system each time the virtual machine is powered on, perhaps in a testing or secure environment.

Disks configured as independent are not included in snapshots.

VMware Server Virtual Disk Caching Options

The disk write caching policy for virtual disks defines the point at which new data is written to the virtual disk (as opposed to being cached in memory before being written) by the guest operating system. These settings have implications for performance, with increased performance being available at the cost of data integrity. A choice of two policy options is available:

Optimise for safety – Data is not cached. Write operations made by the guest operating system are written immediately to the virtual disk image. Reduces risk of data loss in the event of a system failure, but results in slower disk write performance.

Optimizs for performance – Write operations performed by the guest operating system are initially cached prior to being written to the virtual disk. Provides increased write performance at the cost of increased risk of data loss in the event of a system failure.

Adding a New Virtual Disk

A new virtual disk may be added to a virtual machine via the VI Web Access management interface. SCSI based virtual disks may be installed on running virtual machines as long as those machines are running on VMware virtual hardware version 7 or later (the default setting when virtual machines are created in VMware Server 2.0). IDE based virtual disks or virtual machines running on older versions of the virtual hardware require that the virtual machine be powered off prior to the addition of a new virtual disk.

Once logged into the VI Web Access interface, the first step in adding a new virtual disk is to select the required virtual machine from the Inventory panel. In the Commands section of the virtual machine workspace, click on the Add Hardware link to invoke the Add Hardware Wizard.

To add a new virtual disk, select the Hard Disk option from the list of new hardware devices to proceed to the Hard Disk page. Options are available to either create an entirely new virtual disk, or to use an existing virtual disk that may already have been created for a pre-existing virtual machine. In fact, this second option can be used to enable multiple virtual machines to share a virtual disk, although careful steps should be taken to avoid disk write conflicts (for example both guests attempting to write simultaneously to the same disk block will likely cause problems for most standard file systems).

Once a decision has been made about creating or re-using a virtual disk, the next wizard screen provides the option to configure the disk type, mode and caching options. Finally, a summary page is displayed highlighting the choices made during the configuration process. Clicking the Finish button will begin the addition process which, depending on the settings, may take some time to complete.

 

Be Sociable, Share!

One thought on “Managing VMware Server 2.0 Virtual Disks”

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>