(1)windows平台-ubuntu虚拟机环境的建立(家庭版)

晨曦之光 发布于 2012/03/09 14:14
阅读 270
收藏 0

本博客(http://blog.csdn.net/livelylittlefish)贴出作者(三二一、小鱼)相关研究、学习内容所做的笔记,欢迎广大朋友指正!

 

 

windows平台-ubuntu虚拟机环境的建立

 

Soft: Sun xVM VirtualBox

Version: 2.0.4

 

Logic connection:

 

 

WAN口信息:

连接状态       连接
WAN IP        192.168.1.2
子网掩码       255.255.255.0
网关           192.168.1.1
域名服务器      192.168.1.1
备用域名服务器  192.168.1.1
连接方式        静态 IP

LAN口信息:

IP地址    192.168.18.1

子网掩码 255.255.255.0

 

Steps:

 

Step0: install ubuntu7, ubuntu8 and winxp-jp in "Sun XVM VirtualBox" environment as guests

Step1: set network of Host and all guests as the following table

Step2: create host interface of the guests using the following commands

D:/Program Files/xVM VirtualBox>VBoxManage createhostif ubuntu7

D:/Program Files/xVM VirtualBox>VBoxManage createhostif ubuntu8

D:/Program Files/xVM VirtualBox>VBoxManage createhostif winxp

注意:在virtualbox中,设置网络时选择“Attached to”为“Host Interface”。

 

Step3: create bridge connection between host and the guests, and set the network information of the bridge

Step4: modify the hosts file in order to interconnect all machine, including the host and the guests

 

 

Network settings:

 

OS

hostname

IP

Gateway

DNS

Host/Bridge

Vista utimate

yu20

192.168.18.20

192.168.18.1

202.109.14.5

Guest1

Ubuntu7

yu27

192.168.18.27

192.168.18.1

202.109.14.5

Guest2

Ubuntu8

yu28

192.168.18.28

192.168.18.1

202.109.14.5

Guest3

Winxp-jp

yu30

192.168.18.30

192.168.18.1

202.109.14.5

Here, internet identifies the bridge as my host.

 

 

Hosts file:

  • Host/yu20

文件: C:/Windows/System32/drivers/etc/hosts

 

127.0.0.1       localhost

192.168.18.20   yu20

192.168.18.27   yu27

192.168.18.28   yu28

192.168.18.30      yu30

 

  • Guest1/yu27

文件:/etc/hosts

 

127.0.0.1       localhost

192.168.18.20 yu20

192.168.18.27 yu27

192.168.18.28 yu28

192.168.18.30 yu30

 

  • Guest2/yu28

文件:/etc/hosts

文件内容同Guest1/yu27

 

  • Guest3/yu30

文件: C:/Windows/System32/drivers/etc/hosts

文件内容同Host/yu20

 

 

链接internet设置(以yu28, 192.168.18.28为例):

  • 文件:/etc/network/interface

 

auto lo

iface lo inet loopback

iface eth1 inet static

address 192.168.18.28

netmask 255.255.255.0

gateway 192.168.18.1

auto eth1

 

  • 文件:/etc/resolv.conf

 

nameserver 202.109.14.5

nameserver 124.74.213.68

 

至此,虚拟机-ubuntu实验环境建立完毕,可以在hostguests上用“ping IP”或者“ping hostname”命令来检查他们的互通。


原文链接:http://blog.csdn.net/livelylittlefish/article/details/4392511
加载中
返回顶部
顶部