从零部署RHEV3.3红帽虚拟化-1(创建kvm虚拟磁盘)

                                                     环境介绍
硬件环境
1. Thinkpad T430-2347A75
2. CPU:Intel(R) Core(TM) i7-3520M CPU @ 2.90GHz 支持VT-x
3. MEM:8G
4. Cardtype:1000Mbps以太网卡
5. Hard disk space:500G
软件环境
1. System:Red Hat Enterprise Linux Server release 6.4 (Santiago)

2. Virtual Machine:qemu-kvm-0.12.1.2-2.355.el6.x86_64

3. rhevm3.3.iso
4. rhev-hypervisor6-6.5-20140217.0.iso
5. rhel-6.3-p2v.iso
6. v2vtools.iso
网络环境
1. 物理主机: 192.168.1.101/255.255.255.0
2. 虚拟主机

<1> PXE: 192.168.1.250/255.255.255.0

<2> IPA_DNS_DHCP_Gateway: 192.168.1.254/255.255.255.0   10.0.0.1/255.0.0.0
<3> RHEVM3.3: 192.168.1.251/255.255.255.0
<4> RHEV-H6.5: 192.168.1.252/255.255.255.0


配置如下:

1. 创建逻辑分区“/dev/vg1/lvkvm1”(注意:不能格式化此逻辑分区,更不能挂载此逻辑分区).

[root@localhost Desktop]# fdisk /dev/sda

Command (m for help): n
Command action
  e   extended
  p   primary partition (1-4)
e
Partition number (1-4): 3
First cylinder (3380-60801, default 3380):
Using default value 3380
Last cylinder, +cylinders or +size{K,M,G} (3380-60801, default 60801): +400G

Command (m for help): n
Command action
  l   logical (5 or over)
  p   primary partition (1-4)
l
First cylinder (3380-55598, default 3380):
Using default value 3380
Last cylinder, +cylinders or +size{K,M,G} (3380-55598, default 55598): +20G

Command (m for help): t
Partition number (1-5): 5
Hex code (type L to list codes): 8e
Changed system type of partition 5 to 8e (Linux LVM)

Command (m for help): w
The partition table has been altered!



[root@localhost Desktop]# partx -a /dev/sda

[root@localhost Desktop]# ll /dev/sda*
brw-rw----. 1 root disk 8, 0 4月  24 11:43 /dev/sda
brw-rw----. 1 root disk 8, 1 4月  24 09:34 /dev/sda1
brw-rw----. 1 root disk 8, 2 4月  24 09:34 /dev/sda2
brw-rw----. 1 root disk 8, 3 4月  24 11:43 /dev/sda3                           -- 扩展分区
brw-rw----. 1 root disk 8, 5 4月  24 11:43 /dev/sda5                           -- 逻辑分区

[root@localhost Desktop]# pvcreate /dev/sda5                                 -- 创建物理卷(pv)
 Physical volume "/dev/sda5" successfully created            
[root@localhost Desktop]# vgcreate vg1 /dev/sda5                          -- 创建(vg)卷组
 Volume group "vg1" successfully created
[root@localhost Desktop]# lvcreate -L +20G -n lvkvm1 vg1             -- 创建(lv)逻辑卷
 Logical volume "lvkvm1" created
[root@localhost Desktop]# lvdisplay |grep /dev/vg1/lvkvm1             -- 查看创建后的信息
 LV Path                /dev/vg1/lvkvm1


----------> 至此 kvm虚拟磁盘创建完成.

你可能感兴趣的:(RHEV3.3系列)