Review your favorite Linux distribution.
Go Back > Blogs > nandunay
User Name


Rate this Entry

How to setup kvm on lvm in CenetOS 5.7 64bit

Posted 10-03-2013 at 02:19 AM by nandunay
Updated 10-03-2013 at 04:29 AM by nandunay

Firstly, I have created LVM (350 GB) on centos 5.7 64 bit.
Now i want to setup KVM on LVM .....
For kvm i have installed required packages on centos 5.7

Now, i want to install kvm on lvm like below way...

[root@ora8-3 ~]# df -lh
Filesystem Size Used Avail Use% Mounted on
20G 15G 3.8G 80% /
/dev/sda5 9.7G 964M 8.3G 11% /var/log
/dev/sda1 198M 28M 160M 15% /boot
tmpfs 16G 0 16G 0% /dev/shm
345G 195M 327G 1% /lvm-stg
345G 195M 327G 1% /lvm-dev

[root@ora8-3 ~]# ls /lvm-dev/
Centos-Image lost+found
[root@ora8-3 ~]# ls /lvm-dev/Centos-Image/

[root@ora8-3 ~]# ls /var/lib/libvirt/images/

[root@ora8-3 ~]# virt-install -n Centos5.7-lvm -r 1024 -f /lvm-dev/Centos-Image/dev_CentOS.img -s 30 --nographics vnc,port=5901 --vcpus=2 --network bridge=br0 --os-type=linux --cdrom=/var/lib/libvirt/images/CentOS-6.4-x86_64-bin-DVD1.iso

Starting install...
Creating storage file... | 30 GB 00:00
Creating domain... | 0 B 00:00
Connected to domain Centos5.7-lvm
Escape character is ^]

Domain installation does not appear to have been
successful. If it was, you can restart your domain
by running 'virsh start Centos5.7-lvm'; otherwise, please
restart your installation.

[root@ora8-3 ~]# virsh list
Id Name State

[root@ora8-3 ~]# virsh list --all
Id Name State
- Centos5.7-lvm shut off

[root@ora8-3 ~]# virsh start Centos5.7-lvm
Domain Centos5.7-lvm started

[root@ora8-3 ~]# virsh list
Id Name State
16 Centos5.7-lvm running

[root@ora8-3 ~]# ls /lvm-dev/Centos-Image/
[root@ora8-3 ~]# du -sh /lvm-dev/Centos-Image/
4.0K /lvm-dev/Centos-Image/

[root@ora8-3 ~]# du -sh /lvm-dev/Centos-Image/dev_CentOS.img
0 /lvm-dev/Centos-Image/dev_CentOS.img

[root@ora8-3 ~]# ll /lvm-dev/Centos-Image/dev_CentOS.img
-rwxr-xr-x 1 root root 32212254720 Oct 3 02:38 /lvm-dev/Centos-Image/dev_CentOS.img

Pl help me to setup kvm on lvm properly...
Posted in Uncategorized
Views 2592 Comments 1
« Prev     Main     Next »
Total Comments 1


  1. Old Comment
    Plz update on above thread....
    Posted 10-04-2013 at 12:39 AM by nandunay nandunay is offline


All times are GMT -5. The time now is 05:47 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration