hyper-v 安装linux后,需要安装linux集成服务包和鼠标驱动包。具体安装方法和下载地址如下:
1。 linux集成服务包
必要條件就是要先在linux 虚拟机上安裝好gcc及Kernel-devel
拷贝iso中的内容到某个目录下,运行:
make
make install
reboot
2. 鼠标linux驱动包
To install the InputVSC driver: (you must be root:)
1. Download and attach the .ISO file to a Hyper-V guest with the Linux Integration Components already installed.
2. Copy the contents of the .ISO to the desired directory
3. Run setup.pl with the inputdriver argument:
# ./setup.pl inputdriver
安装报错,根据报错信息建立相应的文件夹,如果缺少文件,可以直接在包中找到。并将其复制到要求的文件夹即可。
测试后发现还是有偏差,放弃这个方法。选择VNC连接。
windows端:安装vnc-4_1_3-x86_win32.exe
linux端:yum install vnc-server
配置VNC连接:
1. 在linux服务器上输入:vncserver
输入两次密码;
(关闭vncserver:vncserver -kill:1
修改密码:vncpasswd)
2. 修改文件/root/.vnc/xstartup
去掉如下两行注释:
unset SESSION_MANAGER
exec /etc/X11/xinit/xinitrc
修改xstartup文件权限:
chmod 777 xstartup
3. 修改文件/etc/sysconfig/vncservers
去掉如下两行注释:
VNCSERVERS="1:root"
VNCSERVERARGS[2]="-geometry 800x600"
4. 重启服务:
service vncserver restart
5. 开放端口:
关闭防火墙:/etc/init.d/iptables stop
或者添加规则到文件/etc/sysconfig/iptables:
-A INPUT -m state --state NEW -m tcp -p tcp --dport 5901 -j ACCEPT
重启:/etc/init.d/iptables restart
6. windows客户端连接
IP:1