Installing and configuring kvm on RHEL 7 and OL 7

1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)

Installing and configuring KVM on RHEL 7 and OL 7

Installing the required packages

Disable firewall (to get around some issues)

Now, Start libvirt by using systemctl

Copy any ISO / CD to /var/lib/libvirt/images (default location), so we can use that at a latter time.

One of the options I have used with a GUI, is, virt-manager, you can use that with remoteX enabled.

Once all configuration options are completed, make sure to select the option of configure after complete.
Note: To enable vnc go in to GUI and select vnc, listen to all interfaces if not, keyboard will not work.

Note: For some configurations you might need to bridge the network described latter.
FC options and howto enable multipath

To configure all the options, run

Now, Verify if all worked

To get the FC WWN, you can use the below.

You can also run to below to get the WWN
Note: You might need to install systool, systool command is provided by the rpm package “sysfsutils”.

Tips – Tools
You can use a verity of tools, but virt-manager and virsh are conman.
For example, to change hostname, run the below.

To graceful shutdown a VM

To power off VM

To enable/disable autostart after server reboot.

To list all VM’s

In my experience I had to disable selinux for things to work properly, by doing so.

To enable IP forwarding

To create a bridge, which is needed in some cases.

To use the bridge, use this in the interface file’s
For example. In the physical interface ifcfg-eth0 add, remove ip and all and add to new file ifcfg-br0

To colne a VM


Leave a Reply

Notify of