May 1, 2012

KVM (Virtualization) Tips



KVM Tips.


Assumptions

1.You should have a working KVM Environment
2.You should have knowledge in Linux and little Networking.
3.You should have basic level knowledge in Virtualisation

1.To Check whether KVM has been installed

virsh -c qemu:///system list

You will see the following...

[root@server1 ~]# virsh -c qemu:///system list
 Id Name                 State
----------------------------------

[root@server1 ~]#

Which means your KVM server is up and running.

2.To View all the running Guests

virsh --connect qemu:///system

virsh# list -all

Id Name                 State
----------------------------------
  3 vm11                 running
  - vm10                 shut off

virsh #

3.Start a Virtual Machine
virsh# start vm10

4.Stop a Virtual Machine
virsh# shutdown vm10

5.Suspend a Virtual Machine

virsh# suspend vm10

6.Forcefully Shutdown a virtual Machine (ie remove power plug)

virsh# destroy vm10

7.Exit the Virtual shell
virsh# Exit

No comments: