Chapter 3. Storage

Red Hat Enterprise Virtualization uses a centralized storage system for virtual machine disk images, ISO files and snapshots. Storage networking can be implemented using Network File System (NFS), Internet Small Computer System Interface (iSCSI) or Fiber Channel Protocol (FCP).You can also set up local storage on a host as a data domain if you are setting up a very small and limited environment, for example, as an evaluation. This section describes how to set up and manage the variety of storage types that can be used in Red Hat Enterprise Virtualization. Setting up storage is a vital prerequisite for a new data center, which cannot be initialized until storage domains are attached and activated. In addition to the administrator of the platform, and the data center, a storage administrator role can be assigned to a user who will have system permissions to a particular storage domain.

3.1. Managing Storage

A Red Hat Enterprise Virtualization system administrator needs to create, configure, attach and maintain storage for the virtualized enterprise. A familiarity with the storage types and their use is highly recommended. This document does not describe the concepts, protocols, requirements or general usage of NFS, iSCSI or FCP.
The Administration Portal enables administrators to assign and manage storage effectively and efficiently. The Storage tab on the Administration Portal provides an efficient graphical way to view and manage networked storage. The Storage Results list displays all the storage domains, and the Details pane enables access to general information about the domain.
The Administration Portal has three types of domains:
  • Data domains hold the disk images of all the virtual machines running in the system, operating system images and data disks. In addition, snapshots of the virtual machines are also stored in the data domain. The data cannot be shared across data centers, and the data domain must be of the same type as the data center. For example, a data center of a iSCSI type, must have an iSCSI data domain. A data domain cannot be shared between data centers. A local storage domain can only be a data domain.
  • ISO domains store ISO files (or logical CDs) used to install and boot operating systems and applications for the virtual machines. Because an ISO domain is a logical entity replacing a library of physical CDs or DVDs, an ISO domain removes the data center's need for physical media. An ISO domain can be shared across different data centers.
  • An export domain is a temporary storage repository that is used to copy/move images between data centers and Red Hat Enterprise Virtualization Manager installations. In addition, the export domain can be used to backup virtual machines. An export domain can be moved between data centers, however, it can only be active in one data center at a time.

    Important — Export Domain Storage Type

    Support for export storage domains backed by storage on anything other than NFS is being deprecated. Existing export storage domains imported from Red Hat Enterprise Virtualization 2.2 environments remain supported. New export storage domains must be created on NFS storage.

3.1.1. Storage Properties

Understanding Storage Domains
Setting up, managing and monitoring storage is essential for a data center to function efficiently at all times. A storage domain is a collection of images that have a common storage interface. A storage domain contains complete images of the virtual machines including templates and snapshots. A storage domain can be either for block devices (SAN - iSCSI or FCP) or files (NAS - NFS). On NFS, all virtual disks, templates and snapshots are simple files. On SAN (iSCSI/FCP), the LUNs are aggregated into a logical entity called a Volume Group (VG). This is done via LVM (Logical Volume Manager) See Red Hat Enterprise Linux Logical Volume Manager Administration Guide for more information on LVM. Each virtual disk, template or snapshot is a Logical Volume (LV) on the VG.
Virtual disks can have one of two formats, either Qcow2 or Raw. The type of storage can be either Sparse or Preallocated. Snapshots are always sparse but can be taken for disks created either as raw or sparse.
Virtual machines that share the same storage domain can be migrated between hosts that belong to the same cluster.

3.1.2. Storage Operations

3.1.2.1. Adding Storage Domains to a Data Center

Use the Storage tab to complete the following tasks:
  • Add or edit storage domains.
  • Activate, deactivate, or detach a storage domain from a data center.
  • Maintain and delete storage domains
This section describes how to add a storage domain to the system. The next section describes how to configure the storage for Red Hat Enterprise Virtualization.
The Storage Tab

Figure 3.1. The Storage Tab


There are two ways of adding storage domains to the Administration Portal. You can set up and add a new storage domain or you can import an existing ISO or export domain from another installation of Red Hat Enterprise Virtualization Manager.
While any available host in the data center can be used to add or configure a storage domain (using the Use Host field), all storage domains defined in the data center must be reachable by all the hosts in the data center. If a host is unable to access a storage domain that host is likely to become nonoperational. Therefore, when adding new storage domains to an active cluster, ensure that the storage is reachable from all hosts.

Note

If an ISO storage domain is required, it must be added after at least one data storage domain has been added.
  1. Click the Storage tab. The Storage list and toolbar displays.
  2. Click New Domain. The New Domain dialog box displays.
    Adding New Storage

    Figure 3.2. Adding New Storage


  3. Enter the Name of the storage domain, for example, accounting-server-images. A descriptive name is recommended.
  4. Select the appropriate Data Center. Select a Data Center from the drop-down list that displays all the Data Centers available and their storage types.
  5. Select the appropriate Domain Function / Storage Type. Select one:
    • Data / NFS
    • ISO
    • Export
    The Domain Function / Storage Type determines the availability of the Format field. Refer Table 6.3, “Permitted Storage Combinations” for more information on Format.
  6. Select a host in Use host. To attach a domain, an active host must be selected.

    Important

    All communication to the storage domain is via the selected host and not from the Red Hat Enterprise Virtualization Manager. At least one host must be active and have access to the storage before the storage can be configured.
  7. Enter the Export path of the storage. The export path can be either a static IP address or a resolvable hostname. For example, 192.168.0.10:/Images/ISO or storage.demo.redhat.com:/exports/iso.
  8. Click OK.
  9. The storage domain displays on the Storage tab.

To import an existing ISO or Export storage domain:

  1. Click the Storage tab. The Storage list and toolbar display. Refer Figure 3.1, “The Storage Tab”.
  2. Click Import Domain. The New Domain dialog box displays.
    Import Domain

    Figure 3.3. Import Domain


  3. Select the appropriate Domain Function / Storage Type. Select one:
    • Data / NFS
    • ISO
    • Export
    The Domain Function / Storage Type determines the availability of the Format field. Refer Table 6.3, “Permitted Storage Combinations” for more information on Format.
  4. Select a host in Use host. To attach a domain, an active host must be selected.

    Important

    All communication to the storage domain is via the selected host and not from the Red Hat Enterprise Virtualization Manager. At least one host must be active and have access to the storage before the storage can be configured.
  5. Enter the Export path of the storage. The export path can be either a static IP address or a resolvable hostname. For example,

    192.168.0.10:/Images/ISO

    or

    storage.demo.redhat.com:/exports/iso

    .
  6. Click OK.
  7. The storage domain is imported and displays on the Storage tab. The next step is to attach it to a data center. This is described later in this chapter, Section 3.1.2.2, “Attaching Storage Domains to a Data Center”.
3.1.2.1.1. Adding NFS Storage
An NFS storage domain is an NFS file share that is attached to a data center. Once you attach an NFS file share to the data center as a storage domain it is used to provide storage to the Red Hat Enterprise Virtualization environment. How the storage domain is used depends on the function you select when attaching it.
This section details how to prepare NFS file shares on your storage infrastructure and attach them using the Red Hat Enterprise Virtualization Manager. For further information on NFS itself, see the Red Hat Enterprise Linux — Storage Administration Guide
Add NFS

Figure 3.4. Add NFS


Important

For best results, the network interface over which data is shared should be capable of speeds of at least 1Gb/s.
NFSv4 is not natively supported by Red Hat Enterprise Virtualization. Red Hat Enterprise Virtualization will always attempt to mount NFS storage using NFSv3.
Your NFS storage server must support NFSv3 to be used with Red Hat Enterprise Virtualization. Attempts to attach NFS storage which has been exported from servers that do not support NFSv3 to the Red Hat Enterprise Virtualization environment will fail.
Preparing NFS Storage
This section outlines how to prepare an NFS file share on a server running Red Hat Enterprise Linux 6. Once created the NFS share can be attached by the Red Hat Enterprise Virtualization Manager.
  1. Install nfs-utils

    NFS functionality is provided by the nfs-utils package. Before file shares can be created, check that the package is installed by querying the RPM database for the system:
    $ rpm -qi nfs-utils
    If the nfs-utils package is installed then the package information will be displayed. If no output is displayed then the package is not currently installed. Install it using yum while logged in as the root user:
    # yum install nfs-utils
  2. Configure Boot Scripts

    To ensure that NFS shares are always available when the system is operational both the nfs and rpcbind services must start at boot time. Use the chkconfig command while logged in as root to modify the boot scripts.
    # chkconfig --add rpcbind
    # chkconfig --add nfs
    # chkconfig rpcbind on
    # chkconfig nfs on
    Once the boot script configuration has been done, start the services for the first time.
    # service rpcbind start
    # service nfs start
  3. Create Directory

    Create the directory you wish to share using NFS.
    # mkdir /exports/iso
    Replace /exports/iso with the name, and path of the directory you wish to use.
  4. Export Directory

    To be accessible over the network using NFS the directory must be exported. NFS exports are controlled using the /etc/exports configuration file. Each export path appears on a separate line followed by a tab character and any additional NFS options. Exports to be attached to the Red Hat Enterprise Virtualization Manager must have the read, and write, options set.
    To grant read, and write access to /exports/iso using NFS for example you add the following line to the /etc/exports file.
    /exports/iso       *(rw)
    Again, replace /exports/iso with the name, and path of the directory you wish to use.
  5. Reload NFS Configuration

    For the changes to the /etc/exports file to take effect the service must be told to reload the configuration. To force the service to reload the configuration run the following command as root:
    # service nfs reload
  6. Set Permissions

    The NFS export directory must be configured for read write access and must be owned by vdsm:kvm. If these users do not exist on your external NFS server use the following command, assuming that /exports/iso is the directory to be used as an NFS share.
    # chown -R 36:36 /exports/iso
    The permissions on the directory must be set to allow read and write access to both the owner and the group. The owner should also have execute access to the directory. The permissions are set using the chmod command. The following command arguments set the required permissions on the /exports/iso directory.
    # chmod 0755 /exports/iso
