Basic XEN and KVM-QEMU commands

This is a collection of basic XEN and KVM-QEMU command usefull when you have to manage Virtual Machine on Linux.

Virtual Machine XEN and KVM-QEMU basic command


Virtual Machine configuration files are stored in:

Virtual Machine list:

[root@localhost ~]# virsh list
 Id Nome Stato
 25 NMX_VM2 in esecuzione
 26 NMX_VM3 in esecuzione
 28 NMX_VM1 in esecuzione

Start Virtual Machine:

virsh create /etc/libvirt/qemu/file.xml

Shutdown Virtual Machine (even if the command is “destroy” don’t be scared it doesn’t destroy your VM, only stop it):

virsh destroy virtual-machine-name

Clone Virtual Machine:

virt-clone --original name-sorg --name name-dest 2 --file disco

virt-clone –original NMX_VM1 –name NMX_VM2 –file /dev/VolGroup01/LV_NMX_VM2

Create and edit Virtual Machine

virsh dumpxml 
virsh edit 

XEN (not supported on Centos 6 – 64bit)

VM File location:

Basic Command

xm list
xm destroy VM
xm create /etc/xen/VM
xm top


Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.