User’s Guide : Administering and Monitoring Lab Manager : Managing Resources : Managing Datastores

Managing Datastores
A datastore provides storage resources for virtual machines. Lab Manager supports VMFS and NFS datastores, which it accesses through VirtualCenter. You can add datastores to Lab Manager by attaching them to ESX hosts in VirtualCenter.
VMware recommends shared storage (NFS, iSCSI, or Fiber Channel). If you store virtual machine files on local (not shared) storage, you can only deploy the virtual machines on the local ESX host.
Datastores can also be enabled as media stores. See Managing Media Stores.
Viewing Datastores
The Datastores tab displays all the datastores in an organization or in the entire Lab Manager installation. Use the Datastores tab to perform datastore operations.
To view datastores
1
2
Click the Datastores tab.
The Datastores page includes the following information:
Connected – Indicates whether or not a host in Lab Manager is connected to the datastore.
You can disconnect a datastore using VirtualCenter.
Enabled – Indicates whether or not a datastore is available for use.
You can disable the datastore to prevent users from deploying virtual machines or creating media files on the datastore.
VM Creation Enabled – Indicates whether or not you can store virtual machines on the datastore.
Media Store Creation Enabled – Indicates whether or not you can create media directories on the datastore.
These directories are known as media stores.
For example, Lab Manager creates an installation directory for virtual machines and would generate a message if it discovers an existing directory with the same name.
See Using Text Search Filter for information on using the Filter feature.
Removing Datastores
Removing a datastore deletes all its virtual machines, media stores, and media files from the Lab Manager database. By default, only administrators can remove datastores.
 
Before you remove a datastore, you must do the following:
For example, if the datastore is connected to three hosts managed by Lab Manager, disconnect the datastore from all three hosts through VirtualCenter.
If you remove a datastore with media stores and you add the datastore back to the Lab Manager environment at a later time, you need to recreate the media stores because the original ones are no longer available.
To remove a datastore
1
Click Resources in the left pane.
2
On the Datastores tab, move the pointer over the datastore and choose Remove from the menu.
3
Enabling and Disabling Datastores
Administrators can enable and disable datastores for virtual machines, and datastores for media (media stores).
When you disable a datastore, the configurations associated with the datastore cannot be deployed.
You can also disable the creation of virtual machines or media stores in a datastore. When you disable virtual machine creation, the following operations cannot be performed:
To enable a datastore
1
2
In the Datastores tab, move the pointer over the datastore and choose Enable from the menu.
To disable a datastore
1
2
In the Datastores tab, move the pointer over the datastore and choose Disable from the menu.
3
Click OK to confirm.
To disable virtual machine creation in a datastore
1
2
In the Datastores tab, move the pointer over the resource and choose Disable VM Creation from the menu.
To disable media store creation in a datastore
1
2
In the Datastores tab, move the pointer over the resource and choose Disable Media from the menu.
Modifying Datastore Properties
By default, only administrators can modify the properties of datastores.
To modify datastore properties
1
2
In the Datastores tab, move the pointer over the datastore and choose Properties from the menu.
3
4
Viewing Virtual Machine Datastore Usage
On the Virtual Machine Datastore Usage page, administrators and organization administrators can monitor disk space usage for all virtual machines and complete maintenance tasks.
The Virtual Machine Datastore Usage page shows how much total storage (inclusive of the space occupied by hidden nodes associated with the virtual machine) can be reclaimed by deleting a virtual machine.
To access virtual machine datastore usage
1
2
On the Datastores tab, click the View Datastore Usage button.
To view the usage of a single datastore rather than the contents of all virtual machine datastores, click the Datastores tab, move the pointer over the datastore name, and choose Open from the menu.
3
Choose the Global organization to view datastore usage for all organizations.
 
On this page, a table includes this information:
A dash appears in this column for virtual machine templates.
This space includes the area occupied by the virtual machine directory and “parent” directories up to an ancestor that has “children” or other dependent directories. For more information on virtual machine directories and disk space assessment, see Viewing Virtual Machine Datastore Directories.
 
