连接虚拟机后,发现鼠标不能点击进去操作,主要是需要安装集成服务,而微软默认的集成服务是不支持linux

其实用键盘快捷键alt+F1打开网络设置为192.168.0.52,后用

用Ctrl+Shift+Numlock就可以用小键盘代替鼠标了。“/”、“*”、“-”分别用来选择鼠标左键、中键(就是滚轮)、右键。5单击0拖拽.释放

其实为什么一定要用集成环境呢?我们打开ubuntu的远程桌面后,用VNC来远程连接就ok了。

==========

首先下载:

安装见下文:

In this article I am documenting the process for installing the Hyper-V Integration Components within a Ubuntu or Debian VM. I am specifically writing this for Ubuntu 8.04.2 and Debian 5, however I have additionally confirmed that this process works on both Ubuntu 8.10 and Ubuntu 9.04. My environment consists of x64 VMs, I have not taken the time to test this process for x86 VMs, however it should hold true, as long as you update the package names to reflect the appropriate architecture.

In my testing I have found that the current versions (v1 and v2) do not work with linux kernels 2.6.20 or newer, which means in order to use the ICs you will need to have 2.6.19 or older. For this article I wanted to make sure this process was simple enough that if you do not fully understand what I am doing, you can still follow along, and hopefully learn something. Because of this focus on simplicity I have decided to use the linux kernel 2.6.18-6, which I was able to find in some official apt repositories. If you are familar with manually installing a kernel image then feel free to install the 2.6.19 kernel image. However I will not be covering that in this article.

While reading the Hyper-V Integration Components readme they talk about implementing the Xen kernel (x2v) this is not necessary, and really is kind of a hinderance for a lot of production environments. I will not be installing this as part of this article.

Now before we get started you need to deploy a new VM with Ubuntu or Debian installed. Please do not attempt to follow these instructions on a production machine, do it in test until you are comfortable with the process, then do it in prod.

STEP 1 – Install the New Old Kernel and Prerequisites

Elevate permissions to root (on Debian you will need to su -)

$ sudo -s

Open the /etc/apt/sources.list

# nano /etc/apt/sources.list

Add the following at the end

## Repositories which contain older versions of the linux kernel (needed for Hyper-V Linux IC)

deb http://ftp.us.debian.org/debian etch main

deb http://security.debian.org/debian-security etch/updates main

Update your package list (You will get GPG errors/warnings on Ubuntu since the keys are not loaded for this debian repository)

# apt-get update

Install the kernel, headers, and build-essential (needed to compile Linux IC later)

# apt-get install linux-image-2.6.18-6-amd64 linux-headers-2.6.18-6-amd64 build-essentialComment out the repositories we added earlier

# nano /etc/apt/sources.list

## Repositories which contain older versions of the linux kernel (needed for Hyper-V Linux IC)

# deb http://ftp.us.debian.org/debian etch main

# deb http://security.debian.org/debian-security etch/updates main

Change the default boot kernel (count the number of the kernels starting with 0 – in my case the installed kernel is number 2 – For Debian it was 4)

# nano /boot/grub/menu.lst

default 2

Reboot

# reboot

STEP 2 – Install Linux Integration Components

Elevate permissions to root (on Debian you will need to su -)

$ sudo -sConfirm boot to correct kernel.

# uname -a

Prestage Integration Components files

# mkdir /opt/linux_ic

Copy files from cd (Debian had it at /media/cdrom0)

# cp -R /media/CDROM/* /opt/linux_ic/

# cd /opt/linux_icExecute installation script (this willl result in an error while “installing various udev rules and scripts”)

# ./setup.pl drivers

View the drvinstall.err to confirm that the error was the expected error.

# cat drvinstall.err

Building modules, stage 2.

/opt/linux_ic/drivers/dist/blkvsc/blkvsc_drv.c: In function ‘blkvsc_ioctl’;

/opt/linux_ic/drivers/dist/blkvsc/blkvsc_drv.c:1447: warning: unused variable ‘blkdev’

Building modules, stage 2.

Building modules, stage 2.

Building modules, stage 2.

make: udevcontrol: Command not found

make: *** [install] Error 127

Now this error means that the modules have been created, however there was an issue creating the initrd, so the modules will not be loaded at startup. We will need to manually do this.

STEP 3 – Manually Load Modules for Verification

Load modules with modprobe

# modprobe vmbus

# modprobe netvsc

# modprobe storvsc

# modprobe blkvsc

View loaded modules with lsmod (if this outputs the 4 modules plus the scsi_mod module then the modules are all installed and working)

# lsmod | grep vsc

STEP 4 – Configure Modules to be Loaded at Startup

Open /etc/modules for editing

# nano /etc/modules

Add the following to the end

## Modules needed for Hyper-V Synthetic Devices

netvsc

blkvsc

storvsc

Shutdown the VM and reconfigure the Hyper-V Hardware to remove the Legacy Network Adapter and add the Network Adapter (I personally like to use the same MAC Address).

# shutdown -h nowPower it back up and confirm modules have loaded.

$ lsmod | grep vsc

$ ifconfig -a

Elevate permissions to root (on Debian you will need to su -)

$ sudo -s

Edit /etc/network/interfaces to allow the new interface to start automatically

# nano /etc/network/interfacesAdd the following lines (In Debian I modified the existing entries for eth0 to show seth0 and changed allow-hotplug to auto – when I did not change the allow hotplug to auto it did not automatically use DHCP)

auto seth0

iface seth0 inet dhcp

Restart Networking

# /etc/init.d/networking restart

STEP 4 – Configure Modules to be Loaded at Startup (updated 5/20/2009)

Open /etc/initramfs-tools/modules for editing

# nano /etc/initramfs-tools/modules

Add the following to the end

netvsc

blkvsc

storvsc

Rebuild the initrd image

# update-initramfs -u

Edit /etc/network/interfaces to allow the new interface to start automatically

# nano /etc/network/interfacesAdd the following lines (In Debian I modified the existing entries for eth0 to show seth0 and changed allow-hotplug to auto – when I did not change the allow hotplug to auto it did not automatically use DHCP)

auto seth0

iface seth0 inet dhcp

Shutdown the VM and reconfigure the Hyper-V Hardware to remove the Legacy Network Adapter and add the Network Adapter (I personally like to use the same MAC Address).

# shutdown -h now

Power it back up and confirm modules have loaded.

$ lsmod | grep vsc

$ ifconfig -a

Well there you have it, you now have successfully installed the Linux Integration Components.

UPDATE I (5/20/2009)

When loading storage modules with /etc/modules you will receive some errors in your initial boot screens. These do not affect the loading of the modules, however if you use the below alternative to step 4 then the modules are loaded into the initrd meaning they start with the kernel which eliminates this error. Additionally I moved the network reconfig to prior to the shutdown, to eliminate the need for the networking restart. I have tested this method on Ubuntu and Debian as previously documented.

Related posts:

