« 開啟 La Fonera SSH 埠口 | 首頁 | Mono SQL# For GTK# »

2007年01月25日

InnoTek VirtualBox 虛擬 PC

安裝 VirtualBox

su -

yum install kernel-devel gcc compat-libstdc++-33 qt SDL

wget http://www.virtualbox.org/download/1.3.2/VirtualBox_1.3.2_Linux_x86.run

chmod +x VirtualBox_1.3.2_Linux_x86.run

./VirtualBox_1.3.2_Linux_x86.run install /opt/VirtualBox

啟動 VirtualBox

sudo VirtualBox

安裝 Guest Additions

讓 Virtual PC 掛載 /opt/VirtualBox/additions/VBoxGuestAdditions.iso

在 Virtual PC 的環境安裝後, 該 Virtual PC 的 "畫質" 與滑鼠操控性會更好

Kernel Headers 備忘

by package:

Linux Distributions Package Name
Debian & Ubuntu linux-headers
older Debian & Ubuntu kernel-headers
Fedora & Redhat kernel-devel
SUSE Linux kernel-source & kernel-syms

by kernel source:

http://www.kernel.org/ 下載並解包至 /usr/src/linux

cd /usr/src/linux

‧kernel 2.4.x

make oldconfig

‧kernel 2.6.x

make defconfig

make prepare

make scripts


參考資料


--- 2007.03.29 補充: 在 Fedora Core 6 使用 bridge 網路模式

http://rpmfind.net/ 搜尋 uml-utilities:
wget ftp://fr2.rpmfind.net/linux/opensuse/distribution/SL-10.1/inst-source/suse/i586/uml-utilities-20040406-11.i586.rpm

rpm -ivh --nodeps uml-utilities*.rpm

yum -y install bridge-utils

tunctl –t tap1 –u root

brctl addbr br0

ifconfig eth0 0.0.0.0 promisc

brctl addif br0 eth0

dhclient br0

brctl addif br0 tap1

啟動 VirtualBox, 將 VirtualHost 的 Network Interface Name 設定為 tap1 即可


--2007.08.14 補充: 在 Windows XP 使用 bridge 網路模式

Step 1: 建立 VirtualBox TAP Adapter

開始 → 執行 → cmd

cd \Program Files\innotek VirtualBox\

VBoxManage createhostif "VM1 external"

exit

Step 2: 建立網路橋接器

網路上的芳鄰 → (右鍵) → 內容

選取 "VM1 external" 與 "區域連線" (本機網卡) → (右鍵) → 橋接器連線

如果在原本 "區域連線" 裡有手動設置的內容, 請點選 "網路橋接器" 的 "內容" 進行相同設置 (因為此時網路橋接器已取代原本的 "區域連線")

Step 3: 將虛擬電腦的網卡改成 Host Interface、VM1 external

參考資料: VirtualBox UserManual

Posted by Jamyy at 2007年01月25日 21:06

Trackback Pings

TrackBack URL for this entry:
http://cha.homeip.net/cgi-bin/mt/mt-tb.cgi/256

Comments

站長您好
請問您的首頁隨機圖片是如何設定的
因為我也是用gallery可是我的卻步會隨機變換

Posted by: 阿榮 at 2007年03月03日 23:13

您好!
請參考: /blog/archives/2005/05/php.html

Posted by: Jamyy at 2007年03月04日 00:21

站長你好!
其實我想了很九~究竟虛疑出來的PC~可否玩到線上遊戲~??
我嘗試過用Virtual pc~但是我不懂怎樣弄得一個winXP
我看過很多論壇~但是都不懂~你可以解答我嗎~?
1)Linux和vm 是什麼來的??

Posted by: man at 2007年03月11日 17:39

您好!
由於虛擬機器是依附在現行的作業系統上
所以虛擬機器能分配到的資源有限
除非你的 CPU 很快, RAM 很多
才能把虛擬機器當成另一台電腦來用
InnoTek VirtualBox 建立虛擬電腦真的很簡單
重點只在於:
1.Virtual Hard Disk 的時候 New 一個虛擬硬碟空間
2.按 CD/DVD-ROM 掛載實體光碟 (XP 光碟片) 或 XP 的 .iso 映像檔
3.啟動虛擬電腦, 安裝 XP
就醬子而已
這篇文章主要是記錄如何在 Linux 作業系統安裝、執行 InnoTek VirtualBox
InnoTek VirtualBox 也有 for Windows 的版本
Linux 是一種作業系統, 就像 Windows XP 也是一種作業系統一樣
VM 就是 Virtual Machine (虛擬機器), 它有很多種解釋, 詳情請見:
http://zh.wikipedia.org/w/index.php?title=%E8%99%9B%E6%93%AC%E6%A9%9F%E5%99%A8&variant=zh-tw
本篇所提 Virtual PC 即為該文之 "作業系統虛擬機"

