X-osadminの自留地
  • 博客主页 HomePage
  • 技术小絮 Tech
  • 软件专题 Softs
    • proxmox
    • openwrt
    • chromebook
    • Zerotier
    • 虚拟化
  • 友情链接 Following

xosadmin

BGPlayer / Codes learner / Love Linux
Posts
73
Comments
0

友情链接 – Friendly Links

  • Add your site here…
xosadmin
8 years ago

CentOS 6下如何安装KVM虚拟化

昨天,小编讲述了在CentOS上安装OpenVZ虚拟框架的方式。应公众号里部分读者的要求,今天再给大家讲讲如何在CentOS上安装KVM虚拟框架。所谓KVM,官网给的定义如下:

KVM (for Kernel-based Virtual Machine) is a full virtualization solution for Linux on x86 hardware containing virtualization extensions (Intel VT or AMD-V). It consists of a loadable kernel module, kvm.ko, that provides the core virtualization infrastructure and a processor specific module, kvm-intel.ko or kvm-amd.ko.

根据官网所说,KVM对HW的硬件是有要求的,比如处理器必须支持VMX或者SVM之类的指令集或者虚拟相关。这次很有幸,获得了一台支持VMX的服务器,那就和大家一起开始我们的操作吧!

 

一、前期准备

操作系统:CentOS 6.9 X86_64 (这里必须使用64位系统)

处理器:Intel Xeon E5

 

二、安装前的预处理

1. 检测处理器是否支持虚拟处理集

# grep -E -o ‘vmx|svm’ /proc/cpuinfo

这里显示VMX或者SVM即为通过,若无,请检查主板中是否开启本功能或者处理器是否支持本处理集

2.更新系统软件包

# yum -y update

 

三、正式安装

1.安装KVM相关软件包

# yum -y groupinstall ‘Virtualization’ ‘Virtualization Client’ ‘Virtualization Platform’ ‘Virtualization Tools’

2.检测KVM模块是否挂载

# lsmod | grep kvm

若无返回,请执行modprobe kvm和modprobe intel-kvm

3.关闭selinux和NetworkManager(若有)

# setenforce 0或者vi /etc/sysconfig/selinux

# chkconfig NetworkManager off

# service NetworkManager stop

4.重启系统

# reboot

5.检测网络转发是否开启

# cat /etc/sysctl.conf |grep ip_forward

** 若无,请自行编辑/etc/sysctl.conf文件,将ip转发功能打开后sysctl -p

6.防火墙中开启VNC相关端口

# iptables -I INPUT -p tcp –dport 5000:6000 -j ACCEPT

# service iptables save

# service iptables restart

# chkconfig iptables on

通过以上步骤,您已经成功地在CentOS 6中安装KVM虚拟化框架。至于管理面板,您可以参阅KVM官方所推荐的。地址:传送门>>

  • 技术小絮
  • 虚拟化
等 人表示很赞
2,225
1

📮Comments (1)

xosadmin
xosadmin
6 years ago
推荐 CentOS 7用yum配置php7.2+mariadb+nginx
更新Linux源并安装EPEL+Webtatic源 yum -y install epel* rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm 2. 清理 ...
  • 技术小絮
1,260 0
xosadmin
xosadmin
6 years ago
推荐 gem (Zlib::GzipFile::Error) not in gzip format 的解决方案
近日在使用老版本ruby安装sqlite3时,遇到了这样的一个错误,报错如下: ERROR: While executing gem … (Zlib::GzipFile::Error) not in gzip format ...
  • 技术小絮
1,239 0
xosadmin
xosadmin
6 years ago
推荐 Proxmox “QEMU version ‘x.x.x’ is too old”问题的解决方法
最近在Proxmox操作时发现,由于集群中有一台服务器的Proxmox安装时间较早,因故在迁移虚拟机到该服务器时遇到了这样一个错误:Installed QEMU version ‘x.x.x’ is too old ...
  • proxmox
  • 技术小絮
3,263 0
xosadmin
xosadmin
4 years ago
推荐 wordpress在安装插件和主题时提示需要FTP的解决方法
问题描述:在给wordpress安装插件或者主题时,点击安装后,弹出需要输入FTP信息的框 解决方法:在wp-config.php文件下加入以下代码后刷新页面。 define(“FS_METHOD”, &#8220 ...
  • 技术小絮
698 0
xosadmin
xosadmin
1 year ago
推荐 Windows FTP服务器通过PASV模式无法获取目录的解决方法
Windows FTP Server是一个Windows IIS自带的FTP服务器。在搭建后可能会出现通过PASV模式无法获得目录列表的问题。具体解决方法如下: 在Server Manager中安装FTP Extensions (若已安装 ...
  • 技术小絮
355 0
  • Proxmox强制删除离线集群节点方法
  • PVE Cluster给node更换corosync IP的方法
  • HPE Microserver系列降低噪音的一种办法
  • Debian 13 Trixie安装Proxmox VE
  • Windows FTP服务器通过PASV模式无法获取目录的解决方法
  • Proxmox日志出现大量lxcfs truncated错误的解决方案

文章聚合

  • Proxmox强制删除离线集群节点方法
  • PVE Cluster给node更换corosync IP的方法
  • Debian 13 Trixie安装Proxmox VE
  • Proxmox日志出现大量lxcfs truncated错误的解决方案
  • Proxmox通过CLI向LXC挂载已有虚拟磁盘的方法
  • Proxmox VE通过全盘方式直通硬盘

Multilangual Translator

Copyright © 2016-2026 X-osadminの自留地. All rights reserved. 萌ICP备20258855号
  • 博客主页 HomePage
  • 技术小絮 Tech
  • 软件专题 Softs
    • proxmox
    • openwrt
    • chromebook
    • Zerotier
    • 虚拟化
  • 友情链接 Following
Welcome
Forgot password?
Welcome
Forgot password?
Social Login
Login with WeChat QR Code
Unregistered WeChat IDs will be automatically used to create an account.
Scan and Reply with Keywords「登录」Get Verification Code
Social Login
Free registration
Social Login
Reset password
Back to Login