Red Hat Training

A Red Hat training course is available for Red Hat Virtualization

8.6. Importing Existing Storage Domains

8.6.1. Overview of Importing Existing Storage Domains

In addition to adding new storage domains that contain no data, you can also import existing storage domains and access the data they contain. The ability to import storage domains allows you to recover data in the event of a failure in the Manager database, and to migrate data from one data center or environment to another.
The following is an overview of importing each storage domain type:
Data
Importing an existing data storage domain allows you to access all of the virtual machines and templates that the data storage domain contains. After you import the storage domain, you must manually import virtual machines, floating disk images, and templates into the destination data center. The process for importing the virtual machines and templates that a data storage domain contains is similar to that for an export storage domain. However, because data storage domains contain all the virtual machines and templates in a given data center, importing data storage domains is recommended for data recovery or large-scale migration of virtual machines between data centers or environments.

Important

You can import existing data storage domains that were attached to data centers with a compatibility level of 3.5 or higher.
ISO
Importing an existing ISO storage domain allows you to access all of the ISO files and virtual diskettes that the ISO storage domain contains. No additional action is required after importing the storage domain to access these resources; you can attach them to virtual machines as required.
Export
Importing an existing export storage domain allows you to access all of the virtual machine images and templates that the export storage domain contains. Because export domains are designed for exporting and importing virtual machine images and templates, importing export storage domains is recommended method of migrating small numbers of virtual machines and templates inside an environment or between environments. For information on exporting and importing virtual machines and templates to and from export storage domains, see Exporting and Importing Virtual Machines and Templates in the Virtual Machine Management Guide.

Note

The export storage domain is deprecated. Storage data domains can be unattached from a data center and imported to another data center in the same environment, or in a different environment. Virtual machines, floating virtual disk images, and templates can then be uploaded from the imported storage domain to the attached data center.

8.6.2. Importing Storage Domains

Import a storage domain that was previously attached to a data center in the same environment or in a different environment. This procedure assumes the storage domain is no longer attached to any data center in any environment, to avoid data corruption. To import and attach an existing data storage domain to a data center, the target data center must be initialized.

Procedure 8.11. Importing a Storage Domain

  1. Click the Storage resource tab.
  2. Click Import Domain.
    The Import Pre-Configured Domain window

    Figure 8.7. The Import Pre-Configured Domain window

  3. Select the data center to which to attach the storage domain from the Data Center drop-down list.
  4. Enter a name for the storage domain.
  5. Select the Domain Function and Storage Type from the appropriate drop-down lists.
  6. Select a host from the Use host drop-down list.

    Important

    All communication to the storage domain is through the selected host and not directly from the Red Hat Virtualization Manager. At least one active host must exist in the system and be attached to the chosen data center. All hosts must have access to the storage device before the storage domain can be configured.
  7. Enter the details of the storage domain.

    Note

    The fields for specifying the details of the storage domain change in accordance with the value you select in the Domain Function / Storage Type list. These options are the same as those available for adding a new storage domain. For more information on these options, see Section 8.1, “Understanding Storage Domains”.
  8. Select the Activate Domain in Data Center check box to activate the storage domain after attaching it to the selected data center.
  9. Click OK.
The storage domain is imported, and is displayed in the Storage tab. You can now import virtual machines and templates from the storage domain to the data center.

8.6.3. Migrating Storage Domains between Data Centers in the Same Environment

Migrate a storage domain from one data center to another in the same Red Hat Virtualization environment to allow the destination data center to access the data contained in the storage domain. This procedure involves detaching the storage domain from one data center, and attaching it to a different data center.

Procedure 8.12. Migrating a Storage Domain between Data Centers in the Same Environment

  1. Shut down all virtual machines running on the required storage domain.
  2. Click the Storage resource tab and select the storage domain from the results list.
  3. Click the Data Center tab in the details pane.
  4. Click Maintenance, then click OK to move the storage domain to maintenance mode.
  5. Click Detach, then click OK to detach the storage domain from the source data center.
  6. Click Attach.
  7. Select the destination data center and click OK.
The storage domain is attached to the destination data center and is automatically activated. You can now import virtual machines and templates from the storage domain to the destination data center.

8.6.4. Migrating Storage Domains between Data Centers in Different Environments

Migrate a storage domain from one Red Hat Virtualization environment to another to allow the destination environment to access the data contained in the storage domain. This procedure involves removing the storage domain from one Red Hat Virtualization environment, and importing it into a different environment. To import and attach an existing data storage domain to a Red Hat Virtualization data center, the storage domain's source data center must have a compatibility level of 3.5 or higher.

