4.7. Upgrading RHVH while preserving local storage
Environments with local storage cannot migrate virtual machines to a host in another cluster because the local storage is not shared with other storage domains. To upgrade RHVH 4.3 hosts that have a local storage domain, reinstall the host while preserving the local storage, create a new local storage domain in the 4.4 environment, and import the previous local storage into the new domain.
- Red Hat Virtualization Manager 4.4 is installed and running.
- The compatibility level of the data center and cluster to which the host belongs is set to 4.2 or 4.3.
Ensure that the local storage on the RHVH 4.3 host’s local storage is in maintenance mode before starting this process. Complete these steps:
- 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.Important
When 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=device
For more information on using Kickstart, see Kickstart references in Red Hat Enterprise Linux 8 Performing an advanced RHEL installation.
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 Local in 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 Standard Hosts to the Red Hat Virtualization Manager in one of the Installing Red Hat Virtualization guides 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.
Set the name to
localfsand set the path to
Once the local storage is active, click Import Domain and set the domain’s details. For example, define
Dataas the name,
Local on Hostas the storage type and
/dataas the path.
- Click 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 data storage 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 data.
- Select the VM Import tab in the details pane, select the virtual machines and click Import. See Importing Virtual Machines from a Data Domain in the Virtual Machine Management 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 localfs from the results list.
- Click the Data Center tab in the details pane.
- Click Maintenance, then click to move the storage domain to maintenance mode.
- Click Detach. The Detach Storage confirmation window opens.
- Click .
You have now upgraded the host to version 4.4, created a new local storage domain, and imported the 4.3 storage domain and its virtual machines.
You can now update the cluster compatibility version.