自我介紹

shian

Tis night: now doth my longing break forth in me as a fountain ,-for speech do I long.

Menu:

Recent Entries

About

Tis night: now doth my longing break forth in me as a fountain ,-for speech do I long.

Categories

網管工作 [85]
隨想手札 [35]
資訊教育 [25]

Links

請按右鍵在新視窗開啟
- 發現自在的藍天
- 藍屋頂白牆上的陽光
- 網路書籤
- ㄚ比家族日記
- shian's 資訊組相簿
- shian's 個人相簿
- 學習手札
資訊管理
- 阿欣部落
- CHICWORKS
- ADJ 網路實驗室
- 創意MOODLE新聞區
資訊教育
- 華龍國小數位學習網
- 獅湖國小BIG6網站
- IN TIME
攝影photo
- Blue JOE Photo Diary
- Free printable cardboard lens hoods
- Contax Lens Hoods
- 景深計算機
- 如何看待觀景窗的大小
- CONTAX & Zeiss T* image
- 攝影教學課程資訊網
- Wisely 攝影風情
- David 老師的PhotoStory

Syndicate

RSS 0.90
RSS 1.0
RSS 2.0
Atom 0.3

Version:

andreas01 v1.3

在Ubuntu 7.04安裝 VirtualBox1.4.0

shian | 24 六月, 2007 22:21

在Ubuntu 7.04安裝 VirtualBox1.4.0

速度快又免費的作業系統模擬器:VirtualBox

VirtualBox是一套可以在Linux或Windows作業系統中模擬出另一套作業系統的模擬軟體。
它可以模擬的作業系統類型非常多元,包括Linux系列、Mac OS系列、Windows系列等作業系統。

為何學校的Ubuntu 還要VirtualBox然後又安裝win2003 server,
因為
原本Ubuntu那一台server是安裝win2003 server負責影音串流和無硬碟server,
如今
影音串流已經被Ubuntu的OSTube取代了,剩下無硬碟server仍必須找一台server來安裝,
於是我就想到了可以用虛擬機器來試試看。

以下是安裝紀錄........ 

1.加入VirtualBox的sources

#vi /etc/apt/sources.list

#deb http://www.virtualbox.org/debian feisty non-free
2.安裝 apt-secure public key

The innotek public key for apt-secure can be downloaded here.
You can add this key with

#apt-key add innotek.asc
2.1 安裝virtualbox

#apt-get install virtualbox

3.安裝VirtualBox需要的網路套件

#sudo apt-get install uml-utilities
#sudo apt-get install bridge-utils

VirtualBox 安裝說明文件-------------

6.5.1.1 Debian and Ubuntu hosts
To set up a permanent host interface on a Debian or Ubuntu host, follow these steps:
1. On modern Debian and Ubuntu based hosts, you must first install the User Mode
Linux utilities package (uml-utilities), which contains tools to create TAP interfaces,
as well as the bridge utilities (bridge-utils). package. You can do this
from the command line using

sudo apt-get install uml-utilities
sudo apt-get install bridge-utils

-----------------------------------------

4.將Ubuntu本機的使用者 加入vboxusers群組

#sudo usermod -G vboxusers -a media
#sudo gpasswd -a media uml-net

VirtualBox 安裝說明文件----------

In order for VirtualBox to be able to access the interface, the user who will be
running the virtual machine must be added to the group uml-net, for example
with the following command (replace vboxuser with your user name):
sudo gpasswd -a vboxuser uml-net
You may have to log out and log in again for the change to take effect.

--------------------------------

5.調整/dev/vboxdrv相關權限

#sudo chown media.vboxusers /dev/vboxdrv

進行到此步驟VirtualBox已經可以運作,安裝虛擬作業系統:





6.網路介面設定


以下紀錄來源為
Ubuntu下配置VirtualBox的bridge上網方式 - Linux工具 - ypxing
-------------------------------------------------------
Ubuntu下配置VirtualBox的bridge上網方式

這種方式的優點是:外部主機可以直接訪問guest系統

步驟如下: (以下命令均用root用戶執行)

1. 安裝uml-utilities和bridge-utils和,這兩個工具分別含有tunctl和brctl命令


   apt-get install uml-utilities bridge-utils

2. 生成一個新的TAP接口


   tunctl -t tap1 -u <username>

這裡<username>是你想用bridge聯網方式啟動VirtualBox的那個用戶的用戶名
比如我的是: tunctl -t tap1 -u ypxing

3. 生成一個叫做br0的bridge

   
   brctl addbr br0

4. 把你的真實網卡設成promiscuous模式,使得它能夠接收發送到別的MAC地址的幀


   ifconfig eth0 0.0.0.0 promisc

5. 把你的真實網卡加到bridge br0的一端


   brctl addif br0 eth0

6. 把你的真實網卡的配置設置到br0上, 比如我的eth0的ip地址是192.168.168.60


   ifconfig br0 192.168.168.60

   如果你的是通過DHCP配置的,則執行dhclient br0即可

7. 把上面生成的TAP接口加到 bridge br0的另一端

   brctl addif br0 tap1

8. 激活TAP

   ifconfig tap1 up

9. 設置/dev/net/tun的讀寫權限

   chmod 0666 /dev/net/tun
  

經過以上幾步之後,在你的guest系統啟動之前,將它的Network的Adapter0設成
HostInterface,然後Interface Name那一欄天上tap1
啟動guest系統,在該系統中,將你的ip地址設成跟Host系統的eth0在一個局域網就可以了


7.安裝設定成功的畫面



相關資源:

Automatic_Bridge_Ubuntu - VirtualBox

QEMU - DebianWiki

sshlog » VirtualBox Bridge 模式

VirtualBox橋接方式-xxlinux.com

Posted in 網管工作 . 迴響: (0). 引用:(0). 靜態連結網址
«Next post | Previous post»