Procedure 8.13. Migrating a Storage Domain between Data Centers in Different Environments

  1. Log in to the Administration Portal of the source environment.
  2. Shut down all virtual machines running on the required storage domain.
  3. Click the Storage resource tab and select the storage domain from the results list.
  4. Click the Data Center tab in the details pane.
  5. Click Maintenance, then click OK to move the storage domain to maintenance mode.
  6. Click Detach, then click OK to detach the storage domain from the source data center.
  7. Click Remove.
  8. In the Remove Storage(s) window, ensure the Format Domain, i.e. Storage Content will be lost! check box is not selected. This step preserves the data in the storage domain for later use.
  9. Click OK to remove the storage domain from the source environment.
  10. Log in to the Administration Portal of the destination environment.
  11. Click the Storage resource tab.
  12. Click Import Domain.
    The Import Pre-Configured Domain window

    Figure 8.8. The Import Pre-Configured Domain window

  13. Select the destination data center from the Data Center drop-down list.
  14. Enter a name for the storage domain.
  15. Select the Domain Function and Storage Type from the appropriate drop-down lists.
  16. Select a host from the Use Host drop-down list.
  17. Enter the details of the storage domain.

    Note

    The fields for specifying the details of the storage domain change in accordance with the value you select in the Storage Type drop-down list. These options are the same as those available for adding a new storage domain. For more information on these options, see Section 8.1, “Understanding Storage Domains”.
  18. Select the Activate Domain in Data Center check box to automatically activate the storage domain when it is attached.
  19. Click OK.
The storage domain is attached to the destination data center in the new Red Hat Virtualization environment and is automatically activated. You can now import virtual machines and templates from the imported storage domain to the destination data center.

8.6.5. Importing Virtual Machines from Imported Data Storage Domains

Import a virtual machine from a data storage domain you have imported into your Red Hat Virtualization environment. This procedure assumes that the imported data storage domain has been attached to a data center and has been activated.

Procedure 8.14. Importing Virtual Machines from an Imported Data Storage Domain

  1. Click the Storage resource tab.
  2. Click the imported data storage domain.
  3. Click the VM Import tab in the details pane.
  4. Select one or more virtual machines to import.
  5. Click Import.
  6. Select the cluster into which the virtual machines are imported from the Cluster list.
  7. Click OK.
You have imported one or more virtual machines into your environment. The imported virtual machines no longer appear in the list under the VM Import tab.

8.6.6. Importing Templates from Imported Data Storage Domains

Import a template from a data storage domain you have imported into your Red Hat Virtualization environment. This procedure assumes that the imported data storage domain has been attached to a data center and has been activated.

Procedure 8.15. Importing Templates from an Imported Data Storage Domain

  1. Click the Storage resource tab.
  2. Click the imported data storage domain.
  3. Click the Template Import tab in the details pane.
  4. Select one or more templates to import.
  5. Click Import.
  6. Select the cluster into which the templates are imported from the Cluster list.
  7. Click OK.
You have imported one or more templates into your environment. The imported templates no longer appear in the list under the Template Import tab.

8.6.7. Importing a Disk Image from an Imported Storage Domain

Import floating virtual disks from an imported storage domain using the Disk Import tab of the details pane.

Note

Only QEMU-compatible disks can be imported into the Manager.

Procedure 8.16. Importing a Disk Image

  1. Select a storage domain that has been imported into the data center.
  2. In the details pane, click Disk Import.
  3. Select one or more disk images and click Import to open the Import Disk(s) window.
  4. Select the appropriate Disk Profile for each disk.
  5. Click OK to import the selected disks.

8.6.8. Importing an Unregistered Disk Image from an Imported Storage Domain

Import floating virtual disks from a storage domain using the Disk Import tab of the details pane. Floating disks created outside of a Red Hat Virtualization environment are not registered with the Manager. Scan the storage domain to identify unregistered floating disks to be imported.

Note

Only QEMU-compatible disks can be imported into the Manager.

Procedure 8.17. Importing a Disk Image

  1. Select a storage domain that has been imported into the data center.
  2. Right-click the storage domain and select Scan Disks so that the Manager can identify unregistered disks.
  3. In the details pane, click Disk Import.
  4. Select one or more disk images and click Import to open the Import Disk(s) window.
  5. Select the appropriate Disk Profile for each disk.
  6. Click OK to import the selected disks.