Result:
The NFS file share has been created, and is ready to be attached by the Red Hat Enterprise Virtualization Manager.
Attaching NFS Storage
An NFS type Storage Domain is a mounted NFS share that is attached to a data center. It is used to provide storage for virtualized guest images and ISO boot media. Once NFS storage has been exported it must be attached to the Red Hat Enterprise Virtualization Manager, using the Administration Portal.
To add an NFS data, or export, storage domain you must select an NFS data center. NFS storage domains for ISO storage are able to be added to data centers of any type.
  1. Click the Storage tab. The Storage list and toolbar display.
  2. Click New Domain.
  3. The New Storage dialog box displays.
    NFS Storage

    Figure 3.5. NFS Storage


  4. Configure the following options:
    Name: Enter a suitably descriptive name.
    Data Center: Select the required Data Center from the drop-down list.
    Domain Function/ Storage Type: In the drop down menu, select Data → NFS. The storage domain types which are not compatible with the Default data center are grayed out. After you select your domain type, the Export Path field appears.
    Export path: Enter the IP address or a resolvable hostname of the chosen host. The export path should be in the format of 192.168.0.10:/Images/ISO or domain.example.com:/Images/ISO
    Use Host: Select any of the hosts from the drop down menu. Only hosts which belong in the pre-selected data center will display in this list.

    Active Host Required

    All communication to the storage domain is via the selected host and not directly from the Red Hat Enterprise Virtualization Manager. At least one active host must exist in the system, and be attached to the chosen data center, before the storage is configured.
  5. Click OK.
Result:
The new NFS data domain displays on the Storage tab. It will remain with a Locked status while it is being prepared for use. When ready, it is automatically attached to the data center.
3.1.2.1.2. Adding iSCSI Storage
Red Hat Enterprise Virtualization platform supports iSCSI storage via the creation of a Storage Domain for a Volume Group. A Volume Group is a set of pre-defined Logical Unit Numbers (LUNs). Red Hat Enterprise Virtualization supports creation of a Storage Domain from a pre-existent Volume Group or a set of LUNs. Neither Volume Groups nor LUNs are able to be attached to more than one Storage Domain at a time.
For information regarding the setup and configuration of iSCSI on Red Hat Enterprise Linux, see the Red Hat Enterprise Linux — Storage Administration Guide.
  1. On the tree pane, select the Tree tab. On System, click the + icon to display the available data centers.
  2. Select the Data Center to which the domain is to be added. The storage type of the data center selected determines the type of storage domains that can be added to it. To add an iSCSI data, or export, storage domain you must select an iSCSI data center. iSCSI storage domains can not be used for ISO storage domains.
  3. Click the New Domain button.
  4. Click New Storage. The New Storage dialog box displays.
  5. From the Domain Function / Storage Type drop-down menu, select the appropriate storage type for the storage domain. The storage domain types that are not compatible with the chosen data center are not available.
  6. Select an active host in the Use host field. To attach a domain, the name of an active host must be selected from the list of existing hosts. Only hosts that are attached to the selected Data Center are listed.

    Active Host Required

    All communication to the storage domain is via the selected host and not directly from the Red Hat Enterprise Virtualization Manager. At least one active host must exist in the system, and be attached to the chosen data center, before the storage is configured.
  7. The Red Hat Enterprise Virtualization Manager is able to map either iSCSI targets to LUNs, or LUNs to iSCSI targets. The New Domain dialog automatically displays known targets with unused LUNs when iSCSI is selected as the storage type. If the target that you are adding storage from is not listed then you can use target discovery to find it, otherwise proceed to the next step.
    New Domain Dialog

    Figure 3.6. New Domain Dialog


    iSCSI Target Discovery

    • Click Discover Targets to enable target discovery options. The New Domain dialog automatically displays targets with unused LUNs when iSCSI is selected as the storage type. If the target that you are adding is not listed, click Discover Targets to enable target discovery options.
    • Enter the fully qualified domain name or IP address of the iSCSI host in the Address field.
    • Enter the port to connect to the host on when browsing for targets in the Port field. The default is 3260.
    • If the Challenge Handshake Authentication Protocol (CHAP) is being used to secure the storage, select the User Authentication check box. Enter the CHAP user name and password.
    • Click the Discover button.
  8. Click the + button next to the desired target. This will expand the entry and display all unused LUNs attached to the target.
    iSCSI LUN Selection

    Figure 3.7. iSCSI LUN Selection


  9. Select the check box for each LUN that you are using to create the storage domain.
  10. Click OK to create the storage domain.
Result:
The new iSCSI storage domain displays on the storage tab. This will take some time.
3.1.2.1.2.1. Mapping iSCSI Targets to LUNs
Follow the below mentioned procedure:
  1. Click the + button next to the desired target.
  2. Select the check box for each LUN that you are using to create the storage domain.
  3. Click OK.
Result:
The new storage domain is created.
3.1.2.1.3. Adding FCP Storage
Red Hat Enterprise Virtualization platform supports SAN storage via the creation of a Storage Domain for a Volume Group. A Volume Group is a set of pre-defined Logical Unit Numbers (LUNs). Red Hat Enterprise Virtualization supports creation of a Storage Domain from a pre-defined Volume Group or a set of LUNs. Neither Volume Groups nor LUNs are able to be attached to more than one Storage Domain at a time.
Red Hat Enterprise Virtualization system administrators need a working knowledge of Storage Area Networks (SAN) concepts. SAN usually uses Fibre Channel Protocol (FCP) for traffic between hosts and shared external storage. For this reason, SAN may occasionally be referred to as FCP storage.
For information regarding the setup and configuration of FCP or multipathing on Red Hat Enterprise Linux, please refer to the Storage Administration Guide and DM Multipath Guide.

Procedure 3.1. To Add FCP Storage:

  1. Click the Storage tab. The Storage list and toolbar display.
  2. Click New Domain.
  3. The New Domain dialog box displays.
    Adding FCP Storage

    Figure 3.8. Adding FCP Storage


  4. Configure the following options:
    1. Name: Enter a suitably descriptive name.
    2. Data Center: Select the required Data Center from the drop-down list.
    3. Domain Function/ Storage Type: Select FCP.
    4. Use Host: Select the IP address of either the hypervisor or Red Hat Enterprise Linux host.

      Active Host Required

      All communication to the storage domain is via the selected host and not directly from the Red Hat Enterprise Virtualization Manager. At least one active host must exist in the system, and be attached to the chosen data center, before the storage is configured.
    5. The list of existing LUNs display. On the selected LUN, select the Add LUN check box to use it as the FCP data domain.
  5. Click OK.
Result:
The new FCP data domain displays on the Storage tab. It will remain with a Locked status while it is being prepared for use. When ready, it is automatically attached to the data center. Select either Build New Domain or Use Existing Volume Group.
3.1.2.1.4. Adding Local Storage
A local storage domain can be set up on a host, to be used as a data domain for a data center and cluster that contains only a single host. Virtual machines created in a single host cluster cannot be migrated, fenced or scheduled.
Preparing local storage
This section outlines how to set up a local directory with recommended settings.
  • On a Red Hat Enterprise Virtualization Hypervisor host, set up the path for the local storage as /data/images. This is the only path permitted for a Red Hat Enterprise Virtualization Hypervisor.
  • On a Red Hat Enterprise Linux host, set up the path for local storage in the /data directory. Any path is permitted on a Red Hat Enterprise Linux host. Follow these instructions to add local storage:
  1. Click the Storage tab. The Storage list and toolbar display.
  2. Click New Domain. The New Domain dialog box displays.
  3. Enter the Name of the domain. A suitably descriptive name is recommended.
  4. Select the Data option as the Domain Type for the data center.
  5. Select the Storage Type for the domain. Select Local from:
    • NFS
    • iSCSI
    • FCP
    • Local
  6. Select the local host in the Use host field. This must be the host on which the local storage is set up.
  7. Enter the Path of the storage. For example, data/images or data/localimages.
  8. Click OK.
  9. The local storage domain displays on the Storage tab. This may take a few moments.
3.1.2.1.5. Example - Adding a Multipath Storage Domain
This example describes how to set up an multipath iSCSI storage domain for Red Hat Enterprise Virtualization Manager. Multipathing is inherently supported in Red Hat Enterprise Virtualization Manager. In this example, each iSCSI path must be defined manually. To do this, enter an IP for every port that the iSCSI SAN has. If only a single IP is provided, only a single path to the iSCSI target will be used.

