Install VM software on system (configure physical system to host virtual guests):
This objective is to install necessary software packages on the physical system to host virtual guests. Packages can be installed in two ways either from command line or from GUI package installer.
Before installing packages, find out the hardware supports virtualization. Because in RHCE6/CentOS6 supports full virtualization with KVM (Kernel based virtual machine). Prior to RHCE6/CentOS6 supports para-virtualization (Can only install Linux guests) which is based on XEN.
#yum install qemu-kvm
Python-virtinst
Virt-manager
Virt-top
Virt-viewer
Libvirt
Libvirt-client
To verify hardware supports KVM, type
#cat /proc/cpuinfo
In the flags field, there must a flag either svm or vmx. If none of them are listed under flag, these means additional configuration may be required or that hardware doesn’t support KVM.
Enable the right modules: In most cases installing the right packages will be enough. More over appropriate modules should be installed and enabled in the system. Before KVM works, the associated modules must be loaded. Run the following command,
#lsmod | grep kvm (to verify kvm module is loaded)
The output should be,
Kvm_intel (OR) kvm_amd
Kvm kvm
These outputs depend on the hardware manufacturer. If the modules are not enabled,
Run #modprobe kvm
#modprobe kvm_intel
Finally run the virtual manager daemon,
Configure hypervisor:
To connect to hypervisor, type
#virt-manager from command line or from GUI (Applications | system tools | virtual machine manager.
Right click each hypervisor, and select details from pop-up menu.
1. Create a new virtual network (If this is mandatory in exam, then you have create a new virtual network)
2. Configure storage, to store VMs to different place. Make sure SELinux contexts are applied appropriately.
#mkdir /home/KVM
#chcon –R –reference /var/lib/libvirt/images /home/KVM
#rm –fr /var/lib/libvirt/images
#ln –s /home/KVM /var/lib/libvirt/images
3. Configure network interfaces
1. Bridge – binds physical and virtual interface
2. Bond – connects two or more interfaces as is they were a single interface
3. Ethernet – setup virtual LAN as a bridge
4. VLAN – connects real or virtual machine interface to VM system.
Nice RHCSA series, keep going to cover all topics.
ReplyDeleteThanks Jorge.
ReplyDeleteHad a plan to update every week. But I am working on tight schedule these days. More topics are on the way.
Thanks dude...nice topics ..are very helpful indeed.
ReplyDelete