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
- What is Virtualization in Linux way?
- Types of Virtualization available in Linux/Unix
- Advantages of Virtualization
- What is KVM virtualization in Linux?
- KVM Virtualization: Find Hardware support KVM/VMware ESXi or not?
- KVM virtualization: Install KVM hypervisor in Redhat/CentOS/Fedora Linux?
- KVM virtualization: Install KVM hypervisor in Ubuntu/Debian Linux?
- KVM virtualization: Install Ubuntu Linux as Guest OS in KVM hypervisor?
- KVM virtualization: Install Redhat/CentOS/Fedora as Guest OS in KVM hypervisor?
- KVM virtualization: Network(NAT) configuration in KVM hypervisor?
- KVM: Connect to a virtual machine(SSH, VNC, Console, virt-viewer etc)
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.
Step2: Click on the option in shutdown button to select different options.
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.
Latest posts by Surendra Anne (see all)
- Docker: How to copy files to/from docker container - June 30, 2020
- Anisble: ERROR! unexpected parameter type in action:
Fix - June 29, 2020 - FREE: JOIN OUR DEVOPS TELEGRAM GROUPS - August 2, 2019
- Review: Whizlabs Practice Tests for AWS Certified Solutions Architect Professional (CSAP) - August 27, 2018
- How to use ohai/chef-shell to get node attributes - July 19, 2018