ubuntu安装Linux集成服务,Hyper-v R2中安装ubuntu后,安装集成环境。--梦飞翔的地方(梦翔天空)...相关推荐

  1. t30服务器u盘如何安装系统,无光驱使用U盘/Ukey/闪存/启动电脑安装winxp sp3的操作系统--梦飞翔的地方(梦翔天空)...

    ● 把电脑的第一启动项设为USB设备启动 以往用光盘装系统,必须调整启动项为光驱启动,而现在我们要用U盘装系统,所以要调整为U盘启动.关于这个,不同电脑不同版本的bios有不同的设置方法,不过都大同小 ...

  2. 凌动上网本改装linux,Ubuntu Netbook Remix 专为上网本打造的linux系统--梦飞翔的地方(梦翔天空)...

    下载后,使用liveusb-creator-3.9.1进行傻瓜化安装在闪存中,我找了一个2G SD卡和读卡器,格式化成fat32后,加载iso,选择盘符就顺利安装了.(原来fat格式会出错,fat32 ...

  3. hdfs 多个文件合并_hadoop学习笔记3 hadoop程序将本地文件夹中多个文件,合并为一个文件并上传到hdfs中--梦飞翔的地方(梦翔天空)...

    今天梦翔儿,成功实现hadoop编程,将本地文件夹中多个文件,合并为一个文件并上传到hdfs中 直接上代码:PutMerge.java import java.io.IOException; impo ...

  4. linux下创建nginx虚拟目录详解,通过Samba映射Linux磁盘作为Windows IIS的虚拟目录--梦飞翔的地方(梦翔天空)...

    对于Windows和Linux共存的网站,头疼的问题之一是数据共享.例如,网站有大量静态网页,这些页面由WINDOWS动态站点生成,由LINUX的NGINX(或APACHE.LIGHTHTTP)展示, ...

  5. win7下安装linux(CentOS)过程中遇到的问题总结

    1.由于学习的需要,按照网上的两篇教程自己动手在win7系统下安装了CentOS6.6版本. 2.无论多么详细的教程,都应该结合自己的软硬件环境小心处理,不然就会造成意想不到的问题. 3.安装linu ...

  6. 镜像安装linux选择内核版本,在CentOS和Ubuntu中安装Linux Kernel 4.13.10

    Linus Torvalds 在 10 月 17 日星期五正式发布了稳定版 Linux Kernel 4.13.10,这个最新版本发布了新功能,进行了诸多修复和问题改进.下面将向大家介绍在 CentO ...

  7. win10安装linux分配两个磁盘,Win10 与 Ubuntu 16.04 LTS 双硬盘双系统安装及环境配置...

    笔记本主系统是Win10(64bit),想硬盘安装子系统Ubuntu 16.04 LTS (64bit),于是在自己的笔记本电脑上尝试安装. 笔记本配置: 系统:Windows 10 64bit  p ...

  8. linux 运行 hyper v,Microsoft Loves Linux—运行在Hyper-V上的Linux与FreeBSD

    常常听到大家问我们重复的问题:"微软到底会为 Linux 做些什么? ",我们的答案是:"非常多! ". 将会持续的投资并且创新 Linux 上的能力,不仅只有在 Azure 公有云上,而在私有服务如 ...

  9. usb3.0 u盘 安装 linux,在16G USB3.0中安装ubuntu10.10成功!U盘功能可用

    折腾了快两天,终于成功的将ubuntu装入U盘,同时能够保持U盘功能,激动ing... 感兴趣的同学可以查看附件.(ps:不会传,现把全文内容附上,说不上原创,不过集合了网上很多的资源,自己稍有发挥. ...

最新文章

  1. 学习Python有什么优势?
  2. dva的用法_dva.js 用法详解:列表展示
  3. 分析工厂模式中的问题并改造
  4. hadoop中的filesystem和localfilesystem
  5. docker wsl2启动不了_Docker学习笔记
  6. C#中HTML和UBB互相转换的代码
  7. Struts 2 入门
  8. 软件架构引言之项目管理的问题
  9. ORACLE 指令基础学习
  10. hash算法_Hash 一致性算法的 Java 实现
  11. Pyqt之exec()和show()与弹出自定义对话框
  12. 摄影后期从入门到精通(一)
  13. 配置vps服务器,拨号换ip(一)
  14. Macs Fan Control Pro for mac( 电脑风扇控制软件)v1.5.12中文激活版
  15. FFmpeg将多张图片合成视频
  16. Could not resolve hostname github: Name or service
  17. 虚拟机Hyper-V的安装以及使用教程
  18. 105道Java面试题
  19. C numi和弓道 双指针(2020牛客寒假基础训练营1 )
  20. pv=nrt_中学物理之pV=nRT应用总结篇

热门文章

  1. 网易七鱼的使用(web代码接入)
  2. 如何选择适合你的兴趣爱好(三十三),国画
  3. 【Mac】如何显示文件夹内隐藏文件
  4. 冲正交易是属于TCC模式么
  5. 期货开户交易交易风格各异
  6. 今日头条前端实习面试经验
  7. FineReport报表工具最新版本细则
  8. AT对峙,不止百度出局那么简单
  9. 关于OLED显示屏的理解
  10. 【FXCG】纪律管理之入场及建仓原则