2007/11/07

Shared folder of VirtualBox 1.5.2 (host: Ubuntu)

注意:必須先安裝VBoxGuestAdditions
在VitualBox的Setting選項找到CD/DVD ROM> ISO Image File,
mount上VBoxGuestAdditions.iso
我的是在 /usr/share/virtualbox/VBoxGuestAdditions.iso
如圖:


然後start Virtual Machine 從虛擬光碟機安裝VBoxGuestAdditions




VirtualBox 1.5.2 設定shared folder (Host 為Ubuntu)
可以在VirtualBox的Setting選項裡找到Shared Folders,
點選Add a new shared folder
設定folder path 及 folder name.
如圖:



然後start Virtual Machine(Guest 為 Windows XP)
"執行列"輸入cmd
再鍵入
net use x: \\vboxsvr\[your folder name]
就可以在windows上掛上網路磁碟 x (可以自行設定你要哪一槽)
而此網路磁碟就是host OS與Virtual Machine 分享檔案的渠道.
p.s.如果在"我的電腦"裡沒找到 網路磁碟x, 重開virtual mahcine試試~

注意: x:與\\中間有個空格, 若少了這個空格,就會跑出下列訊息~~
系統發生67錯誤
找不到網路名稱



結果:


 


註: 在terminal 設定查詢virtual machine及設定shared folder的指令如下:

列出你的virtual machine, 其中最下列一項便是Shared folders的資訊.
VBoxManage list vms


設定Shared folder
VBoxManage sharedfolder add "$VM_name" -name "$share_name" -hostpath "$path_to_share"
$VM_name
是你的Virtual Machine  name (ex.WindowsXP)
$share_name 是你想給Virtual Machine看的name (ex: shareVM)
$path_to_share 是share folder在host OS的路徑, (ex: /home/David/share)


 


 

2 comments:

  1. We are going to test this with our student.
    We found :

    I have tested the step you mention. All are ok. (when I use guest uBuntu 7.10 and host is XP )
    I can share the file in share folder mmpo in virtual box 1.56

    But I cannot share the folder in the case the guest is debian 4.0vR3. The host is still XP.
    No matter what I do.


    The error message is :
    The current kernel version is 2.6.22-3-686
    problems were found which would prevernt the Guest Additions from installing. Pls correct these problems and try again.

    Can you help? Is the guest linux addition for ubuntu only???

    With regards.

    ReplyDelete
  2. hi, 老師好~

    從官方文件來看
    http://www.virtualbox.org/wiki/Guest_OSes
    應該是有支援你的debian版本.

    我沒有試過在windows上安裝virtualBox,
    在google找了一下, 也沒有找到跟您一樣的問題.

    有一些討論串是kernel header, gcc, or gtd的版本問題,
    但我不確定跟您的問題相符.

    不過官方forum的討論串相當豐富,請您花點時間爬一下文..
    http://forums.virtualbox.org/

    或是請您參考User Manual
    http://195.34.175.98/download/UserManual.pdf

    ReplyDelete