Posted by: Jamyy at 2007年03月12日 17:17

Fedora Core 6 使用 bridge 網路模式

您好我做做到這個地方
brctl addbr br0 結果出現
bash: brctl: command not found
就不能成功了
我是用fedora 7
不知那裡出了問題。。謝謝

Posted by: lcm99 at 2007年06月27日 12:47

您好,
請執行 yum -y install bridge-utils 安裝 bridge-utils 套件即可

Posted by: Jamyy at 2007年06月27日 17:22

真不好意思,不知那裡錯了,最後還是錯誤,請您指導

[root@ftp ~]# yum -y install bridge-utils
Loading "installonlyn" plugin
Setting up Install Process
Parsing package install arguments
Nothing to do
[root@ftp ~]# tunctl –t tap1 –u root
Create: tunctl [-b] [-u owner] [-t device-name] [-f tun-clone-device]
Delete: tunctl -d device-name [-f tun-clone-device]

The default tun clone device is /dev/net/tun - some systems use
/dev/misc/net/tun instead

-b will result in brief output (just the device name)
[root@ftp ~]# brctl addbr br0
[root@ftp ~]# ifconfig eth0 0.0.0.0 promisc
[root@ftp ~]# brctl addif br0 eth0
[root@ftp ~]# dhclient br0
Internet Systems Consortium DHCP Client V3.0.5-RedHat
Copyright 2004-2006 Internet Systems Consortium.
All rights reserved.
For info, please visit http://www.isc.org/sw/dhcp/
Listening on LPF/br0/00:0e:a6:ba:81:5b
Sending on LPF/br0/00:0e:a6:ba:81:5b
Sending on Socket/fallback
DHCPREQUEST on br0 to 255.255.255.255 port 67
DHCPREQUEST on br0 to 255.255.255.255 port 67
DHCPREQUEST on br0 to 255.255.255.255 port 67
DHCPDISCOVER on br0 to 255.255.255.255 port 67 interval 5
DHCPOFFER from 192.168.0.1
DHCPREQUEST on br0 to 255.255.255.255 port 67
DHCPACK from 192.168.0.1
bound to 192.168.0.3 -- renewal in 682058 seconds.
[root@ftp ~]# brctl addif br0 tap1
interface tap1 does not exist!
[root@ftp ~]#

Posted by: lcm99 at 2007年06月27日 20:25

tap1 沒有設定成功
請再重新執行 tunctl 指令

Posted by: Jamyy at 2007年06月28日 09:32

您好,終於找出原因,在別的網站找到,原來最後少了下面二行,

ifconfig tap1 up
chmod 666 /dev/net/tun

而且下面這行最好用打的,如果直接在您的網站直接複制貼上,會出現我所貼的錯誤
tunctl –t tap1 –u root

現在終於可以了,感謝

Posted by: lcm99 at 2007年06月29日 23:06

原來是這樣
謝謝你的分享, 也恭喜你成功了 :)

Posted by: Jamyy at 2007年06月29日 23:47

Dear Sir
請問有沒有在Winxp 使用 bridge 網路模式設定方法???
如果有,可否請教請教!??
Thx

Posted by: fire at 2007年08月14日 15:35

您好, 已將操作方法加至文末, 請參考.

Posted by: Jamyy at 2007年08月14日 17:13

I am cerate the virtual box in Suse Enterprise 10. after i issued the command dhclient br0, I get the following error:
Internet Systems Consortium DHCP Client v3.0.3
....

Listening on LPF/br0/00:01:2e:13:c5:48
Sending on LPF/br0/00:01:2e:13:c5:48
Can't bind to dhcp address: Address already in use
Please make sure there is no other dhcp server running and that there's no entry for dhcp or bootp in /etc/inetd.conf

.....

我错在那里了?

Posted by: gshan at 2008年01月07日 11:55

我沒遇過這種情況, 以 "Can't bind to dhcp address: Address already in use" 為關鍵字在 Google 爬了幾篇文章, 給您兩點建議:

1. killall dhclient, 再重新執行一次 dhclient 試試看
2. 停用 SELinux, 再試試看

Good Luck!

Posted by: Jamyy at 2008年01月08日 11:48

Dear Sir
我是使用windows xp home edition, 要在virtual box 上安裝windows xp professinal, 請問要如何連結網路, 可以互相看到對方的檔案.
如果有,可否請教請教!??
Thx

Posted by: lee at 2008年05月28日 17:19