Blog

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...

Written by admin · 31 sec read >

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

Bitcoin Exchange Script

admin in Blog
  ·   1 min read

Trả lời

Email của bạn sẽ không được hiển thị công khai. Các trường bắt buộc được đánh dấu *