Hyper-V的ubuntu的网络

来源:互联网 发布:手机淘宝店铺怎么登陆 编辑:程序博客网 时间:2024/04/30 14:50
Ubuntu server 12.04.2 没有启用 Hyper-VIC module ,在安装完系统后需要执行以下操作完成网络的配置
1.编辑/etc/initramfs-tools/modules ,并追加以下内容
hv_vmbus
hv_storvsc
hv_blkvsc
hv_netvsc
2.运行update-initramfs,并reboot系统
$sudo update-initramfs –u
$ sudo reboot
3.检查
$ lsmod | grep hv_vmbus
hv_vmbus 360544 hv_utils,hv_netvsc,hv_blkvsc,hv_storvsc(显示内容)
4.配置网卡IP地址, 编辑/etc/network/interfaces 。 下面两种配置方法,二选一,推荐使用静态IP地址。
DHCP配置
auto eth0
iface eth0 inet dhcp
静态地址根据实际情况修改IP地址和网关(x根据具体情况,配置相应的值)
autoeth0 
iface eth0 inet static
address x.x.x.x 
netmask x.x.x.x 
gateway x.x.x.x  
dns-nameservers x.x.x.x
5.重新启动网络
sudo /etc/init.d/networkingrestart 
0 0
原创粉丝点击