顯示具有 virtualbox 標籤的文章。 顯示所有文章
顯示具有 virtualbox 標籤的文章。 顯示所有文章

星期六, 5月 01, 2010

Cannot switch workspace when VirtualBox running

我們可以使用 Ctrl + Alt + 左/右 來切換工作區。

當把 VirtualBox 的 Virtual Machine 開機並把它放到某個工作區,例如第二個工作區。這時前面所說的快速鍵在第二個工作區就失效了。原因是 VirtualBox 預設會捕捉所有鍵盤事件,我們只要把它關掉就沒事了。作法如下:
VirtualBox - 檔案 - 喜好設定 - 輸入 - 自動擷取鍵盤

自動擷取鍵盤取消就可以了。

參考資料:
https://bugs.launchpad.net/ubuntu/+source/virtualbox-ose/+bug/177510/comments/19

星期六, 2月 13, 2010

Install Virtualbox-3.1 on Debian

1. prepare the environment for build kernel module of virtualbox
sudo aptitude install module-assistant dkms
sudo m-a prepare


2. add repository of virtualbox for debian lenny
deb http://download.virtualbox.org/virtualbox/debian lenny non-free


3. get the Sun public key for apt-secure
wget http://download.virtualbox.org/virtualbox/debian/sun_vbox.asc


4. add the public key into apt
sudo apt-key add sun_vbox.asc


5. update the apt repository
sudo aptitude update


6. install the virtualbox
sudo aptitude install virtualbox-3.1

星期四, 7月 02, 2009

VirtualBox USB not working on Debian lenny

引用來源:
http://forums.virtualbox.org/viewtopic.php?f=7&t=18934#p81634

Re: USB not working (with PUEL)

Postby draeath » 20. Jun 2009, 04:01

Found the problem.

Debian Lenny sets up /proc/bus/usb and /dev/bus/usb as root:root without write permissions.

So, I needed to dig and find this:
/etc/init.d/mountkernfs.sh

I edited that file. The line in question (line 75) as supplied by Debian:
domount usbfs usbdevfs /proc/bus/usb usbfs -onodev,noexec,nosuid

This needed to be changed to:
domount usbfs usbdevfs /proc/bus/usb usbfs -onodev,noexec,nosuid,devmode=0664,devgid=46

Group ID 46 is "plugdev" for my system, and it makes sense to me to have that group given write permissions to the USB devices, since that group allows one to mount and use removable (usually USB) media. devmode=0664 just adds +w to the owner and group - which is required in addition to just changing the group itself.

I needed to reboot to activate this, since it's not a normal init script.

星期三, 1月 09, 2008

Debian set up a bridge

My setting of /etc/network/interfaces
==================================
allow-auto lo br0 br1
allow-hotplug br0 br1

iface lo inet loopback

# The primary network interface

iface tap0 inet manual
up ifconfig $IFACE 0.0.0.0 promisc
down ifconfig $IFACE down
tunctl_user richman

iface eth0 inet manual
up ifconfig $IFACE 0.0.0.0 promisc
down ifconfig $IFACE down

iface br0 inet static
address 192.168.2.248
netmask 255.255.255.0
network 192.168.2.0
broadcast 192.168.2.255
bridge_ports eth0 tap0
bridge_maxwait 0
gateway 192.168.2.2
# dns-* options are implemented by the resolvconf package, if installed
dns-nameservers 192.168.2.2

iface tap1 inet manual
up ifconfig $IFACE 0.0.0.0 promisc
down ifconfig $IFACE down
tunctl_user richman

iface eth1 inet manual
up ifconfig $IFACE 0.0.0.0 promisc
down ifconfig $IFACE down

iface br1 inet static
address 192.168.1.100
netmask 255.255.255.0
network 192.168.1.0
broadcast 192.168.1.255
bridge_ports eth1 tap1
bridge_maxwait 0

星期六, 12月 29, 2007

Bridge Host OS and Guest OS network interface

通常 VirtualBox 的 Guest OS 的網卡預設是使用 NAT ,透過 Host OS 的網卡連至 Internat。
這時候兩張網卡是分別在不同網段。在某些情形下,我們會想要它們是在在同一網段下,這時我們可以將兩張網卡做橋接,也就是 bridge 兩張網卡。以 Debian 為Host OS 做例子,做法如下,

建立一個軟體虛擬的網路介面 tap0
# tunctl -t tap0 -u user_will_own_tap0
# chmod 666 /dev/net/tun


讓 eth0, tap0 進入 promisc 模式,使能收到到所有封包。
# ifconfig eth0 0.0.0.0 promisc
# ifconfig tap0 0.0.0.0 promisc


建立一個軟體虛擬的橋接器 br0,並將 eth0 及 tap0 加入其中
# brctl addbr br0
# brctl addif br0 eth0
# brctl addif br0 tap0


設定橋接器的 IP address, routing table, DNS,有兩種做法,一是交由 dhclient,
# dhclient br0


或是手動設定

# ifconfig br0 Static_IP netmask 255.255.255.0 up
# route add default gw Gateway_IP
# cat "nameserver DNS_IP" > /etc/resolv.conf


接下來 VirtualBox 的 Guest OS 的
網路-配接卡0-啟用網路卡-附掛到->主端介面
同頁面的主機介面設定值-介面名稱-> tap0