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

2018年1月16日 星期二

VirtualBox principle and practice

1.  How Host -> Guest in  NAT mode by ssh
Hint : Using port forward
host: windows7
guest: centos 6.X

Step1: in guest start the sshd service for sure the service is work
>service sshd start
>netstat -ln | grep 22


Step2: setting the portforward

Notice: the port in NAT will occupy the host port, so we will using another port 6022 to connect to it

Step3: Connect to the quest 

 REF
youtube 


2. Host only network
Host Only 網卡是透過將虛擬機器的網卡和 Host 的綁在(Bind) 由 VirtualBox 所建立的同一張虛擬網卡上的方式來達到虛擬主機可以和 Host 使用相用網段的效果,所以,透過啟用虛擬機器的 Host Only 網卡,就可以讓虛擬主機和 Host 直接存取彼此的服務而不用設定 IP  Forwarding 哩 ! 不過,Host Only 網卡因為是使用了獨立的網段,因此,也就無法直接連到外部的網路來上網哩 !

ref 1

3.  NAT Network start
https://askubuntu.com/questions/691317/virtualbox-dhcp-server

4. Inter network
https://hackercool.com/2013/10/how-to-enable-dhcp-server-in-virtualbox/



5. 其餘網路設定
5-1 . 設定 IPV6
有時候在虛擬機內,因為外部設定成 IPV4, IPV Dual Stack,
但內部未設定, 此時要開啟 IPV6 才能取得 IPV6 address, 否則會有 dns error 等問題








Other reference
virtualbox_manual


2013年11月11日 星期一

Virtual Box 上 安裝 CentOS Guest Additions


Problem:

1. "building the virtualbox guest additions kernel modules [失敗]"
2. "Building the OpenGL support module FAILED "


1. Solution: (內容為參考 竹林小屋 Virtual Box 上 安裝 CentOS Guest Additions )
所需套件:
1.gcc
2.kernel-devel
3.kernel-headers

安裝流程:
yum install gcc    #安裝gcc,會同時安裝很多相依套件
yum install kernel-devel    #安裝kernel-devel
yum install kerner-headers    #安裝kernel-headers

安裝完成之後,還必須注意一點........
kernel、kernel-devel、kernel-headers三個套件版本要一樣!
否則人生失敗句可能還會再重現XD
rpm -qa | grep kernel    #檢查三個套件的版本是否一樣

筆者遇到kernel版本比其他兩個還要低,所以還要升級一下。
yum update kernel    #升級kernel版本

升級好之後,重新開機使用新的kernel。(不曉得有沒有不用重開的方法)

2. solution (http://it.oyksoft.com/post/6568/):

cd /media/VBOXADDITIONS_4.1.8_75467/
export MAKE='/usr/bin/gmake -i'
./VBoxLinuxAdditions.run


"make -i" , -i, --ignore-errors   Ignore errors from commands.忽略错误

3. 如果 kernel update 後, 程式
要從新 recompile 程式, 但會出現 /etc/init.d/vbox setup
yum install -y  kernel-devel





2012年2月15日 星期三

2012年2月13日 星期一

ON Linux

http://miracle88.homeip.net/?p=1248