To Add Multipathed iSCSI Storage:

  1. Click the Storage tab. The Storage list and toolbar display.
  2. Click New Domain. The New Domain dialog box displays.
  3. Enter the Name of the storage domain.
  4. Enter the Domain function of the storage domain, as Data, ISO or Export.
  5. Select iSCSI as the Storage Type. The dialog box displays a set of fields appropriate to the iSCSI type.
    Adding iSCSI Storage

    Figure 3.9. Adding iSCSI Storage


  6. Select a host in the Use host field. To attach a domain, the name of any active host must be selected from the list.

    Active Host Required

    All communication to the storage domain is via the active host and not from the Red Hat Enterprise Virtualization Manager. At least one host must exist in the system before the storage can be configured.
  7. Select either Build New Domain or Use Preconfigured Volume Group. In this step you can either attach a set of LUNs (create a volume group) or attach an already existing Volume Group as your storage domain. This example shows you how to build a new domain using a set of LUNs.
  8. If necessary, to search for LUNs, click the Connect to Target button.
  9. The Connect to Targets dialog box displays, enabling you to define a target on which to search for LUNs. Enter the requisite information in the fields.
    1. Enter the IP Address of the iSCSI target.
    2. Enter the Port to connect to, or leave it as the default port.
    3. If required, enter the details for User Authentication.
    4. Click the Discover button to find the targets.
    5. The targets display in the list of Discovered Targets.
    6. Click to either Login to All targets, or Add targets manually. If adding manually, select the LUNs (Logical Unit Numbers) from the list, and click the Login to login.
    7. Click OK. The Connect to Targets dialog box closes and the LUNs display in the New Domain dialog box.
  10. A list of LUNs display in the list of Discovered LUNs. Note that the Multipathing column will display a number to indicate the number of paths available to each LUN on the target. Click the check box of the LUNs to select for addition.
    Adding Multipathed Storage

    Figure 3.10. Adding Multipathed Storage


  11. Click the Add button to use the LUNs as a storage domain.
  12. The LUNs selected in the previous step display in the Selected LUNs grid. The set of LUNs in this list will be assigned to the new storage domain. Use the Remove button to remove LUNs from the Selected LUNs if necessary.
  13. Click OK to attach the selected LUNs to the iSCSI storage domain.

3.1.2.2. Attaching Storage Domains to a Data Center

In the previous step, storage domains were created in preparation for attachment to the data center. A data center must have at least one storage domain in order to be activated. This section describes the steps to attach the data domain for virtualized disk images and subsequently the steps to attach an ISO image storage domain to a specific data center.
3.1.2.2.1. Attaching Disk Image Storage
A storage domain must be allocated to a data center to store the disk images and data of virtual machines.

To attach a data domain:

  1. Click the Data Centers tab. Select the data center to which the storage is to be attached. If the required data center is not displayed, perform a search (see Section 1.2, “Search”).
  2. The Details pane of the selected data center displays. Select the Storage tab.
    Data Center Storage Tab

    Figure 3.11. Data Center Storage Tab


  3. Click the Attach Domain button to add the storage location where the data and disk images are stored.
  4. The Attach Storage Domain dialog box displays.
  5. Select the domain from the Storage Domain list. The names of any existing storage domains, of the type appropriate for the data center display in the list. For example, if the default data center has a storage type of NFS, only existing NFS storage domains display in the list, because only NFS storage domain types can be attached to this particular data center.
  6. Click OK. The new storage domain displays on the Storage tab of the Details pane.
3.1.2.2.2. ISO Uploader
The Red Hat Enterprise Virtualization Manager installation includes a tool for uploading ISO images to the ISO storage domain. This tool is referred to as the ISO uploader. It provides for the listing of storage domains and uploading of ISO files to them.
The ISO uploader command is rhevm-iso-uploader. You must be logged in as the root user to run it successfully. You must provide the administration credentials for the Red Hat Enterprise Virtualization environment on the command line. Full usage information, including a list of all valid options for the command, is available by running the rhevm-iso-uploader -h command.
3.1.2.2.2.1. Syntax
The basic syntax is of the form:
Usage: rhevm-iso-uploader [options] list
       rhevm-iso-uploader [options] upload [file].[file]...[file]
The two supported modes of operation are list, and upload.
  • The list parameter lists the available ISO storage domains. These storage domains are the valid targets for ISO uploads. By default the list is obtained from the Red Hat Enterprise Virtualization Manager installation on the local machine.
  • The upload parameter uploads the selected ISO file(s) to the specified ISO storage domain. By default the transfer is performed using NFS however SSH is also available.
Basic ISO uploader usage requires that, at a minimum, the either the list or upload parameter is provided. Where upload is selected then the name of at least one local file to upload must also be provided.
The rhevm-iso-uploader command has a large number of options.

General Options

--version
Displays the version number of the command in use, and exits immediately.
-h, --help
Displays command usage information, and exits immediately.
--quiet
Sets quiet mode, reducing console output to a minimum. This is off by default.
--log-file=PATH
Sets PATH as the log file the command should use for its own log output.
--conf-file=PATH
Sets PATH as the configuration file the command should use.
-v, --verbose
Sets verbose mode, providing more console output. This is off by default.
-f, --force
Where the source file being uploaded has the same file name as an existing file at the destination, force the existing file to be overwritten automatically. This is off by default.

Red Hat Enterprise Virtualization Manager Options

