Blog

14/08/2019

How to KVM, QEMU start or stop virtual machine from command line (CLI)



KVM or Kernel Based Virtual Machine is a popular virtualization technology. It allows you to run virtual guest machines over a host machine. To start or stop virtual machines created on head-less servers you have to use the CLI or command line interface. There are more than one option, but we will see just one. We will use virsh, which is based on libvirt.
A toolkit to interact with the virtualization capabilities of recent versions of Linux (and other OSes), see our project goals for details.
First check which virtual machines are available:
virsh list --all
In my case the output is:
 Id    Name                           State
----------------------------------------------------
 -     ubuntu-desktop                 shut off
 -     ubuntu-server                  shut off
I will start the ubuntu-server virtual machine:
virsh start ubuntu-server
The output is:
Domain ubuntu-server started
To shut it down, just enter.
virsh shutdown ubuntu-server

permalink
If you enjoyed the article, please share it
14/08/2019

How to KVM, QEMU start or stop virtual machine from command line (CLI)

KVM or Kernel Based Virtual Machine is a popular virtualization technology. It allows you to run virtual guest machines over a host machine. To start...
14/08/2019

How to Docker backup Saving and restoring your volumes

Running a Docker volume backup First, we spin up a temporary container, and we mount the backup folder and the target Docker volume to this container....
12/08/2019

How to Start and Enable Firewalld on CentOS 7

In this article, we discuss how to start and enable firewalld. It is highly recommended that you have a firewall protecting your server.Pre-Flight CheckThese...