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.
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)
- Online training on Linux Bash shell scripting - February 8, 2018
- 15 iostat command examples in Linux/Unix - December 4, 2017
- How to Installing and Configuring Firewalld on Linux - November 29, 2017
- 4 sleep command examples in Linux/Unix - November 2, 2017
- 5 SSH alias examples in Linux - October 16, 2017