在Hyper-V中安装和配置Ubuntu Server 11.04 10.10
2012-03-24 20:38
555 查看
背景
Ubuntu Linux已经发布了11.04版本,目前能够在Windows Hyper-V中高效运行的Ubuntu已经有2个release了(11.04和10.10)。由于Ubuntu Server的内核中已经编译了Hype-V IC的模块,因此只需要在经过简单的配置,使kernel在启动时加载Hyper-V IC module就可以高效运行了。
下载安装介质
Ubuntu Linux的11.04和10.10,只有Server版中才包括Hyper-V IC的模块,因此需要下载Ubuntu Server版的安装ISO: http://releases.ubuntu.com/11.04/ubuntu-11.04-server-amd64.iso http://releases.ubuntu.com/10.10/ubuntu-10.10-server-amd64.iso
安装过程
1. 在Hyper-V中为安装Ubuntu Server建立VM,1-4个CPU,内存512MB以上,网卡,设置从已下载的Ubuntu安装ISO启动。
如果无法出现初始化虚拟机的提示,请打上Windows Server 2008 R2 SP1的补丁(windows6.1-KB976932-X64.exe)。下载地址:http://www.microsoft.com/downloads/zh-cn/details.aspx?displaylang=zh-cn&FamilyID=c3202ce6-4056-4059-8a1b-3a9b77cdfdda
2. 安装正常步骤安装Ubuntu Server
3. 安装结束后在编辑Ubuntu Server中的文件/etc/initramfs-tools/modules,在文件末尾添加配置行:
hv_vmbus
hv_storvsc
hv_blkvsc
hv_netvsc
4. 运行update-initramfs,并reboot系统
# update-initramfs –u
# reboot
5. Ubunut再次启动后已经是Hyper-V IC生效(enable)了,可以使用lsmod命令进行验证:
# lsmod | grep hv_vmbus
hv_vmbus 50431 4 hv_utils,hv_netvsc,hv_blkvsc,hv_storvsc
6.设置IP、网关、掩码等。vi /etc/network/interfaces,添加以下内容:
使用静态IP:
iface eth0 inet static
address 192.168.83.200
netmask 255.255.255.0
gateway 192.168.83.2
auto eth0
使用DHCP:
auto eth0
iface eth0 inet dhcp
7.添加DNS,vi /etc/resolv.conf(可能要新建),添加以下内容:
nameserver 192.168.83.2
8.重新启动网络:
/etc/init.d/networking restart
我们一起看看怎么样在Ubuntu 12.04 LTS Server版中配置自己的DNS服务器吧!
首先我们需要创建一个文件/etc/resolvconf/resolv.conf.d/tail:
#vim /etc/resolvconf/resolv.conf.d/tail
然后我们在这个文件里写入自己要添加的DNS服务器,格式与以前的/etc/resolv.conf文件一致:
nameserver 8.8.8.8
nameserver 8.8.4.4
然后输入wq保存退出。接下来我们重启下resolvconf程序,让配置生效:
#/etc/init.d/resolvconf restart
再去看看/etc/resolv.conf文件,自己添加的DNS服务器果然乖乖的写进去了!至此问题完美解决!
在12.04 也可以采用更简单的方法:
auto eth0
iface eth0 inet static
address 192.168.1.2
gateway 192.168.1.1
network 192.168.1.0
broadcast 192.168.1.255
dns-nameservers 8.8.8.8 8.8.4.4
Ubuntu Linux已经发布了11.04版本,目前能够在Windows Hyper-V中高效运行的Ubuntu已经有2个release了(11.04和10.10)。由于Ubuntu Server的内核中已经编译了Hype-V IC的模块,因此只需要在经过简单的配置,使kernel在启动时加载Hyper-V IC module就可以高效运行了。
下载安装介质
Ubuntu Linux的11.04和10.10,只有Server版中才包括Hyper-V IC的模块,因此需要下载Ubuntu Server版的安装ISO: http://releases.ubuntu.com/11.04/ubuntu-11.04-server-amd64.iso http://releases.ubuntu.com/10.10/ubuntu-10.10-server-amd64.iso
安装过程
1. 在Hyper-V中为安装Ubuntu Server建立VM,1-4个CPU,内存512MB以上,网卡,设置从已下载的Ubuntu安装ISO启动。
如果无法出现初始化虚拟机的提示,请打上Windows Server 2008 R2 SP1的补丁(windows6.1-KB976932-X64.exe)。下载地址:http://www.microsoft.com/downloads/zh-cn/details.aspx?displaylang=zh-cn&FamilyID=c3202ce6-4056-4059-8a1b-3a9b77cdfdda
2. 安装正常步骤安装Ubuntu Server
3. 安装结束后在编辑Ubuntu Server中的文件/etc/initramfs-tools/modules,在文件末尾添加配置行:
hv_vmbus
hv_storvsc
hv_blkvsc
hv_netvsc
4. 运行update-initramfs,并reboot系统
# update-initramfs –u
# reboot
5. Ubunut再次启动后已经是Hyper-V IC生效(enable)了,可以使用lsmod命令进行验证:
# lsmod | grep hv_vmbus
hv_vmbus 50431 4 hv_utils,hv_netvsc,hv_blkvsc,hv_storvsc
6.设置IP、网关、掩码等。vi /etc/network/interfaces,添加以下内容:
使用静态IP:
iface eth0 inet static
address 192.168.83.200
netmask 255.255.255.0
gateway 192.168.83.2
auto eth0
使用DHCP:
auto eth0
iface eth0 inet dhcp
7.添加DNS,vi /etc/resolv.conf(可能要新建),添加以下内容:
nameserver 192.168.83.2
8.重新启动网络:
/etc/init.d/networking restart
我们一起看看怎么样在Ubuntu 12.04 LTS Server版中配置自己的DNS服务器吧!
首先我们需要创建一个文件/etc/resolvconf/resolv.conf.d/tail:
#vim /etc/resolvconf/resolv.conf.d/tail
然后我们在这个文件里写入自己要添加的DNS服务器,格式与以前的/etc/resolv.conf文件一致:
nameserver 8.8.8.8
nameserver 8.8.4.4
然后输入wq保存退出。接下来我们重启下resolvconf程序,让配置生效:
#/etc/init.d/resolvconf restart
再去看看/etc/resolv.conf文件,自己添加的DNS服务器果然乖乖的写进去了!至此问题完美解决!
在12.04 也可以采用更简单的方法:
auto eth0
iface eth0 inet static
address 192.168.1.2
gateway 192.168.1.1
network 192.168.1.0
broadcast 192.168.1.255
dns-nameservers 8.8.8.8 8.8.4.4
相关文章推荐
- 使用Hyper-V安装Ubuntu16.04 Server 网络配置
- V-Hyper安装ubuntu-13.10-server-amd64
- linux -- ubuntuserver 安装Apache后,修改默认目录和分布式配置文件可执行
- Ubuntu Server系列各项服务的安装和维护 PHP的配置
- 在Ubuntu Server上源码安装OpenERP 8.0,并配置wsgi和nginx运行环境
- Hyper-v 下安装ubuntu 12.04 server 网卡问题
- ubuntu server nginx 安装与配置
- [笔记] 在T430上安装ubuntu server 12.04并配置wifi
- VirtualBox Ubuntu server 安装Openstack 网络配置
- Ubuntu Server 16.04下安装及配置MySQL
- Ubuntu server10.10下安装配置SVN
- Hyper-v中安装和配置ubuntu
- ubuntu-server-12.04.2安装配置jdk
- ubuntu服务器上SSH Server的安装和配置
- Ubuntu Server 16.04.1 安装配置jdk和Tomcat(云服务器配置)
- ubuntu server 安装 mantis bug tracker 中文配置
- ubuntu server 16.04的安装 以及配置网络还有ssh服务
- ubuntu server 12.04 上mysql的安装与配置
- 阿里云ubuntu 16.04 Server配置方案 3 安装git ,node,pyhon常用的工具
- ubuntu安装配置DNS server