Bookmark this page

Guided Exercise: Editing Virtual Machine Hardware

In this exercise, you will make changes to the configuration of an existing Red Hat Enterprise Linux-based virtual machine.

Outcomes

You should be able to change the amount of RAM and the number of CPUs on one of your virtual machines.

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

On workstation, run the lab vms-edit start command. This command runs a start script that determines if the Red Hat Virtualization environment is configured and working. Wait for the start script to finish before editing the virtual machine, as the start script will undo changes made before it completes.

[student@workstation ~]$ lab vms-edit start
  1. On workstation, open Firefox and access the RHV-M Administration Portal, using the http://rhvm.lab.example.com URL. Log in using admin as the username, redhat as the password, and internal as the profile.

  2. Navigate to Virtual Machines by clicking on Compute in the menu bar, and then selecting Virtual Machines.

  3. View details for the rhel-vm1 virtual machine by clicking its name. In the General tab, observe how Defined Memory is set to 2048 MB and Number of CPU Cores is set to 2. The extra information of (2:1:1) indicates that the virtual machine has 2 virtual sockets, with 1 core per virtual socket, and 1 thread per core.

  4. If your rhel-vm1 virtual machine is still running, click the Shutdown button to shut down the virtual machine. Confirm the shutdown by clicking the OK button.

  5. Wait until the virtual machine status changes to Down. Click the Edit button to edit the properties of the virtual machine.

  6. In the Edit Virtual Machine window, click the Show Advanced Options button and verify that you can access the advanced options. Click the System tab.

  7. Change the amount of RAM available to the machine by modifying the Memory Size text field to a value of 512 MB. Change the maximum amount of RAM available to the machine by modifying the Maximum memory text field to a value of 1024 MB.

  8. Change the number of CPUs available to the machine by modifying the Total Virtual CPUs text field to a value of 1.

  9. Accept the changes by clicking OK.

  10. Observe the changed values that you specified in the General tab. Defined Memory should have a value of 512 MB and Number of CPU Cores should have a value of 1.

  11. Start the rhel-vm1 virtual machine by clicking the Run button.

  12. Once it is active, click the console button to access the rhel-vm1 virtual machine console. Click the OK button to open the console.vv file using Remote Viewer.

  13. Log in to the virtual machine using the root user account and the password redhat.

  14. Issue the dmidecode command to examine the hardware components, and confirm that the amount of RAM available to the system has changed to 512 MB.

    [root@rhel-vm1 ~]# dmidecode | grep -A10 '^Memory Device'
    Memory Device
    	Array Handle: 0x1000
    	Error Information Handle: Not Provided
    	Total Width: Unknown
    	Data Width: Unknown
    	Size: 512 MB
    	Form Factor: DIMM
    	Set: None
    	Locator: DIMM 0
    	Bank Locator: Not Specified
    	Type: RAM
  15. Issue the lscpu command to see that the number of CPUs has changed to 1.

    [root@rhel-vm1 ~]# lscpu | grep '^CPU(s)'
    CPU(s):                1
  16. Close the virtual machine console and log out from the Administration Portal.

Finish

On workstation, run the lab vms-edit finish script to complete this exercise.

[student@workstation ~]$ lab vms-edit finish

This concludes the guided exercise.

Revision: rh318-4.3-c05018e