The options in the Red Hat Enterprise Virtualization Manager configuration group are used to specify the manager authentication details and, filter log collection from one or more virtualization hosts. If no options in this group are specified, data is not collected from any virtualization host.
-u USER, --user=USER
Sets the user as USER. This must be a user that exists in directory services, and is known to the Red Hat Enterprise Virtualization Manager. The user must be specified in the format user@domain, where user replaced by the username, and domain is replaced by the directory services domain in use.
-r FQDN, --rhevm=FQDN
Sets the Red Hat Enterprise Virtualization Manager to connect to as FQDN. FQDN must be replaced by the fully qualified domain name of the manager. By default it is assumed that the ISO uploader is being run on the same machine as the manager. Therefore the default value for this parameter is localhost.

ISO Storage Domain Options

The options in this configuration group are used to specify the ISO domain to which files must be uploaded
-i, --iso-domain=ISODOMAIN
Sets the storage domain named ISODOMAIN as the destination for uploads.
-n, --nfs-server=NFSSERVER
Sets the NFS path of NFSSERVER as the destination for uploads. This option is an alternative to --iso-domain, the two must not be used at the same time.

Example 3.1. Specifying an NFS Server

# rhevm-iso-uploader --nfs-server=storage.demo.redhat.com:/iso/path upload RHEL6.0.iso

Connection Options

By default the ISO uploader uses NFS to upload files. Use options within this configuration group to use SSH file transfer instead.
--ssh-user=USER
Sets USER as the SSH username to use for the upload.
--ssh-port=PORT
Sets PORT as the port to use when connecting to SSH.
-k KEYFILE, --key-file=KEYFILE
Sets KEYFILE as the public key to use for SSH authentication. If no key is set the program will prompt you to enter the password of the user specified instead.
3.1.2.2.2.2. Examples

Example 3.2. Basic ISO Uploader Usage

In this example the ISO uploader is run to list the available ISO storage domains. The username is not provided on the command line so the tool instead prompts for it to be entered. Once the storage domains have been listed, an ISO file is uploaded to one of them over NFS.
# rhevm-iso-uploader list
Please provide the REST API username for RHEV-M (CTRL+D to abort): admin@directory.demo.redhat.com
Please provide the REST API password for RHEV-M (CTRL+D to abort): 
ISO Storage Domain List:
  ISODomain
# rhevm-iso-uploader --iso-domain=ISODomain upload RHEL6.iso
Please provide the REST API username for RHEV-M (CTRL+D to abort): admin@directory.demo.redhat.com
Please provide the REST API password for RHEV-M (CTRL+D to abort):

3.1.2.2.3. Attaching an Export Storage Domain
An export domain can be attached to a data center to enable the import or export of virtual machines from one data center to another. Export domains created for a Red Hat Enterprise Virtualization 3.0 environment must be NFS based. However, export domains of other types from older environments can be imported into a 3.0 environment. An export domain can also be used to backup virtual machines and templates. To import an existing export domain, refer Import Existing ISO or Export Storage Domain.

Note

At a given time, an export domain can only be attached to a single data center.

To attach an export domain:

  1. Click the Data Centers tab.
    Select the data center to which the export domain is to be attached.
  2. The Details pane displays. Select the Storage tab.
  3. Click the Attach Export button to add the storage location where the images are stored.
  4. The Attach Export Domain dialog box displays, if there are export domains available.
    Attach Export Domain Dialog Box

    Figure 3.12. Attach Export Domain Dialog Box


  5. Select the export domain from the list.
  6. Click the OK. The new export domain displays on the Storage tab of the Details pane, with a status of Locked, followed by Inactive.
  7. Select the new export domain on the Storage tab of the Details pane, and click the Activate button.
  8. The export domain will be activated in a few moments and display an Active status.

3.1.3. Storage Entities

The Storage Pool Manager
The Storage Pool Manager (SPM) entity coordinates all the metadata changes across the data center. This includes creating, deleting and manipulating virtual disks (Images), snapshots, and templates, and allocating storage for sparse block devices (on SAN). The SPM entity can be run on any host in the data center, and it is the Manager's task to grant the role to one of the hosts. All hosts in a data center must have access to all the storage domains defined in the data center. The SPM entity controls access to storage, by coordinating the metadata across the storage domains.
Red Hat Enterprise Virtualization Manager ensures that the SPM is always available. If errors occur, the Manager will try to move the SPM role to a different host. This means that if the host that is running as the SPM has problems accessing the storage, the Manager will automatically check if there is another available host that can access the storage and will move the SPM over to that host. When the SPM starts, it tries to ensure that it is the only host that was granted the role, therefore it will acquire a storage-centric lease. This process can take some time.
Multipathing
Multipathing is supported in Red Hat Enterprise Virtualization Manager by default. Setting up a multipathed storage domain is described later in this section. To configure multipathing for Red Hat Enterprise Virtualization Hypervisor hosts, see Red Hat Enterprise Linux Hypervisor Deployment Guide.

Warning

Do not add user_friendly_names and LUN aliases to a multipath.conf file on a Red Hat Enterprise Virtualization Hypervisor. user_friendly_names and LUN aliases are not supported and can lead to unpredictable system behavior.

