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

Logo

魔乐社区(Modelers.cn) 是一个中立、公益的人工智能社区,提供人工智能工具、模型、数据的托管、展示与应用协同服务,为人工智能开发及爱好者搭建开放的学习交流平台。社区通过理事会方式运作,由全产业链共同建设、共同运营、共同享有,推动国产AI生态繁荣发展。

更多推荐