User Tools

Site Tools



libvirt is an open source API, daemon and management tool for managing platform virtualization. It can be used to manage KVM, Xen, VMware ESX, QEMU and other virtualization technologies. These APIs are widely used in the orchestration layer of hypervisors in the development of a cloud-based solution.

Sparse image

qemu-img create -f qcow2 /var/lib/libvirt/images/test.qcow2 64G

Resize image

qemu-img resize /var/lib/libvirt/images/test.qcow2 +10G

and then resize partition table and filesystem.


virt-install -r 4096 --accelerate -n test \
-f /var/lib/libvirt/images/test.qcow2 \
--cdrom /CentOS-6.5-x86_64-bin-DVD1.iso \
--network=type=direct,source=eth0 \
--graphics vnc,listen=,password=somepass \

(connect using vnc client to server IP to finish installation)

Deleting guest

destroy test
undefine test


virsh autostart test

Changing guest configuration (config file)

virsh edit test
docs/libvirt.txt · Last modified: 2014-05-15 09:36 by arekm