3.1.4. Storage Permissions

3.1.4.1. Managing System Permissions for a Storage Domain

While the superuser or system administrator of the platform has the full range of permissions, a Storage Administrator is a system administration role for a storage domain only. The Storage Administrator role permits the management, creation and removal of their assigned storage domain, and configuration changes to a single storage domain. This is useful in an enterprise where there are multiple storage domains, each of which require their own system administrators. A Storage Administrator has permissions for the assigned storage domain only, not for all storage domains in the enterprise.

To assign a system administrator role to a storage domain:

  1. Click the Storage tab.
    A list of storage domains displays. If the required storage domain is not visible, perform a search (see Section 1.2, “Search”).
  2. Select the storage domain that you want to edit, and click the Permissions tab from the Details pane.
    The Permissions tab displays a list of users and their current roles and permissions, if any. The System Administrator of the Red Hat Enterprise Virtualization platform, the Data Center Administrator and the Template Administrator, if existing, will display with inherited permissions.
    Storage Permissions

    Figure 3.13. Storage Permissions


  3. Click Add to add an existing user. The Add Permission to User dialog box displays. Enter a Name, or User Name, or part thereof in the Search text box, and click Go. A list of possible matches display in the results list.
  4. Select the check box of the user to be assigned the permissions. Scroll through the Assign role to user list and select StorageAdmin.
    Assign StorageAdmin Permission

    Figure 3.14. Assign StorageAdmin Permission


  5. Click OK.
    The name of the user displays in the Permissions tab, with an icon and the assigned Role.

Note

You can only assign roles and permissions to existing users. See (see Chapter 5, Users).
You can also change the system administrator of a storage domain, by removing the existing system administrator, and adding the new system administrator, as described in the previous procedure.

To remove a system administrator role:

  1. Click the Data Center tab. A list of storage domains displays. If the required storage domain is not visible, perform a search (see Section 1.2, “Search”).
  2. Select the required storage domain and click the Permissions tab from the Details pane.
    The Permissions tab displays a list of users and their current roles and permissions, if any. The System Administrator of the Red Hat Enterprise Virtualization platform, the Data Center Administrator and the Template Administrator, if existing, will display with inherited permissions. You cannot remove permissions from these users.
  3. Select the check box of the appropriate user.
  4. Click Remove. The user is removed from the Permissions tab.

3.1.5. Storage Troubleshooting

3.1.5.1. Maintaining Storage Domains

This section describes how to maintain storage domains. For example, you may need to do this to balance the load, improve performance for particular applications, or if storage domains are being replaced or retired. You can edit, reactivate and update domains. You can also deactivate domains, and detach them from the cluster and data center. Changing the storage domain properties is a sensitive task as it affects the all the Virtual Machines and Hosts in the Cluster.

Warning

All maintenance tasks need to be approached with extreme care. Proceed with caution before any parameters on a storage domain are changed. Failure to do so may result in the loss of all data and images. There is no guarantee that the images can be recovered.
3.1.5.1.1. Moving Storage Domains to Maintenance Mode
Storage domains in a data center need to be put into maintenance mode in a fixed order. If the data center also has an ISO domain, the ISO domain must be placed into Maintenance mode before you can place the storage domain into maintenance mode.
To move a storage domain into maintenance mode:
  1. Click the Storage tab. The Storage page displays the list of existing storage domains, and the Storage toolbar displays.
    The Storage Tab

    Figure 3.15. The Storage Tab


    If the required storage is not displayed, perform a search (see Section 1.2, “Search”).
  2. Shut down and move all the virtual machines running on the data domain. See Section 6.7.5, “Moving Virtual Machines within a Data Center”.
  3. Select the ISO storage domain, if any, to place in maintenance mode.
  4. On the Details pane, click the Data Center tab. Click the Maintenance button. The ISO storage domain is deactivated, and displays as Inactive in the Storage pane.
  5. Select the data domain to be moved into maintenance mode. If you attempt to move a data storage domain into maintenance mode while the ISO domain is still active, a message appears prompting you to deactivate other data domains.
  6. On the Details pane, click the Data Center tab. Click the Maintenance button. The data storage domain is deactivated, and appears as Inactive in the Storage pane.
You can now edit, detach, remove or reactivate the inactive storage domains from the data-center.

Note

You can also activate, detach and place domains into maintenance mode using the Storage tab on the Details pane of the data center it is associated with.
3.1.5.1.2. Editing Storage Domains
Inactive or Active storage domains in a data center may need to be modified in a dynamically changing environment.

Warning

All maintenance tasks need to be approached with extreme caution. Proceed with caution before any parameters on a storage domain are changed. Failure to do so may result in the loss of all data and images. There is no guarantee that the images can be recovered.

To Edit Storage Domains:

  1. Click the Storage tab. The Storage page displays the list of existing storage domains, and the Storage toolbar displays.
    The Storage Tab

    Figure 3.16. The Storage Tab


  2. Select the required storage domain. Ensure that it is in Maintenance mode.
    If the required storage is not displayed, perform a search (see Section 1.2, “Search”).
  3. Click Edit on the Storage toolbar. The Edit Storage Domain dialog box displays. Depending on the status of the domain, some or all fields in the dialog box are enabled. The Edit Storage Domain dialog box contains the same fields as the New Storage dialog box. See Figure 3.2, “Adding New Storage”.
  4. Change the required fields and click OK.
  5. You can now activate the storage and check the validity of the configuration. See Section 3.1.2.2, “Attaching Storage Domains to a Data Center”

Note

You can also activate, detach and place domains into maintenance mode using the Storage tab on the Details pane of the data center it is associated with.
3.1.5.1.3. Activating Storage Domains
Inactive storage domains in a data center need to be reactivated before they can be used. At least one data storage domain must be activated before the ISO domain can be activated, if an ISO domain exists.
To activate storage domains:
  1. Click the Storage tab. The Storage page displays the list of existing storage domains, and the Storage toolbar displays.
    An Inactive Domain

    Figure 3.17. An Inactive Domain


  2. Select an inactive data storage domain.
    If the required storage is not displayed, perform a search (see Section 1.2, “Search”).
  3. On the Details pane, click the Data Center tab.
    Click Activate button on the toolbar. The domain is activated, and displays as Active in the Storage pane.

    Important

    If you attempt to activate the ISO domain before activating the data domain, an error message displays, and the domain is not activated.

Note

You can also activate, detach and place domains into maintenance mode using the Storage tab on the Details pane of the data center it is associated with.

3.1.5.2. Deleting Storage Domains

This section describes how to delete storage domains from a data center. For example, you may need to do this if storage domains are being replaced or retired. There are two ways to do this, you can choose to detach storage from a particular data center, or you may choose to remove it altogether from the system. Storage domains cannot be removed or detached if any virtual machines that reside on it are running.

Warning

Deleting storage domains is an irreversible process. Proceed with caution before any storage domains are detached or removed. All images on the storage domain are irreversibly lost on detachment and removal of a storage domain.
3.1.5.2.1. Detaching Storage Domains from a Data Center
The space available on storage domains that are merely detached from a data center remain available to be reassigned later, or assigned to other data centers. After detachment the domain will still appear in the lists of assigned or unassigned storage domains.
To detach a storage domain from a data center:
  1. Click the Storage tab. The Storage page displays the list of existing storage, and the Details pane displays.
  2. Select the storage domain to be detached. Ensure that no virtual machines are running on the domain.
  3. Move the storage domain into Maintenance mode. See Section 3.1.5.1, “Maintaining Storage Domains”.
  4. On the Details pane, click the Data Centers tab.
  5. Click Detach button on the Storage toolbar.
    The Detach Storage dialog box displays a list of the domains selected for detachment.
    The Detach Storage Dialog Box

    Figure 3.18. The Detach Storage Dialog Box


  6. The detached storage domain displays in the list of storage domains with a status of Detached.

Note

To check if the storage location is still available, use the Attach Domain or Add ISO button on the Storage tab in the Details pane of the data center to attach the domain again, if necessary. Refer Section 3.1.2.2, “Attaching Storage Domains to a Data Center”.
3.1.5.2.2. Removing Storage Domains
Storage domains that are removed from a data center are also deleted from the system. After deletion they no longer display in the lists of storage domains, for example in the Add Storage Domain dialog box.
Storage domains that are removed from the system must be fully reconfigured before they can be reused.

Warning

Proceed with caution before any storage domains are detached or removed. All images on the storage domain are irreversibly lost on detachment and removal of a storage domain.

To remove a storage domain:

  1. Click the Storage tab. The Storage page displays the list of existing storage domains, and the Storage toolbar displays.
  2. Select the storage domain to be removed. Ensure that no virtual machines are running on the domain.
  3. Move the domain into Maintenance mode to deactivate it. See Section 3.1.5.1.1, “Moving Storage Domains to Maintenance Mode”.
  4. Click Remove on the Storage Tool bar.
  5. The Remove Storage dialog box displays prompting you to confirm removal, and select the host to be used to effect the removal. Select a host from the list box.
    Remove Storage Dialog Box

    Figure 3.19. Remove Storage Dialog Box


  6. Click OK. The storage domain is permanently removed from the system.
  7. Click the Storage tab. The deleted storage domain no longer displays in the list of storage domains.

Note

To check that the deleted storage domain is no longer available, use the Add Storage Domain button on the Storage toolbar. Refer Section 3.1.2.1, “Adding Storage Domains to a Data Center”. For information regarding the setup and configuration of FCP or multipathing on Red Hat Enterprise Linux, please refer to the Storage Administration Guide and DM Multipath Guide.