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

相关文章
相关标签/搜索