diff options
Diffstat (limited to 'content/post')
-rw-r--r-- | content/post/install-virt-manager-in-debian.md | 39 |
1 files changed, 39 insertions, 0 deletions
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: --- <!--more--> + +`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 `<user>` with normal user. + +```bash +adduser <user> libvirt +adduser <user> libvirt-qemu +adduser <user> 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. |