<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>虚拟化  X-osadminの自留地</title>
	<atom:link href="https://www.x-osadmin.com/category/virtualization/feed" rel="self" type="application/rss+xml" />
	<link>https://www.x-osadmin.com</link>
	<description>- Powered by X-osadmin</description>
	<lastBuildDate>Sun, 03 Jun 2018 03:33:22 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.4</generator>
	<item>
		<title>CentOS 6下如何安装KVM虚拟化</title>
		<link>https://www.x-osadmin.com/323.xpost</link>
					<comments>https://www.x-osadmin.com/323.xpost#comments</comments>
		
		<dc:creator><![CDATA[xosadmin]]></dc:creator>
		<pubDate>Sun, 03 Jun 2018 03:31:17 +0000</pubDate>
				<category><![CDATA[技术小絮]]></category>
		<category><![CDATA[虚拟化]]></category>
		<guid isPermaLink="false">https://www.x-osadmin.com/?p=323</guid>

					<description><![CDATA[昨天，小编讲述了在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的服务器，那就和大家一起开始我们的操作吧！ &#160; 一、前期准备 操作系统：CentOS 6.9 X86_64 （这里必须使用64位系统） 处理器：Intel Xeon E5 [&#8230;]]]></description>
										<content:encoded><![CDATA[<div class="nc-light-gallery"><p><img fetchpriority="high" decoding="async" class=" wp-image-324 aligncenter" src="https://www.x-osadmin.com/wp-content/uploads/2018/06/未标题-1-1-300x149.jpg" alt="" width="465" height="231" srcset="https://www.x-osadmin.com/wp-content/uploads/2018/06/未标题-1-1-300x149.jpg 300w, https://www.x-osadmin.com/wp-content/uploads/2018/06/未标题-1-1.jpg 749w" sizes="(max-width: 465px) 100vw, 465px" /></p>
<p>昨天，小编讲述了在CentOS上安装OpenVZ虚拟框架的方式。应公众号里部分读者的要求，今天再给大家讲讲如何在CentOS上安装KVM虚拟框架。所谓KVM，官网给的定义如下：</p>
<blockquote><p>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.</p></blockquote>
<p>根据官网所说，KVM对HW的硬件是有要求的，比如处理器必须支持VMX或者SVM之类的指令集或者虚拟相关。这次很有幸，获得了一台支持VMX的服务器，那就和大家一起开始我们的操作吧！</p>
<p>&nbsp;</p>
<p>一、前期准备</p>
<p>操作系统：CentOS 6.9 X86_64 <span style="color: #ff0000;">（这里必须使用64位系统）</span></p>
<p>处理器：Intel Xeon E5</p>
<p>&nbsp;</p>
<p>二、安装前的预处理</p>
<p>1. 检测处理器是否支持虚拟处理集</p>
<blockquote><p># grep -E -o &#8216;vmx|svm&#8217; /proc/cpuinfo</p>
<p>这里显示VMX或者SVM即为通过，若无，请检查主板中是否开启本功能或者处理器是否支持本处理集</p></blockquote>
<p>2.更新系统软件包</p>
<blockquote><p># yum -y update</p></blockquote>
<p>&nbsp;</p>
<p>三、正式安装</p>
<p>1.安装KVM相关软件包</p>
<blockquote><p># yum -y groupinstall &#8216;Virtualization&#8217; &#8216;Virtualization Client&#8217; &#8216;Virtualization Platform&#8217; &#8216;Virtualization Tools&#8217;</p></blockquote>
<p>2.检测KVM模块是否挂载</p>
<blockquote><p># lsmod | grep kvm</p>
<p>若无返回，请执行modprobe kvm和modprobe intel-kvm</p></blockquote>
<p>3.关闭selinux和NetworkManager（若有）</p>
<blockquote><p># setenforce 0或者vi /etc/sysconfig/selinux</p>
<p># chkconfig NetworkManager off</p>
<p># service NetworkManager stop</p></blockquote>
<p>4.重启系统</p>
<blockquote><p># reboot</p></blockquote>
<p>5.检测网络转发是否开启</p>
<blockquote><p># cat /etc/sysctl.conf |grep ip_forward</p>
<p>** 若无，请自行编辑/etc/sysctl.conf文件，将ip转发功能打开后sysctl -p</p></blockquote>
<p>6.防火墙中开启VNC相关端口</p>
<blockquote><p># iptables -I INPUT -p tcp &#8211;dport 5000:6000 -j ACCEPT</p>
<p># service iptables save</p>
<p># service iptables restart</p>
<p># chkconfig iptables on</p></blockquote>
<p>通过以上步骤，您已经成功地在CentOS 6中安装KVM虚拟化框架。至于管理面板，您可以参阅KVM官方所推荐的。地址：<a href="https://www.linux-kvm.org/page/Management_Tools">传送门&gt;&gt;</a></p>
</div>]]></content:encoded>
					
					<wfw:commentRss>https://www.x-osadmin.com/323.xpost/feed</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
			</item>
		<item>
		<title>OpenVZ如何给VPS启用ppp</title>
		<link>https://www.x-osadmin.com/321.xpost</link>
					<comments>https://www.x-osadmin.com/321.xpost#respond</comments>
		
		<dc:creator><![CDATA[xosadmin]]></dc:creator>
		<pubDate>Sat, 02 Jun 2018 12:46:46 +0000</pubDate>
				<category><![CDATA[技术小絮]]></category>
		<category><![CDATA[虚拟化]]></category>
		<guid isPermaLink="false">https://www.x-osadmin.com/?p=321</guid>

					<description><![CDATA[大家好！在上一篇文章（如何在Linux(CentOS)上安装OpenVZ）中，我为大家讲述了如何在CentOS环境下安装OpenVZ虚拟框架。在此，有许多网友阅读并安装后，想给自己的VPS开启ppp功能以备不时之需。在这里，补充一篇文章为大家做补充的说明。 话不多说，切入正题~ ** 本处定义的[VEnumber]为1，即假设我想要开放ppp功能的目标vps编号为1 ** 本处所有操作全部在HN（母鸡）上完成 1.请先确认ppp的模块是否在母鸡系统上开启 # modprobe ppp_async # modprobe ppp_deflate # modprobe ppp_mppe # lsmod &#124; grep ppp 2. 确保ppp模块会在母鸡开机时被自动加载 # vi /etc/sysconfig/modules/ppp.modules #!/bin/sh /sbin/modprobe ppp_async /sbin/modprobe ppp_deflate /sbin/modprobe ppp_mppe # chmod +x /etc/sysconfig/modules/ppp.modules 3.关闭目标VPS虚拟机并将ppp写入配置文件 # vzctl stop 1 # vzctl set 1 --features ppp:on --save 4.开启目标VPS，并执行以下命令 # vzctl start 1 # [&#8230;]]]></description>
										<content:encoded><![CDATA[<div class="nc-light-gallery"><p><img decoding="async" class=" wp-image-320 aligncenter" src="https://www.x-osadmin.com/wp-content/uploads/2018/06/未标题-1-300x149.jpg" alt="" width="423" height="210" srcset="https://www.x-osadmin.com/wp-content/uploads/2018/06/未标题-1-300x149.jpg 300w, https://www.x-osadmin.com/wp-content/uploads/2018/06/未标题-1-750x372.jpg 750w, https://www.x-osadmin.com/wp-content/uploads/2018/06/未标题-1.jpg 753w" sizes="(max-width: 423px) 100vw, 423px" /></p>
<p>大家好！在上一篇文章（<a href="https://www.x-osadmin.com/index.php/archives/319">如何在Linux(CentOS)上安装OpenVZ</a>）中，我为大家讲述了如何在CentOS环境下安装OpenVZ虚拟框架。在此，有许多网友阅读并安装后，想给自己的VPS开启ppp功能以备不时之需。在这里，补充一篇文章为大家做补充的说明。</p>
<p>话不多说，切入正题~</p>
<p><span style="color: #ff0000;">** 本处定义的[VEnumber]为1，即假设我想要开放ppp功能的目标vps编号为1</span></p>
<p><span style="color: #ff0000;">** 本处所有操作全部在HN（母鸡）上完成</span></p>
<p>1.请先确认ppp的模块是否在母鸡系统上开启</p>
<pre># modprobe ppp_async
# modprobe ppp_deflate
# modprobe ppp_mppe
# lsmod | grep ppp

2. 确保ppp模块会在母鸡开机时被自动加载</pre>
<pre># vi /etc/sysconfig/modules/ppp.modules
#!/bin/sh
/sbin/modprobe ppp_async
/sbin/modprobe ppp_deflate
/sbin/modprobe ppp_mppe</pre>
<pre># chmod +x /etc/sysconfig/modules/ppp.modules

3.关闭目标VPS虚拟机并将ppp写入配置文件

# vzctl stop 1
# vzctl set 1 --features ppp:on --save

4.开启目标VPS，并执行以下命令

# vzctl start 1
# vzctl set 1 --devices c:108:0:rw --save
# vzctl exec 1 mknod /dev/ppp c 108 0
# vzctl exec 1 chmod 600 /dev/ppp</pre>
<p>通过以上步骤，您已经成功的为编号为1的VPS开启了ppp功能。至于检测是否成功开启，请在编号为1的VPS下执行下面的操作。</p>
<p># vzctl enter 1  //这一步可以通过ssh替代</p>
<p># cat /dev/ppp</p>
<p>如果回应cat: /dev/ppp: No such file or directory或者是cat: /dev/ppp: No such device or address，说明开启成功。如果不是，请检查VPS的配置。</p>
</div>]]></content:encoded>
					
					<wfw:commentRss>https://www.x-osadmin.com/321.xpost/feed</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>如何在Linux(CentOS)上安装OpenVZ</title>
		<link>https://www.x-osadmin.com/319.xpost</link>
					<comments>https://www.x-osadmin.com/319.xpost#respond</comments>
		
		<dc:creator><![CDATA[xosadmin]]></dc:creator>
		<pubDate>Sat, 02 Jun 2018 12:33:07 +0000</pubDate>
				<category><![CDATA[技术小絮]]></category>
		<category><![CDATA[虚拟化]]></category>
		<guid isPermaLink="false">https://www.x-osadmin.com/?p=319</guid>

					<description><![CDATA[近日，有一位朋友向我请教如何在其自己的CentOS服务器上安装OpenVZ虚拟化。所谓OpenVZ，官方对其的定义如下： “OpenVZ is a container-based virtualization for Linux. OpenVZ creates multiple secure, isolated Linux containers (otherwise known as VEs or VPSs) on a single physical server enabling better server utilization and ensuring that applications do not conflict. Each container performs and executes exactly like a stand-alone server; a container can be rebooted independently and have root [&#8230;]]]></description>
										<content:encoded><![CDATA[<div class="nc-light-gallery"><p><img decoding="async" class="wp-image-320 aligncenter" src="https://www.x-osadmin.com/wp-content/uploads/2018/06/未标题-1-300x149.jpg" alt="" width="435" height="216" srcset="https://www.x-osadmin.com/wp-content/uploads/2018/06/未标题-1-300x149.jpg 300w, https://www.x-osadmin.com/wp-content/uploads/2018/06/未标题-1-750x372.jpg 750w, https://www.x-osadmin.com/wp-content/uploads/2018/06/未标题-1.jpg 753w" sizes="(max-width: 435px) 100vw, 435px" /></p>
<p>近日，有一位朋友向我请教如何在其自己的CentOS服务器上安装OpenVZ虚拟化。所谓OpenVZ，官方对其的定义如下：</p>
<blockquote>
<p style="text-align: left;"><b>“OpenVZ</b> is a container-based virtualization for Linux. OpenVZ creates multiple secure, isolated Linux containers (otherwise known as VEs or VPSs) on a single physical server enabling better server utilization and ensuring that applications do not conflict. Each container performs and executes exactly like a stand-alone server; a container can be rebooted independently and have root access, users, IP addresses, memory, processes, files, applications, system libraries and configuration files.”</p>
</blockquote>
<p>由于是调用母鸡的系统内核，所以会导致openvz的虚拟机部分功能默认是不可使用或者是默认关闭的，如ppp和tun功能。（之后将讲述如何在母鸡上为虚拟机开启本功能）</p>
<p>话不多说，进入教程~</p>
<p>&nbsp;</p>
<p>一、环境配置</p>
<p>采用的服务器操作系统：CentOS 6.9 X86_64</p>
<p><span style="color: #ff0000;">** 这里注意：32位的操作系统可能会提示无法找到openvz相关的安装包，所以，认为64为操作系统为宜</span></p>
<p>&nbsp;</p>
<p>二、安装前的准备阶段</p>
<p>1.关闭SeLinux，命令：</p>
<blockquote><p>setenforce 0</p></blockquote>
<p>2.更新系统软件包</p>
<blockquote><p>yum -y update</p></blockquote>
<p>&nbsp;</p>
<p>三、正式安装</p>
<p>1.载入OpenVZ的yum key并安装OpenVZyum源</p>
<pre># wget -O /etc/yum.repos.d/openvz.repo http://download.openvz.org/openvz.repo
# rpm --import http://download.openvz.org/RPM-GPG-Key-OpenVZ

2. 安装VZKernel

# yum -y install vzkernel

3. 确保在grub中，vzkernel是首选启动项，查看title Openvz所处位置，若是第一个，请确保title上一行的启动顺序为0

# vi /boot/grub/menu.lst

4. 安装OpenVZ工具</pre>
<pre># yum install vzctl vzquota ploop -y

5. 更改系统内核，并将内核文件改为下面附上的形式

# vi /etc/sysctl.conf</pre>
<pre>net.ipv4.ip_forward = 1
net.ipv4.conf.default.proxy_arp = 0
net.ipv4.conf.all.rp_filter = 1
kernel.sysrq = 1
net.ipv4.conf.default.send_redirects = 1
net.ipv4.conf.all.send_redirects = 0
net.ipv4.icmp_echo_ignore_broadcasts=1
net.ipv4.conf.default.forwarding=1</pre>
<pre>6. 重启系统

# reboot

重启后，通过以上步骤，您已经成功安装了openvz框架。

** 扩展：安装OpenVZ Web Panel

请使用以下命令：

wget http://downs1.x-osadmin.com/ai.sh &amp;&amp; sh ai.sh

若提示wget: command not found，请执行yum -y install wget。</pre>
</div>]]></content:encoded>
					
					<wfw:commentRss>https://www.x-osadmin.com/319.xpost/feed</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
