Virtual Machines
1. Download and install the proper packages in order to manage virtual machines on a Red Hat 7 machine. Ensure you install the GUI as well as the command line interface.
[root@localhost]# yum install virt-manager qemu-kvm qemu-img libvirt libvirt-python python-virtinst libvirt-client
OR Note: This is a neat trick
[root@localhost]# yum grouplist hidden // This will show virtualization packages
[root@localhost]# yum groupinstall "Virtualization Client"
[root@localhost]# yum groupinstall "Virutalization Tools"
[root@localhost]# yum groupinstall "Virtualization Platform"
Note: This will prevent you from having to memorize packages or as a backup in the exam if you forget the packages required.
2. Ensure that the virtual machine services start when the system boots and is currently running.
[root@localhost]# systemctl start libvirtd
[root@localhost]# systemctl enable libvirtd
Hint: In the exam if you have to start a service ALWAYS enable the service.
3. Create a CentOS based virtual machine using the GUI.
[root@localhost]# virt-manager
4. Configure the virtual machine to auto start whenever the system starts.
[root@localhost]# virsh
[root@localhost]# virsh autostart vmname
OR
At the virsh commandline
Virsh # autostart vmname
5. Reboot and test the configuration.
[root@localhost]# reboot