1、在Hyper-V控制檯新建虛機,注意虛機的網卡先選擇“舊版網絡適配器”,主要是方便有關服務的網絡在線安裝。
2、到微軟網站下載支持包,Linux Integration Services v2.1 for Windows Server 2008 Hyper-V R2
解壓得到LinuxIC v21.iso文件
3、以最小化方式安裝Centos,除了必要的組件,其它不安裝。
4、Centos安裝完成後根據自己的網絡環境配置網絡,配置好後要能順利的訪問外網資源
(1)配置IP
vi /etc/sysconfig/network-script/ifcfg-eth0
根據自己的環境來配置IP和子網掩碼
(2)配置網關
在ifcfg-eth0添如如下命令
GATEWAY=你的網關地址
(3)配置DNS
編輯/etc/resolv.conf文件,添如如下命令
nameserver 你的DNS服務器地址
(4)重啓網絡服務,測試外網的訪問。
service network restart
5、網絡安裝以下組件命令如下:
yum install make kernel-devel gcc perl –y
6、加載Hyper-v支持文件如下圖:
7、把光盤的文件複製到硬盤進行編譯,我的環境如下
mount /dev/cdrom /mnt
mkdir /root/hyper-v
cp –R /mnt/* /root/hyper-v
cd /root/hyper-v
rm /lib/modules/2.6.18-164.el5/build
ln –s /usr/src/kernels/2.6.18-128.1.16.el5-x86_64/ /lib/modules/2.6.18-128.el5/build
make
make install
reboot
8、安裝成功後把“舊版網絡適配器”刪除,添加新的“網絡適配器”在Centos下重新配置網絡環境,以達到最佳性能。
Hyper-V 虛擬機的 Linux 集成服務 v2.1 新特性有
Driver support for synthetic devices: Linux Integration Services supports the synthetic network controller and the synthetic storage controller that were developed specifically for Hyper-V.
Fastpath Boot Support for Hyper-V(Fastpath 引導支持): Boot devices take advantage of the block Virtualization Service Client (VSC) to provide enhanced performance.
Timesync(時間同步): The clock inside the virtual machine will remain synchronized with the clock on the host.
Integrated Shutdown(集成關機): Virtual machines running Linux can be gracefully shut down from either Hyper-V Manager or System Center Virtual Machine Manager.
Symmetric Multi-Processing (SMP) Support(對稱多線程處理支持): Supported Linux distributions can use up to 4 virtual processors (VP) per virtual machine.
Heartbeat(運行狀態): Allows the host to detect whether the guest is running and responsive.
Pluggable Time Source(可插入的時鐘源): A pluggable clock source module is included to provide a more accurate time source to the guest.