Note Use the Refresh Disk Space button to refresh the disk space to view an accurate estimate of the space.
For various changes, Lab Manager freezes the original delta disk and creates a new one.
The chain length indicates how scattered the virtual machine image is across the directories of a datastore. Lab Manager messages the user when you need to consolidate a chain.
This column displays the date that the virtual machine’s storage lease expires. Depending on the resource cleanup settings specified by the administrator, Lab Manager either deletes the virtual machine or marks it for deletion. See Configuring Resource Cleanup Settings.
Using the pop-up menu, you can view the high-level topography of the virtual machine directories, consolidate and delete virtual machines, and access virtual machine properties.
Viewing Virtual Machine Datastore Directories
The Context view provides a high level view of the dependencies between virtual machines. The Context view for a virtual machine displays a tree view of the virtual machine’s relationship to other virtual machines on which it depends (ancestor nodes) and which depend on it (child nodes). Each node in the tree represents a specific directory location on the datastore.
Lab Manager creates nodes for operations such as linked cloning. When you make a linked clone a virtual machine, Lab Manager creates a delta disk instead of copying the entire virtual hard disk. With each linked-clone operation, Lab Manager freezes the original delta disk and creates a new one. The virtual machine disk as a whole consists of its own delta disk and the delta disks of ancestor disks. This series of disks represents the chain length of a virtual machine. A virtual machine with a long chain length will have a much more Context view than a virtual machine with a short chain length.
Deleting a virtual machine deletes the storage occupied by the virtual machine node and any ancestor node that can be safely deleted. Lab Manager will not delete an ancestor node under these conditions:
A virtual machine (for example, a virtual machine template or virtual machine in the configuration library) is associated with the ancestor node.
Another node uses the ancestor node as a revert point. For example, a full clone operation might consolidate and create a new disk but refer to the revert point of the original chain.
Figure 8-1 shows a basic example of a tree of related virtual machines and the internal nodes affected by a delete operation.
Figure 8-1. Example of Nodes Affected by a Delete Operation
If you delete node D, node B stays intact because node C and E are dependent on it. If you delete node E, the space for node E and node C becomes available because the deletion affects all nodes up to a directory with child dependencies (node B).
In the Context view, the chain of virtual machine and internal node directories are to the right of the ancestor directories. The boxes with thick borders represent the virtual machines that you can see in the Lab Manager Web console. The boxes with lighter borders represent the hidden internal directories associated with the virtual machines. Deletion of internal nodes only occurs as a side effect of deleting the virtual machines associated with those nodes.
Blue boxes indicate deployed directories, while a yellow box indicates the selected virtual machine. The default color for boxes is gray.
If you move the pointer over a box, you can see various details, including the amount of space the virtual machine or internal node consumes and the total amount of space reclaimed if the node is removed. For example, if you see Size: 277 MB (554 MB), 277 reflects the space of the selected node, and 554 is the total space. The total amount is calculated by adding the space of the node and all associated nodes to the right of the selected node.
Previously deployed and currently deployed virtual machines show when they were last deployed. Internal nodes do not display this information.
A turquoise box indicates a revert reference. This reference point implies another directory (created by a full clone operation on a different datastore) exists outside of the displayed directory tree but uses a directory linked to this revert reference as a revert point. This dependency affects your ability to delete directories.
To delete a directory linked to a revert reference, delete the virtual machine associated with the revert reference and the descendants of the directory.
To view virtual machine datastore directories
1
Click Resources in the left pane.
2
In the Datastores tab, click the View Datastore Usage button.
To view the usage on a single datastore, move the pointer over the datastore name and choose Open from the menu.
3
Click the Refresh Disk Space button to ensure that the data is current.
4
You can use the SSMove utility to move an entire datastore, or a specific tree of virtual machines, to another datastore. The SSMove utility is available on the Lab Manager server in the following location:
[C:]\Program Files\VMware\VMware Lab Manager Server\Tools\SSMove
Deleting Expired Virtual Machines
When the storage lease for a virtual machine expires, Lab Manager either deletes the virtual machine or marks it for deletion, depending on the resource cleanup settings. See Configuring Resource Cleanup Settings.
You can delete virtual machines that are marked for deletion from the Virtual Machine Datastore Usage page.
To delete expired virtual machines
1
Click Resources in the left pane.
2
In the Datastores tab, click the View Datastore Usage button.
To view the usage on a single datastore, move the pointer over the datastore name and choose Open from the menu.
3
Click the Refresh Disk Space button to ensure the data is current.
For all virtual machines with expired storage leases, the Status column displays Expired.
4
Click the Delete Expired VMs button.
Lab Manager deletes all the undeployed virtual machines with a storage lease that expired. This operation is organization-aware. For the Global organization, Lab Manager deletes all the expired virtual machines. For any other organization, Lab Manager only deletes the expired virtual machines owned by users in the selected organization.
Renewing the Storage Lease for an Expired Virtual Machine
When the storage lease for a virtual machine expires, Lab Manager either deletes the virtual machine or marks it for deletion, depending on the resource cleanup settings. See Configuring Resource Cleanup Settings.
You can renew the storage lease for virtual machines that are marked for deletion from the Virtual Machine Datastore Usage page.
To renew the storage lease for an expired virtual machine
1
Click Resources in the left pane.
2
In the Datastores tab, click the View Datastore Usage button.
To view the usage on a single datastore, move the pointer over the datastore name and choose Open from the menu.
3
Click the Refresh Disk Space button to ensure the data is current.
For all virtual machines with expired storage leases, the Status column displays Expired.
4
5
Lab Manager renews the storage lease for the selected virtual machine and all other virtual machines in its configuration (if applicable) and updates the Cleanup Date column to reflect the new lease expiration date. Lab Manager renews expired leases for the same length of time as the original lease (for example, 30 days).
Deleting Revert Points
Like virtual machines, revert points take up space on datastores. You can free up that space by deleting revert points.
To delete revert points
1
Click Resources in the left pane.
2
In the Datastores tab, click the View Datastore Usage button.
To view the usage on a single datastore, move the pointer over the datastore name and choose Open from the menu.
The Revert Dir ID lists the directory IDs of the revert points.
3
Click the Refresh Disk Space button to ensure that the data is current.
4
Consolidating a Virtual Machine Based on Datastore Usage
You can only consolidate undeployed virtual machines. For information on consolidation, see Consolidating Virtual Machines.
To consolidate virtual machine based on datastore usage
1
Click Resources in the left pane.
2
In the Datastores tab, click the View Datastore Usage button.
To view the usage on a single datastore, move the pointer over the datastore name and choose Open from the menu.
3
4
You can keep the consolidated virtual machine in the current datastore (displayed in bold), or you can move the consolidated virtual machine to a different datastore.
Deleting a Virtual Machine or Configuration Based on Datastore Usage
You can delete a specific virtual machine or the entire configuration that contains the virtual machine. To delete a virtual machine or configuration, it must be undeployed.
To delete virtual machine or configuration based on datastore usage
1
Click Resources in the left pane.
2
In the Datastores tab, click the View Datastore Usage button.
To view the usage on a single datastore, move the pointer over the datastore name and choose Open from the menu.
3
Move the pointer over an undeployed virtual machine name and choose Delete from the menu to delete a virtual machine, or choose Delete Configuration to delete the entire configuration that contains the virtual machine.
4