Performance Checklist
In this lab, you will import a virtual machine image, take a snapshot of a virtual machine, and export a virtual machine.
Outcomes
You should be able to:
Upload a virtual machine image into Red Hat Virtualization, using the Administration Portal.
Take a snapshot of an existing virtual machine.
Use the Administration Portal to export a virtual machine as an OVA file onto an RHV host.
Log in to workstation as the student user with student as the password.
On workstation, run the lab snapimex-review start command.
This command runs a start script that determines if the Red Hat Virtualization environment is configured and working.
[student@workstation ~]$lab snapimex-review start
On workstation, download the http://materials.example.com/rhel7-minimal-sealed.qcow2 virtual machine image to the ~/Downloads/ directory, if it does not already exist.
Upload rhel7-minimal-sealed.qcow2 to the production data center.
Use rhel7-image as the alias and nfs-data as the storage domain.
The size of 3 GB will be automatically assigned.
Check to see if rhel7-minimal-sealed.qcow2 already exists in the ~/Downloads/ directory.
[student@workstation ~]$ls ~/Downloads/rhel7-minimal-sealed.qcow2
Download the http://materials.example.com/rhel7-minimal-sealed.qcow2 virtual machine image, if necessary.
[student@workstation ~]$wget -nc -P ~/Downloads/ \http://materials.example.com/rhel7-minimal-sealed.qcow2...output omitted... HTTP request sent, awaiting response... 200 OK Length: 1210712064 (1.1G) Saving to: ‘/home/student/Downloads/rhel7-minimal-sealed.qcow2’ ...output omitted...
Open the Administration Portal at https://rhvm.lab.example.com.
If necessary, log in as admin in the internal profile.
Use redhat as the password.
In the menu, click , and then click Disks.
Select → . The Upload Image window displays.
In the Upload Image window, click , and then select the /home/student/Downloads/rhel7-minimal-sealed.qcow2 virtual machine image file.
The value of 3 GB will be automatically assigned in the Size (GiB) field.
Enter rhel7-image in the Alias text field.
Choose for the Data Center.
Verify that the value of the Storage Domain field is nfs-data.
Use the default values for the other fields.
In a previous guided exercise, you should have downloaded the ovirt-engine certificate. Click the button to verify this. If clicking the button returns a green success box, then you are ready to upload. If clicking the 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 button. Once complete, click the button again. It should return a green success box.
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:
Open Preferences for Firefox, and then select Privacy & Security in the left menu.
Scroll down to the Security section, and then click the button.
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 button.
Back on the Preferences tab for Privacy & Security, scroll up to the Cookies and Site Data section, and then click the button.
Accept the default selections and click the button. Confirm your choice by clicking the button in the new window that displays.
Click the button to start the upload process.
Verify that the value of the Status field for the rhel7-image virtual machine image is OK.
It may take up to a minute to upload this image.
Create a new virtual machine named rhel-lab-vm.
Use clustertwo.
The operating system should use Red Hat Enterprise Linux 7.x x64, the instance type should use Small, and Optimized for should use Server.
Attach the rhel7-image virtual machine image as a bootable disk.
Associate the first network interface with the prod-vm-net logical network.
In the menu, click , and then click Virtual Machines.
To create a new virtual machine, click . The New Virtual Machine window displays.
In the New Virtual Machine window, set the values of the fields according to the following table.
| Field | Value |
|---|---|
| Cluster | |
| Operating System Menu | |
| Instance Type | |
| Optimized for | |
| Name | |
| Attach Virtual Disks | (check the box under OS) |
| nic1 |
To attach the virtual disk, click on the button.
Select the rhel7-image image.
Make sure to check the box under OS to indicate that this is a bootable disk.
Click .
Click to create the virtual machine.
Verify that the virtual machine list includes the rhel-lab-vm virtual machine.
Create a snapshot of the rhel-lab-vm virtual machine.
Use rhel-lab-vm-snapshot for the snapshot description.
Right-click the row for the rhel-lab-vm virtual machine, and then click Create Snapshot.
The Create Snapshot window displays.
Enter rhel-lab-vm-snapshot as a description of the snapshot in the Description field.
Select the virtual disk by clicking on the check box in the Disks to include section.
Click to create the snapshot.
In the Virtual Machines tab, click on the name of the rhel-lab-vm virtual machine.
Select the Snapshots tab.
Click on the General link in the rhel-lab-vm-snapshot row.
Verify that the value of the Status field is OK.
It may take up to a minute to create this snapshot.
Modify /etc/motd on the rhel-lab-vm virtual machine to contain the string RHV managed virtual machine.
In the menu, click , and then select Virtual Machines.
Right-click the row for the rhel-lab-vm virtual machine, and then select .
Verify that the value of the Status field for the rhel-lab-vm virtual machine is Up.
It may take up to a minute for the rhel-lab-vm virtual machine to start.
Right-click the row for the rhel-lab-vm virtual machine, and then select .
The Opening console.vv window appears.
Choose Open with, and then select .
Click to open the console for rhel-lab-vm.
Click on .
Log in to the rhel-lab-vm virtual machine as root using redhat as the password.
Verify that the /etc/motd file for the rhel-lab-vm virtual machine is empty.
[root@localhost ~]#cat /etc/motd
Modify the /etc/motd file to contain the string RHV managed virtual machine.
[root@localhost ~]#echo 'RHV managed virtual machine' > /etc/motd
Power off the rhel-lab-vm virtual machine.
[root@localhost ~]#systemctl poweroff
Revert the rhel-lab-vm virtual machine back to the rhel-lab-vm-snapshot snapshot.
In the Administration Portal, click , and then select Virtual Machines.
Verify that the value of the Status field for the rhel-lab-vm virtual machine is Down.
If the rhel-lab-vm virtual machine is still running, right-click on the name, and then select .
You may need to scroll the virtual machine list window to the right in order to see the Status field.
It may take a minute for the virtual machine to shut down.
Click on the name of the rhel-lab-vm virtual machine.
Click on the Snapshots tab.
Select the rhel-lab-vm-snapshot snapshot.
Click the Preview drop-down menu, and then select .
The Custom Preview Snapshot window displays.
Select the radio button for the rhel-lab-vm-snapshot snapshot.
Select the check box for rhel7-image.
Click to preview the rhel-lab-vm-snapshot snapshot.
In the Snapshots tab, click on General for the rhel-lab-vm-snapshot snapshot.
Verify that the value of the Status field is IN_PREVIEW.
Click .
The Commit Snapshot window displays.
Click on .
In the menu, click .
Verify that the message Committing a Snapshot-Preview for VM rhel-lab-vm has been completed displays.
This confirms that RHV-M successfully restored the rhel-lab-vm-snapshot snapshot in the rhel-lab-vm virtual machine.
Verify that the /etc/motd file is empty to determine if the rhel-lab-vm virtual machine is using the rhel-lab-vm-snapshot snapshot.
In the menu, click Compute, and then select Virtual Machines.
Right-click the row for the rhel-lab-vm virtual machine, and then select .
Verify that the value of the Status field for the rhel-lab-vm virtual machine is Up.
It may take up to a minute for the rhel-lab-vm virtual machine to start.
Right-click the row for the rhel-lab-vm virtual machine, and then select .
The Opening console.vv window displays.
Choose Open with, and then select .
Click to open the console for rhel-lab-vm.
Click on .
Log in to the rhel-lab-vm virtual machine as root using redhat as the password.
Verify that the /etc/motd file for the rhel-lab-vm virtual machine is empty.
[root@rhel-lab-vm ~]$cat /etc/motd
Log out from rhel-lab-vm.
[root@rhel-lab-vm ~]$logout
Export the rhel-lab-vm virtual machine as an OVA file to the /var/lib/libvirt/images/ directory, on hostc.lab.example.com.
In the menu, click Compute and then click Virtual Machines.
Click the row for the rhel-lab-vm virtual machine.
Click on the three vertical dots next to , and then select .
The Export Virtual Machines(s) As Virtual Appliance window displays.
Verify that the Host is hostc.lab.example.com.
In the Directory field, enter /var/lib/libvirt/images/.
Confirm that the Name is rhel-lab-vm.ova.
Click on .
A message displays to confirm that the OVA has been created.
From workstation log in to hostc.lab.example.com as the root user.
[student@workstation ~]$ssh root@hostc.lab.example.comLast login: Tue Aug 13 06:26:29 2019 from 172.25.250.14 node status: OK See `nodectl check` for more information Admin Console: https://172.24.0.12:9090/ or https://172.25.250.12:9090/ [root@hostc ~]#
Locate the rhel-lab-vm.ova on hostc.lab.example.com.
[root@hostc ~]#ll /var/lib/libvirt/imagestotal 1182364 -rw-------. 1 root root 1210857984 Aug 13 06:26 rhel-lab-vm.ova
Log out from hostc.lab.example.com.
[root@hostc ~]$logout