Guides 11791 Published by

Xmodulo posted a tutorial about using KVM from the command line on Debian or Ubuntu



There are different ways to manage virtual machines (VMs) running on KVM hypervisor. For example, virt-manager is a popular GUI-based front-end for VM management. However, if you would like to use KVM on a headless server, GUI-based solutions will not be ideal. That is when virsh comes in handy. virsh is a command-line tool for managing guest VMs. Underneath it, virsh relies on libvirtd service which can control several different hypervisors including KVM, Xen, QEMU, LXC and OpenVZ.

A command-line management interface such as virsh is also useful when you would like to automate the provisioning and management of VMs. Also, the fact that virsh supports multiple hypervisors means you can manage different hypervisors via the same virsh interface.

In this tutorial, I will demonstrate how to run KVM from the command line by using virsh on Debian or Ubuntu.
  How to use KVM from the command line on Debian or Ubuntu