From d77ee63e790334450bcb13b3b0ca4a75864a1924 Mon Sep 17 00:00:00 2001 From: GNUxeava Date: Mon, 18 Apr 2022 14:35:54 +0000 Subject: finish install virt-manager --- content/post/install-virt-manager-in-debian.md | 39 ++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) (limited to 'content/post') diff --git a/content/post/install-virt-manager-in-debian.md b/content/post/install-virt-manager-in-debian.md index dae4e15..dae4ab4 100644 --- a/content/post/install-virt-manager-in-debian.md +++ b/content/post/install-virt-manager-in-debian.md @@ -41,3 +41,42 @@ sequenceDiagrams: --- + +`virt-manager` or *Virtual Machine Manager* is a frontend for managing virtual machines through *libvirt*. It primarily targets KVM virtual machines but is also capable of managing Xen and LXC. In this post we will focus on KVM. + +*All commands in this post are supposed to be run as root.* + +## Installing necessary tools +We will install libvirt, QEMU and a spice client. + +```bash +apt-get --no-install-recommends install qemu-utils qemu-kvm virt-manager libvirt-clients libvirt-daemon-system virtinst bridge-utils gir1.2-spiceclientglib-2.0 gir1.2-spiceclientgtk-3.0 virt-viewer libosinfo-bin +``` + +## Setting up libvirt +### Set up networking +libvirt ships with a default network profile. Here we enable it have it start automatically. This will allow the virtual machines to connect to the internet. + +```bash +virsh net-start default +virsh net-autostart default +``` + +### Add yourself to necessary groups +Here you will add yourself to the necessary groups to avoid running as root every time you want to run a virtual machine. Replace `` with normal user. + +```bash +adduser libvirt +adduser libvirt-qemu +adduser kvm +``` + +### Enable and start libvirt +Apt automatically enables and starts `libvirtd.service`. We do it again anyways. + +```bash +systemctl enable libvirtd.service +systemctl restart libvirtd.service +``` + +Now you should be able to install and manage virtual machines through virt-manager. -- cgit v1.2.3