11.7. Importing Existing Storage Domains 11.7.1. Overview of Importing Existing Storage Domains Aside from adding new storage domains, which contain no data, you can import existing storage domains and access the data they contain. By importing storage domains, you can recover data in the event of a failure in the Manager database, and 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 the correct supported compatibility level. See Supportability and constraints regarding importing Storage Domains and Virtual Machines from older RHV versions for more information. 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 disks, and templates can then be uploaded from the imported storage domain to the attached data center. Warning Upon attaching a Storage Domain to the destination Data-Center, it may be upgraded to a newer Storage Domain format and may not re-attach to the source Data-Center. This breaks the use of a Data-Domain as a replacement for Export Domains. 11.7.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 Click Storage Domains . Click Import Domain . Select the Data Center you want to import the storage domain to. Enter a Name for the storage domain. Select the Domain Function and Storage Type from the drop-down lists. Select a host from the 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. Enter the details of the storage domain. Note The fields for specifying the details of the storage domain change depending on the values you select in the Domain Function and Storage Type lists. These fields are the same as those available for adding a new storage domain. Select the Activate Domain in Data Center check box to activate the storage domain after attaching it to the selected data center. Click OK . You can now import virtual machines and templates from the storage domain to the data center. Warning Upon attaching a Storage Domain to the destination Data-Center, it may be upgraded to a newer Storage Domain format and may not re-attach to the source Data-Center. This breaks the use of a Data-Domain as a replacement for Export Domains. Related information Section 11.7.5, "Importing Virtual Machines from Imported Data Storage Domains" Section 11.7.6, "Importing Templates from Imported Data Storage Domains" 11.7.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 Shut down all virtual machines running on the required storage domain. Click Storage Domains . Click the storage domain's name to open the details view. Click the Data Center tab. Click Maintenance , then click OK . Click Detach , then click OK . Click Attach . 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. Warning Upon attaching a Storage Domain to the destination Data-Center, it may be upgraded to a newer Storage Domain format and may not re-attach to the source Data-Center. This breaks the use of a Data-Domain as a replacement for Export Domains. 11.7.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 the correct supported compatibility level. See Supportability and constraints regarding importing Storage Domains and Virtual Machines from older RHV versions for more information. Procedure Log in to the Administration Portal of the source environment. Shut down all virtual machines running on the required storage domain. Click Storage Domains . Click the storage domain's name to open the details view. Click the Data Center tab. Click Maintenance . Important Do not check the Ignore OVF update failure checkbox. The maintenance operation on the storage domain should update the OVF. Click OK . Click Detach , then click OK . Click Remove . 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. Click OK to remove the storage domain from the source environment. Log in to the Administration Portal of the destination environment. Click Storage Domains . Click Import Domain . Select the destination data center from the Data Center drop-down list. Enter a name for the storage domain. Select the Domain Function and Storage Type from the appropriate drop-down lists. Select a host from the Host drop-down list. Enter the details of the storage domain. Note The fields for specifying the details of the storage domain change depending on the value you select in the Storage Type drop-down list. These fields are the same as those available for adding a new storage domain. Select the Activate Domain in Data Center check box to automatically activate the storage domain when it is attached. 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. Warning Upon attaching a Storage Domain to the destination Data-Center, it may be upgraded to a newer Storage Domain format and may not re-attach to the source Data-Center. This breaks the use of a Data-Domain as a replacement for Export Domains. 11.7.5. Importing Virtual Machines from Imported Data Storage Domains Import a virtual machine into one or more clusters 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 Click Storage Domains . Click the imported storage domain's name to open the details view. Click the VM Import tab. Select one or more virtual machines to import. Click Import . For each virtual machine in the Import Virtual Machine(s) window, ensure the correct target cluster is selected in the Cluster list. Map external virtual machine vNIC profiles to profiles that are present on the target cluster(s): Click vNic Profiles Mapping . Select the vNIC profile to use from the Target vNic Profile drop-down list. If multiple target clusters are selected in the Import Virtual Machine(s) window, select each target cluster in the Target Cluster drop-down list and ensure the mappings are correct. Click OK . If a MAC address conflict is detected, an exclamation mark appears to the name of the virtual machine. Mouse over the icon to view a tooltip displaying the type of error that occurred. Select the Reassign Bad MACs check box to reassign new MAC addresses to all problematic virtual machines. Alternatively, you can select the Reassign check box per virtual machine. Note If there are no available addresses to assign, the import operation will fail. However, in the case of MAC addresses that are outside the cluster's MAC address pool range, it is possible to import the virtual machine without reassigning a new MAC address. Click OK . The imported virtual machines no longer appear in the list under the VM Import tab. 11.7.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 Click Storage Domains . Click the imported storage domain's name to open the details view. Click the Template Import tab. Select one or more templates to import. Click Import . For each template in the Import Templates(s) window, ensure the correct target cluster is selected in the Cluster list. Map external virtual machine vNIC profiles to profiles that are present on the target cluster(s): Click vNic Profiles Mapping . Select the vNIC profile to use from the Target vNic Profile drop-down list. If multiple target clusters are selected in the Import Templates window, select each target cluster in the Target Cluster drop-down list and ensure the mappings are correct. Click OK . Click OK . The imported templates no longer appear in the list under the Template Import tab.

Commands: