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,247
1

📮Comments (1)

xosadmin
xosadmin
5 years ago
推荐 curl: (35) Peer reports incompatible or unsupported protocol version的解决方法
近日在做CentOS 7维护时,在尝试curl时,遇到了curl: (35) Peer reports incompatible or unsupported protocol version.的问题。本问题是由于相应的包版本过老导致的。 ...
  • 技术小絮
2,363 0
xosadmin
xosadmin
3 years ago
推荐 Debian设置802.1q vlan的方法
802.1Q VLAN是一种非常常见的VLAN技术,Debian也支持本VLAN技术。本文将以Debian 12 x64作为演示。 首先,在操作系统下安装vlan程序包 apt-get install vlan -y 2. 将802.1 ...
  • 技术小絮
785 0
xosadmin
xosadmin
7 months ago
推荐 PVE Cluster给node更换corosync IP的方法
在本篇文章中,假设PVE Cluster有如下节点,并且需要更换其中一个节点的corosync/cluster通讯IP,以讲述更换方法。 假设的Cluster: Node A: 192.168.1.1/24 Node B: 192.168. ...
  • proxmox
  • 技术小絮
108 0
xosadmin
xosadmin
6 years ago
推荐 OpenWrt设置Zerotier后LAN端不通的一种解决方案
近日在openwrt上设置完zerotier后,出现了一个问题:在LAN的主机上ping网关(OpenWrt路由器)不通,LAN主机互相ping也不通,但是网关可以连接网络。在经过traceroute后,发现部分LAN的请求被自动转发到ze ...
  • 技术小絮
8,398 0
xosadmin
xosadmin
6 years ago
推荐 apache提示You don’t have permission to access /* on this server.的解决方法
首先,X-osadmin在这里祝大家520快乐!近日有朋友遇到了这样一个问题:在CentOS 8下安装php-fpm+apache,在浏览器打开时均提示You don’t have permission to access / ...
  • 技术小絮
3,891 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