In this post we will see how to manage guest Virtual Machine through GUI and as well as CLI. KVM have good tools and commands to manage VM’s effectively. For managing VM though GUI we have to use virt-manager tool and through CLI we have to depend on virsh command. Already covered topics in this series are

To start/stop/save and force shutdown through GUI is very much straight forward.

Step1: Open Virt-manager and click on the VM you want to manage.

Virtual Machine Manager_038

Step2: Click on the option in shutdown button to select different options.

Redhat-base Virtual Machine_039

Through CLI

Example1: Shutdown VM through command prompt

virsh shutdown BaseMachine

Example2: Reboot VM through command prompt

virsh reboot BaseMachine

Example3: Restore VM from saved state through command prompt

virsh restore BaseMachine

Example4: Save VM state through command prompt

virsh save BaseMachine /opt/redhatbase

Note: My VM status is saved in to /opt/redhatbase file

Example1: Start VM through command prompt

virsh start BaseMachine

In our next post we will see how to get hypervisor info so that we will get complete picture about KVM hypervisor status.

The following two tabs change content below.
Mr Surendra Anne is from Vijayawada, Andhra Pradesh, India. He is a Linux/Open source supporter who believes in Hard work, A down to earth person, Likes to share knowledge with others, Loves dogs, Likes photography. He works as Devops Engineer with Taggle systems, an IOT automatic water metering company, Sydney . You can contact him at surendra (@) linuxnix dot com.