virtualbox 配置記錄

網絡配置

網絡模式 Host-only Internal Bridged NAT 之間的區別

https://www.virtualbox.org/manual/ch06.htmlhtml

virtualbox 各網絡鏈接方式的訪問性如上圖所示linux

vmware和virtualbox的nat網絡模式有個很大的區別,在vmware的nat模式下vm可以訪問互聯網,且host夠與vm互通。而virtualbox下host與vm是不通的,須要配置端口轉發網絡

網絡配置最佳實踐

  1. 若是你但願外網其餘機器訪問你的虛擬機且可以確保使用某一固定ip不會與他人衝突那麼你能夠直接使用Bridged模式
  2. 若是你的虛擬機須要訪問外網,可是你的公司對網絡訪問進行了較強的限制,例如登陸認證,ip固定分配等等,你應該使用雙網卡配置:NAT(網卡1)+ host-only(網卡2),經過NAT進行外網訪問,經過host-only的ip訪問和操做該虛擬機。這就至關於vmware的nat網絡模式。

移動虛擬機

  1. 全局設定修改存儲路徑後
  2. 移動原存儲路徑文件到新路徑
  3. 控制-註冊 .vbox文件 https://www.jianshu.com/p/a05615d1a17c

安裝加強功能 VBoxGuestAdditions

VBoxGuestAdditions相似於vmware的vmware tools 使用 設備-安裝加強功能菜單,掛載安裝光盤oracle

#安裝依賴項
yum install kernel-devel  bzip2  gcc make -y
#掛載光盤
mkdir /mnt/cdrom
mount /dev/cdrom /mnt/cdrom
cd  /mnt/cdrom
#安裝
sh ./VBoxLinuxAdditions.run
#卸載
sh ./VBoxLinuxAdditions.run uninstall

Before installing the Guest Additions, you will have to prepare your guest system for building external kernel modules. This works similarly as described in Section 2.3.2, 「The VirtualBox driver modules」, except that this step must now be performed in your Linux guest instead of on a Linux host system, as described there.ui

If you suspect that something has gone wrong, check that your guest is set up correctly and try executing the commandthis

rcvboxadd setup as root.spa

Insert the VBoxGuestAdditions.iso CD file into your Linux guest's virtual CD-ROM drive, exactly the same way as described for a Windows guest in Section 4.2.1.1, 「Installation」.code

Change to the directory where your CD-ROM drive is mounted and execute as root:orm

sh ./VBoxLinuxAdditions.runhtm

參考:https://docs.oracle.com/cd/E97728_01/E97727/html/guestadd-install.html#additions-linux

相關文章
相關標籤/搜索