免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 6230 | 回复: 4
打印 上一主题 下一主题

rhel 5.4 kvm理解 [复制链接]

论坛徽章:
1
IT运维版块每日发帖之星
日期:2016-05-06 06:20:00
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2009-10-27 11:58 |只看该作者 |倒序浏览
本文转自:双易网络
kvm,xen,qemu是hypervisor
久闻rhel5.4新增KVM虚拟功能,刚好今新进一台服务器,所以就下了一个64位系统在一台支持虚拟技术的CPU的HP机器上尝试安装
默认装好后运行的内核是:

代码: 全选
    [root@rhel54 ~]# uname -r
    2.6.18-164.el5xen


也就是说默认支持的虚拟机还是xen,经过查阅redhat 的文档,才知道如何正确配置kvm
文档如下:
该文档链接:http://www.redhat.com/docs/en-US ... en_hypervisors.html
~~~~~~~~~~~~~~~~~~~~~
Changing between the KVM and Xen hypervisors
This section covers changing between the KVM and Xen hypervisors.
Red Hat only supports one active hypervisor at a time.
Migrating virtualized guests between hypervisors
Presently, there is no application for switching Xen-based guests to KVM or KVM-based guests to Xen. Guests can only be used on the hypervisor type that they were created on.
Warning
This procedure is only available for the Intel 64 or AMD64 version of Red Hat Enterprise Linux 5.4 or newer. No other configurations or Red Hat Enterprise Linux versions are supported. KVM is not available in versions earlier than Red Hat Enterprise Linux 5.4.
28.2.1. Xen to KVM
The following procedure covers changing from the Xen hypervisor to the KVM hypervisor. This procedure assumes the kernel-xen package is installed and enabled.

1.

Install the KVM package
Install the kvm package if you have not already done so.

# yum install kvm

2.

Verify which kernel is in use
The kernel-xen package may be installed. Use the uname command to determine which kernel is running:

$ uname -r
2.6.18-159.el5xen

The present kernel, "2.6.18-159.el5xen", is running on the system. If the default kernel, "2.6.18-159.el5", is running you can skip the substep.
1.

Changing the Xen kernel to the default kernel
The grub.conf file determines which kernel is booted. To change the default kernel edit the /boot/grub/grub.conf file as shown below.

default=1
timeout=5
splashimage=(hd0,0)/grub/splash.xpm.gz
hiddenmenu
title Red Hat Enterprise Linux Server (2.6.18-159.el5)
root (hd0,0)
kernel /vmlinuz-2.6.18-159.el5 ro root=/dev/VolGroup00/LogVol00 rhgb quiet
initrd /initrd-2.6.18-159.el5.img
title Red Hat Enterprise Linux Server (2.6.18-159.el5xen)
root (hd0,0)
kernel /xen.gz-2.6.18-159.el5
module /vmlinuz-2.6.18-159.el5xen ro root=/dev/VolGroup00/LogVol00 rhgb quiet
module /initrd-2.6.18-159.el5xen.img

Notice the default=1 parameter. This is instructing the GRUB boot loader to boot the second entry, the Xen kernel. Change the default to 0 (or the number for the default kernel):

default=0
timeout=5
splashimage=(hd0,0)/grub/splash.xpm.gz
hiddenmenu
title Red Hat Enterprise Linux Server (2.6.18-159.el5)
root (hd0,0)
kernel /vmlinuz-2.6.18-159.el5 ro root=/dev/VolGroup00/LogVol00 rhgb quiet
initrd /initrd-2.6.18-159.el5.img
title Red Hat Enterprise Linux Server (2.6.18-159.el5xen)
root (hd0,0)
kernel /xen.gz-2.6.18-159.el5
module /vmlinuz-2.6.18-159.el5xen ro root=/dev/VolGroup00/LogVol00 rhgb quiet
module /initrd-2.6.18-159.el5xen.img

3.

Reboot to load the new kernel
Reboot the system. The computer will restart with the default kernel. The KVM module should be automatically loaded with the kernel. Verify KVM is running:

$ lsmod | grep kvm
kvm_intel 85992 1
kvm 222368 2 ksm,kvm_intel

The kvm module and either the kvm_intel module or the kvm_amd module are present if everything worked.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~

以上只是说明了如何切换到kvm的环境下,在创建虚拟机的时候还有注意的是:在添加连接的时候你根本看不到“kvm”的“监控程序”而只有“xen”和"qemu"。其实qemu就是kvm 了,参考如下的文档
文档地址:http://www.redhat.com/docs/en-US ... tualized_guest.html
~~~~~~~~~~~~
Select the hypervisor. If installed, select Xen or KVM. For this example, select KVM. Note that presently KVM is named qemu.
~~~~~~~~~~~~~~~~~~~~
在新建虚拟机时在选择"Virtualization Method"的时候就可以看到监控程序有“kvm”和“qemu”
的差别了。

论坛徽章:
0
2 [报告]
发表于 2009-11-04 16:12 |只看该作者
楼主走在了前面  俺对linux下虚拟机还一头雾水

论坛徽章:
0
3 [报告]
发表于 2010-03-05 20:21 |只看该作者
不错不错

论坛徽章:
0
4 [报告]
发表于 2010-03-18 11:27 |只看该作者
我已在Debian Lenny中用了半年的KVM……

论坛徽章:
0
5 [报告]
发表于 2010-03-19 16:49 |只看该作者
我想用redhat 来实现kvm 虚拟化功能,

具体怎么安装,和需要安装什么其他软件,大概的思路是怎么样的?

我好像看网上说安装redhat时候只要选择KVM 就可以支持虚拟化。

然后具体怎么在这个linux上安装虚拟机呢,如果需要其他第三方软件,需要其他管理软件,然后怎么进入安装呢??
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP