3.4. Upgrading to RHVH While Preserving Local Storage
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.