KVM + Remote conection support with virt-manager.
vmx is for Intel virtualization extensions, svm for AMD ones.
Any result above 0 means that your CPU supports virtualization. If the result is 0 (zero) you may have to enable virtualization support on your CPU through the BIOS menu. Each BIOS vendor puts that on a different menu section of the BIOS menu, but it usually is under the CPU configuration menu.
Check the BIOS vendor documentation, or google for it, it shall be pretty easy to find.
Run:
You should have an output like this:
Check that the module is enabled:
Your output should look like this:
Edit /etc/modules and put there vhost_net to start the module on on boot:
Not only it allows us to locally manage the host and VMs, you can remotely connect from another linux box (no need to have KVM on that box!). So you can set up a Debian linux install with no interface and just manage everything from your workstation.
You can connect to the KVM host from the Virtualization manager, but you must add the user you are connectng with to the libvirt group:
Now install virt-manager on the linux box you will use to manage the KVM host:
Now you can connect to the host. Select ssh connection, enter the user name. it will prompt you to accept the SSH fingerprint (ype yes) and the remote user's password:
Preface: I got most of the info for the initial setup from this web. Credit to the author.
1. (Optional) Install Debian 11
I always prefer to start with a clean install. Use the debian netinst cd for a clean install, select only the essential system packages and the SSH server during the software selection process. After that install and configure sudo to run as root commands you need to "elevate" wih the user you created during the installation.2. Confirm virtualization support
Run this on the console:egrep -c '(vmx|svm)' /proc/cpuinfo
vmx is for Intel virtualization extensions, svm for AMD ones.
Any result above 0 means that your CPU supports virtualization. If the result is 0 (zero) you may have to enable virtualization support on your CPU through the BIOS menu. Each BIOS vendor puts that on a different menu section of the BIOS menu, but it usually is under the CPU configuration menu.
Check the BIOS vendor documentation, or google for it, it shall be pretty easy to find.
3. Install the required packages
sudo apt update
sudo apt install qemu-kvm libvirt-clients libvirt-daemon-system bridge-utils virtinst libvirt-daemon
4. Enable the virtual network and configure it to start on boot
sudo virsh net-start default
sudo virsh net-autostart default
Run:
sudo virsh net-list --all
You should have an output like this:
5. Enable vhost_network
To improve the performance of the network stack and reduce the load of virtio-net, we will enable vhost_network module:sudo modprobe vhost_net
Check that the module is enabled:
lsmod | grep vhost
Your output should look like this:
Edit /etc/modules and put there vhost_net to start the module on on boot:
6. Create an IP bridge
Follow the Debian wiki guide, but in essence, you have to add an entry into /etc/network/interfaces and restart the networking stack:7. Install virt-manager for local and remote management
virt-manager is an interface for KVM/Qemu that allows an easy and convenient method to manage and create virtual machines.Not only it allows us to locally manage the host and VMs, you can remotely connect from another linux box (no need to have KVM on that box!). So you can set up a Debian linux install with no interface and just manage everything from your workstation.
You can connect to the KVM host from the Virtualization manager, but you must add the user you are connectng with to the libvirt group:
sudo usermod -a -G libvirt username
Now install virt-manager on the linux box you will use to manage the KVM host:
sudo apt install virt-manager -y
Now you can connect to the host. Select ssh connection, enter the user name. it will prompt you to accept the SSH fingerprint (ype yes) and the remote user's password:
Comentarios
Publicar un comentario