Difference between revisions of "KVM Kernel Virtualization Machine on Rocky Linux 9"

Wiki.TerraBase.info
Jump to navigation Jump to search
m
m
Line 40: Line 40:


'''Network Connectivity, don't forget that;'''
'''Network Connectivity, don't forget that;'''
...and now comes the part where the above noted references show their true colors.  IE, the content in the articles on those websites was not created by the people who own those websites.  It was aggregated from other websites and put into a format that Google likes.  And does it ever show on the Networking aspect of what they document.  In short, ignore it.  You'll hose your system if you do what is written.  Go ahead and try it (no, don't really do that).
The first issue is with the destruction of a perfectly network interface.  The second issue is with the creation of a Bridge Interface that was already created as part of the installation process of QEMU / KVM.  Keeping in mind this article here was written based on Rocky Linux 9 and the iteration of QEMU / KVM as of late 2023.  Earlier versions may have required the creation of a Bridge Interface.
'''Tricks, Tips, and Other Useful Information (all of which applies to Rocky Linux 9, and others based on Red Hat)'''
* Rocky Linux 9 Network Configuration Files Directory: /etc/Network/Manager/system-connections (NOT /etc/sysconfig/network-scripts)
* QEMU / KVM Configuration Files: /etc/libvirt/qemu/
** Heed the warning notes on some of these files as they should not be edited directly.  Although a workaround is to edit the files directly, then restart the libvirtd.service (systemctl restart libvirtd.service)
** virsh net-edit default (it uses the VI editor)
*** VI Editor
**** i = Insert (AKA Edit) Mode
**** ESC = Command Mode
**** : (Colon) = "Beginning of Command"
**** w = Write (as in :w)
**** x = Exit / Quit and Save (AKA Write) (as in :x)
**** q = Quit (AKA Exit)
* QEMU / KVM Additional Bridge Configuration: /etc/qemu-kvm/


*
*

Revision as of 11:17, 25 December 2023

...below are just rough notes from three different sources, including ChatGPT. They are ordered in each section as below from the following sources;

Check for VM Support in CPU;

  • cat /proc/cpuinfo | egrep "vmx|svm"
  • lscpu | grep Virtualization
  • No Comment

Install all the Stuff (for the first two sources there were duplicate items on multiple lines that were cleaned up, oops, no proof reading on their part, huh, just a copy and paste);

  • dnf install qemu-kvm virt-manager libvirt virt-install virt-viewer libguestfs-tools bridge-utils virt-top
  • dnf install qemu-kvm virt-manager libvirt virt-install virt-viewer libguestfs-tools bridge-utils virt-top
  • dnf install qemu-kvm libvirt virt-install virt-manager AND apparently installing virt-manager again (just to make sure)

NOTES: And of course there are about a hundred or so other dependencies that are downloaded and installed too.

ISSUES: bridge-utils virt-top might give issues if attempting to install at the same time, so try installing separately.

Check Installation;

  • lsmod | grep kvm
  • lsmod | grep kvm
  • lsmod | grep kvm AND virsh list --all

Start AND Enable Automatic Starting of the "KVM" Services AND see if they're actually running;

  • sudo systemctl start libvirtd AND systemctl enable --now libvirtd AND systemctl status libvirtd
  • sudo systemctl start libvirtd AND sudo systemctl enable libvirtd AND systemctl status libvirtd
  • sudo systemctl start libvirtd AND sudo systemctl enable libvirtd AND No Comment

Permissions and User Related Stuff;

  • No Comment
  • usermod -aG libvirt $USER AND newgrp libvirt
  • usermod -aG libvirt $(whoami)

Network Connectivity, don't forget that;

...and now comes the part where the above noted references show their true colors. IE, the content in the articles on those websites was not created by the people who own those websites. It was aggregated from other websites and put into a format that Google likes. And does it ever show on the Networking aspect of what they document. In short, ignore it. You'll hose your system if you do what is written. Go ahead and try it (no, don't really do that).

The first issue is with the destruction of a perfectly network interface. The second issue is with the creation of a Bridge Interface that was already created as part of the installation process of QEMU / KVM. Keeping in mind this article here was written based on Rocky Linux 9 and the iteration of QEMU / KVM as of late 2023. Earlier versions may have required the creation of a Bridge Interface.

Tricks, Tips, and Other Useful Information (all of which applies to Rocky Linux 9, and others based on Red Hat)

  • Rocky Linux 9 Network Configuration Files Directory: /etc/Network/Manager/system-connections (NOT /etc/sysconfig/network-scripts)
  • QEMU / KVM Configuration Files: /etc/libvirt/qemu/
    • Heed the warning notes on some of these files as they should not be edited directly. Although a workaround is to edit the files directly, then restart the libvirtd.service (systemctl restart libvirtd.service)
    • virsh net-edit default (it uses the VI editor)
      • VI Editor
        • i = Insert (AKA Edit) Mode
        • ESC = Command Mode
        • : (Colon) = "Beginning of Command"
        • w = Write (as in :w)
        • x = Exit / Quit and Save (AKA Write) (as in :x)
        • q = Quit (AKA Exit)
  • QEMU / KVM Additional Bridge Configuration: /etc/qemu-kvm/