How to setup kvm on lvm in CenetOS 5.7 64bit
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...
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...
Total Comments 1
Comments
-
Plz update on above thread....
Posted 10-04-2013 at 12:39 AM by nandunay