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

Cpanel/Whm License $3/mo Plesk License $10/mo Cloudlinux License $5/mo

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

Related posts

Zuckerberg to Study Crypto in Quest to Fix Facebook

SXI ADMIN

Zooko Wilcox Envisions ‘Ambitious’ Changes for Zcash Cryptocurrency

SXI ADMIN

ZombieChain Comes Alive: Can Ethereum Sidechains Save the Dapps?

SXI ADMIN

ZoKrates Seeks to Bring Best of Zcash to Ethereum with Devcon Debut

SXI ADMIN

Zk-Starks? New Take on Zcash Tech Could Power Truly Private Blockchains

SXI ADMIN

Zk-Snarks Everywhere: Ethereum Privacy Tech Hits Tipping Point

SXI ADMIN

ZipZap to Offer Cash-for-Bitcoin Service at 28,000 UK Locations

SXI ADMIN

ZipZap Resumes Cash-to-Bitcoin Services for UK Shoppers

SXI ADMIN

ZipZap Raises $1.1 Million to Grow Global Bitcoin Payments Network

SXI ADMIN

This website uses cookies to improve your experience. We'll assume you're ok with this, but you can opt-out if you wish. Accept Read More