LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Blogs > nandunay
User Name
Password

Notices

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

Hi,
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
/dev/mapper/VolGroup00-LogVol00
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
/dev/mapper/VolGroup00-LogVol001
345G 195M 327G 1% /lvm-stg
dev/mapper/VolGroup00-LogVol002
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/
CentOS-6.4-x86_64-bin-DVD1.iso

[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/
dev_CentOS.img
[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 991 Comments 1
« Prev     Main     Next »
Total Comments 1

Comments

  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 11:28 PM.

Main Menu
Advertisement

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