3.4. Upgrading to RHVH While Preserving Local Storage
Environments with local storage cannot migrate virtual machines to a host in another cluster (for example when upgrading to version 4.0) because the local storage is not shared with other storage domains. To upgrade RHEV-H 3.6 hosts that have a local storage domain, reinstall the host while preserving the local storage, create a new local storage domain in the 4.0 environment, and import the previous local storage into the new domain.
This process is based on the assumption that the Red Hat Virtualization Manager is version 4.0, and the compatibility level of the data center and cluster to which the host belongs is currently 3.6.
Procedure 3.2. Upgrading to RHVH While Preserving Local Storage
- Ensure the RHEV-H host's local storage is in maintenance mode before starting this process:
- Open the Data Centers tab.
- Click the Storage tab in the details pane and select the storage domain in the results list.
- Click Maintenance.
- Reinstall the Red Hat Virtualization Host, as described in Installing Red Hat Virtualization Host in the Installation Guide.
ImportantWhen selecting the device on which to install RHVH from the Installation Destination screen, do not select the device(s) storing the virtual machines. Only select the device where the operating system should be installed.If you are using kickstart to install the host, ensure that you preserve the devices containing the virtual machines by adding the following to the kickstart file, replacing device with the relevant device.
# clearpart --all --drives=deviceFor more information on using kickstart, see Kickstart Syntax Reference in the Red Hat Enterprise Linux 7 Installation Guide.
- On the reinstalled host, create a directory, for example
/datain which to recover the previous environment.
# mkdir /data
- Mount the previous local storage in the new directory. In our example,
/dev/sdX1is the local storage:
# mount /dev/sdX1 /data
- Set the following permissions for the new directory.
# chown -R 36:36 /data # chmod -R 0755 /data
- Red Hat recommends that you also automatically mount the local storage via /
etc/fstabin case the server requires a reboot:
# blkid | grep -i sdX1 /dev/sdX1: UUID="a81a6879-3764-48d0-8b21-2898c318ef7c" TYPE="ext4" # vi /etc/fstab UUID="a81a6879-3764-48d0-8b21-2898c318ef7c" /data ext4 defaults 0 0
- In the Administration Portal, create a data center and select
Localin the Storage Type drop-down menu.
- Configure a cluster on the new data center. See Creating a New Cluster in the Administration Guide for more information.
- Add the host to the Manager. See Adding a Host to the Red Hat Virtualization Manager in the Installation Guide for more information.
- On the host, create a new directory that will be used to create the initial local storage domain. For example:
# mkdir -p /localfs # chown 36:36 /localfs # chmod -R 0755 /localfs
- In the Administration Portal, open the Storage tab and click New Domain to create a new local storage domain.Define
localfsas the Name and
/localfsas the Path.
- Once the local storage is
Active, select Import Domain and define the domain's details.For example, define
Dataas the Name,
Local on Hostas the Storage Type and
/dataas the Path.
- Click OK to confirm the message that appears informing you that storage domains are already attached to the data center.
- Activate the new storage domain:
- Open the Data Centers tab.
- Click the Storage tab in the details pane and select the new
Datastorage domain in the results list.
- Click Activate.
- Once the new storage domain is
Active, import the virtual machines and their disks:
- In the Storage tab, select
- Select the VM Import tab in the details pane, select the virtual machine(s) and click Import. See Importing Virtual Machines from Imported Data Storage Domains in the Administration Guide for more details.
- Once you have ensured that all virtual machines have been successfully imported and are functioning properly, you can move
localfsto maintenance mode.
- Click the Storage tab and select
localfsfrom the results list.
- Click the Data Center tab in the details pane.
- Click Maintenance, then click OK to move the storage domain to maintenance mode.
- Click Detach to open the Detach Storage confirmation window.
- Click OK.
You have now successfully upgraded the host to version 4.0, created a new local storage domain, and imported the 3.6 storage domain and its virtual machines.