Bookmark this page

Guided Exercise: Configuring Storage for Virtual Machines and Installation Media

In this exercise, you will explore the existing NFS configuration on utility.lab.example.com and upload an ISO in preparation for installing your first virtual machine.

Outcomes

You should be able to:

  • Verify that NFS is configured correctly on utility.lab.example.com.

  • Upload an ISO file to the existing hosted_storage data storage domain.

Log in to workstation as student using student as the password.

On workstation, run the lab install-storage start command. This command runs a start script that determines if the Red Hat Virtualization environment is configured and working.

[student@workstation ~]$ lab install-storage start
  1. Connect to the utility server to verify its existing NFS configuration:

    1. Use ssh to connect to utility.lab.example.com as the root user:

      [student@workstation ~]$ ssh root@utility
      [root@utility ~]# 
    2. Verify that nfs-server.service is running and enabled:

      [root@utility ~]# systemctl is-active nfs-server.service
      active
      [root@utility ~]# systemctl is-enabled nfs-server.service
      enabled
    3. Identify the active firewalld zones and verify that NFS is allowed. NFS access may be restricted to a specific internal network. In your environment, only the public zone is being used.

      [root@utility ~]# firewall-cmd --get-active-zones
      public
        interfaces: eth0 eth1 eth0.10 eth0.20
      [root@utility ~]# firewall-cmd --list-all --zone=public
      public (active)
        target: default
        icmp-block-inversion: no
        interfaces: eth0 eth1 eth0.10 eth0.20
        sources:
        services: ssh dhcpv6-client tftp dhcp mountd rpc-bind nfs freeipa-ldap freeipa-ldaps dns
        ports: 9090/tcp 3260/tcp
        protocols:
        masquerade: no
        forward-ports:
        source-ports:
        icmp-blocks:
        rich rules:
    4. Identify the currently exported shares:

      [root@utility ~]# exportfs
      /exports/hosted_engine
      		            <world>
      /exports/data   <world>
      /exports/data2  <world>
    5. Confirm user ownership, group ownership, and permissions on the share. The share should be owned by user vdsm (UID 36), group kvm (GID 36), and should have octal permissions of 0755. When you are done, exit the ssh session and return to workstation.

      [root@utility ~]# ls -ld /exports/hosted_engine/
      drwxr-xr-x. 3 vdsm kvm 76 Jul 12 08:05 /exports/hosted_engine/
      [root@utility ~]# exit
      logout
      Connection to utility closed.
      [student@workstation ~]$
  2. Download the RHEL 8 boot ISO file to the /home/student/Downloads directory on workstation in preparation for uploading the file to RHV-M.

    [student@workstation ~]$ wget -P ~/Downloads \
    http://materials.example.com/rhel-8.0-x86_64-boot.iso
    ...output omitted...
    HTTP request sent, awaiting response... 200 OK
    Length: 558891008 (533M) [application/octet-stream]
    Saving to: ‘/home/student/Downloads/rhel-8.0-x86_64-boot.iso’
    ...output omitted...
  3. Use the Administration Portal to verify RHV-M can access the shares previously confirmed on the utility server.

    1. On workstation, open Firefox and navigate to https://rhvm.lab.example.com.

    2. Click the Administration Portal link, and log in as admin using redhat as a password.

    3. View existing storage domains by clicking Storage in the menu and selecting Domains. Locate the row where the Domain Name is hosted_storage, the Domain Type is Data (Master), and the Storage Type is NFS. The green triangle icon indicates that hosted_storage is active and the gold crown icon indicates that hosted_storage contains the hosted engine VM storage data.

    4. View additional details by clicking the hosted_storage link in the Domain Name column. The General tab shows the size of the share and indicates that the path for this share comes from utility.lab.example.com:/exports/hosted_engine.

  4. Use the RHV-M Administration Portal to view networking information for the RHV environment.

    1. In the menu, click NetworkNetworks.

    2. Select the ovirtmgmt link for the Default data center.

    3. On the ovirtmgmt (Default) page, click the Hosts tab. Verify that hosta.lab.example.com, hostb.lab.example.com, hostc.lab.example.com, and hostd.lab.example.com are attached to the ovirtmgmt network.

    4. On the ovirtmgmt (Default) page, click the Clusters tab. Verify that the Default cluster is listed. The icons in the Network Role column indicate that the ovirtmgmt network currently has the roles of Management, Display, Migration, and Default Route. In a later chapter, you will create an additional logical network to segregate migration traffic. Currently, all traffic (including storage traffic) uses the ovirtmgmt logical network.

  5. Use the RHV-M Administration Portal to upload the RHEL 8 boot ISO file.

    1. View existing disks by clicking Storage in the menu and then selecting Disks.

    2. Open the Upload Image wizard by clicking Upload in the upper-right corner and then selecting Start

    3. Select the RHEL 8 boot ISO by clicking the Choose File button. In the File Upload window, click Downloads in the menu and then double-click the rhel-8.0-x86_64-boot.iso file to choose that file. Locate the rhel-8.0-x86_64-boot.iso if it was downloaded to a different location.

    4. In the Upload Image window, verify that Data Center is set to Default and Disk Profile is set to hosted_storage . Accept the default settings for everything else.

    5. In a previous guided exercise, you should have downloaded the ovirt-engine certificate. Click the Test Connection button to verify this. If clicking the Test Connection button returns a green success box, then you are ready to upload. If clicking the Test Connection button returns an orange warning box, click the ovirt-engine certificate link within the warning box. Check the box next to Trust this CA to identify websites and then click the OK button. After you have done this, click the Test Connection button again. It should return a green success box.

      Important

      If you accidentally forget to check the box next to Trust this CA to identify websites, the following procedure will bring up that window again:

      1. Open Preferences for Firefox and then select Privacy & Security in the left menu.

      2. Scroll down to the Security section (at the bottom) and click the View Certificates... button.

      3. In the Certificate Manager window, scroll down to lab.example.com, click rhvm.lab.example.com.34088 so that it is highlighted, and then click the Delete or Distrust button.

      4. Back on the Preferences tab for Privacy & Security, scroll up to the Cookies and Site Data section and then click the Clear Data... button.

      5. Accept the default selections and click the Clear button. Confirm your choice by clicking the Clear Now button in the new window that appears.

    6. Click the OK button to start the upload process.

  6. Verify that the ISO uploaded successfully.

    1. The Disks table should list a disk with an Alias of rhel-8.0-x86_64-boot.iso. Within a few minutes, the disk Status will update to OK.

Finish

On workstation, run the lab install-storage finish script to complete this exercise.

[student@workstation ~]$ lab install-storage finish

This concludes the guided exercise.

Revision: rh318-4.3-c05018e